Skip to content

Commit 09a40d0

Browse files
committed
fix(config): restore --no-workflow as warn-and-ignore shim
1 parent 8a95baa commit 09a40d0

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎docs/IMPLEMENTATION.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ Printed by `corbits --help` / `-h` from `CLI_HELP_TEXT` in `src/config/index.ts`
444444
| `--dangerously-skip-permissions`, `--yolo` | false | Process-only aliases that auto-allow anything not denied by the authorization layer (gate + pre-gate workspace sandboxes; secret-guard / authz hard denies remain). `/yolo [on\|off\|toggle]` persists to the active settings file instead. |
445445
| `--auto` | true (default) | Force auto mode on (workspace writes + unconstrained shell without prompts) |
446446
| `--no-auto` | false | Start with auto mode off (ask on every consequential action); no in-session key toggles it |
447+
| `--no-workflow` | — | Deprecated no-op: accepted with a stderr warning and ignored (kept for one release so existing wrappers keep starting; will become `unrecognized flag` after removal) |
447448
| `--help`, `-h` | — | Show help (exit 0 via `CliHelpError`) |
448449
| `--version`, `-V` | — | Print `corbits v` plus the running `package.json` version (exit 0 via `CliVersionError`) |
449450

‎src/config/index.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,15 @@ export async function loadConfig(
960960
auto = false;
961961
continue;
962962
}
963+
// CL-10755: deprecated no-op retained for one release as warn-and-ignore
964+
// so existing `--no-workflow` wrappers keep starting instead of hitting
965+
// the catch-all "unrecognized flag" error below.
966+
if (arg === "--no-workflow") {
967+
process.stderr.write(
968+
"--no-workflow is deprecated and has no effect; ignoring.\n",
969+
);
970+
continue;
971+
}
963972
if (arg === "-p") {
964973
continue;
965974
}

‎src/config/settings.test.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,31 @@ test("loadConfig --no-auto disables auto mode", async () => {
215215
});
216216
});
217217

218+
// CL-10755: --no-workflow is a deprecated no-op. It must stay accepted for
219+
// one release (stderr warn-and-ignore) instead of hitting the catch-all
220+
// "unrecognized flag" error.
221+
test("loadConfig --no-workflow warns and is ignored", async () => {
222+
await withSettings(async ({ cwd, globalSettingsPath }) => {
223+
const { impl } = offlineFetch();
224+
const stderr = captureStderr();
225+
try {
226+
const config = await loadConfig(
227+
["--cwd", cwd, "--no-workflow", "do something"],
228+
{
229+
globalSettingsPath,
230+
pricing: { fetchImpl: impl },
231+
},
232+
);
233+
expect(config.configured).toBe(true);
234+
expect(stderr.output()).toContain(
235+
"--no-workflow is deprecated and has no effect; ignoring.",
236+
);
237+
} finally {
238+
stderr.restore();
239+
}
240+
});
241+
});
242+
218243
test("loadConfig uses the injected pricing fetchImpl instead of the network", async () => {
219244
await withSettings(async ({ cwd, globalSettingsPath }) => {
220245
resetPricingMetadataRefreshForTests();

0 commit comments

Comments
 (0)