Skip to content

Commit 13339e6

Browse files
committed
fix(config): restore --no-workflow as warn-and-ignore shim
1 parent c63783c commit 13339e6

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
@@ -957,6 +957,15 @@ export async function loadConfig(
957957
auto = false;
958958
continue;
959959
}
960+
// CL-10755: deprecated no-op retained for one release as warn-and-ignore
961+
// so existing `--no-workflow` wrappers keep starting instead of hitting
962+
// the catch-all "unrecognized flag" error below.
963+
if (arg === "--no-workflow") {
964+
process.stderr.write(
965+
"--no-workflow is deprecated and has no effect; ignoring.\n",
966+
);
967+
continue;
968+
}
960969
if (arg === "-p") {
961970
continue;
962971
}

‎src/config/settings.test.ts‎

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

205+
// CL-10755: --no-workflow is a deprecated no-op. It must stay accepted for
206+
// one release (stderr warn-and-ignore) instead of hitting the catch-all
207+
// "unrecognized flag" error.
208+
test("loadConfig --no-workflow warns and is ignored", async () => {
209+
await withSettings(async ({ cwd, globalSettingsPath }) => {
210+
const { impl } = offlineFetch();
211+
const stderr = captureStderr();
212+
try {
213+
const config = await loadConfig(
214+
["--cwd", cwd, "--no-workflow", "do something"],
215+
{
216+
globalSettingsPath,
217+
pricing: { fetchImpl: impl },
218+
},
219+
);
220+
expect(config.configured).toBe(true);
221+
expect(stderr.output()).toContain(
222+
"--no-workflow is deprecated and has no effect; ignoring.",
223+
);
224+
} finally {
225+
stderr.restore();
226+
}
227+
});
228+
});
229+
205230
test("loadConfig uses the injected pricing fetchImpl instead of the network", async () => {
206231
await withSettings(async ({ cwd, globalSettingsPath }) => {
207232
resetPricingMetadataRefreshForTests();

0 commit comments

Comments
 (0)