Skip to content

Commit e2b9d79

Browse files
Remove the workflow field from profile files (#922)
1 parent d498552 commit e2b9d79

6 files changed

Lines changed: 30 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ parallel copies under `docs/` or `scripts/notes/`. At cut time: rename
1313

1414
## [Unreleased]
1515

16+
### Removed
17+
18+
- Profile files no longer accept a `workflow` field. Workflows start only from
19+
slash commands; a leftover key is rejected on load rather than ignored. The
20+
`--no-workflow` CLI flag is unchanged.
21+
1622
## [0.3.22] - 2026-09-11
1723

1824
### Added

docs/IMPLEMENTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ Profiles supply per-project or named-profile overrides for `model`, `systemPromp
347347
}
348348
```
349349

350-
`resolveProfile` merges a named profile with the project profile, with **project profile field values overriding the named profile's**. The resolved `model` feeds into provider resolution and the director; `systemPromptExtensions` are appended to the system prompt. Workflow profile metadata is deprecated because workflows are started only by explicit slash commands. CLI flags (`--model`, `--profile`) still win over profile values during config resolution.
350+
`resolveProfile` merges a named profile with the project profile, with **project profile field values overriding the named profile's**. The resolved `model` feeds into provider resolution and the director; `systemPromptExtensions` are appended to the system prompt. CLI flags (`--model`, `--profile`) still win over profile values during config resolution.
351351

352352
### Provider Configuration
353353

src/config/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,6 @@ export interface Config {
506506
*/
507507
resumeMode?: "id" | "pick";
508508

509-
// Deprecated workflow profile metadata; workflows are manual-only slash commands.
510-
workflow?: string;
511509
// Deprecated no-op retained for CLI compatibility.
512510
noWorkflow: boolean;
513511
/**
@@ -988,7 +986,6 @@ export async function loadConfig(
988986
noWorkflow,
989987
...(resumeMode !== undefined ? { resumeMode, skipInitialTask } : {}),
990988
...(resumePicker ? { resumePicker: true } : {}),
991-
...(profile.workflow !== undefined ? { workflow: profile.workflow } : {}),
992989
...(settings?.defaultProvider !== undefined
993990
? { globalDefaultProvider: settings.defaultProvider }
994991
: {}),

src/config/profiles.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const ProfileSchema = type({
88
"profile?": "string",
99
"model?": "string",
1010
"systemPromptExtensions?": "string[]",
11-
"workflow?": "string",
1211
// Per-call inactivity timeout in milliseconds. If the provider yields no
1312
// inference event for this many ms, the call is aborted and the user sees
1413
// "Request timed out". Default in the inference harness is 120_000 (2 min).

src/profiles.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ test("loadProfile rejects unknown keys", async () => {
6565
await expect(loadProfile(path)).rejects.toThrow(/unknownKey must be removed/);
6666
});
6767

68+
test("loadProfile rejects a workflow field", async () => {
69+
const dir = makeTmp();
70+
await mkdir(dir, { recursive: true });
71+
const path = join(dir, "profile.json");
72+
await writeJson(path, { workflow: "build" });
73+
await expect(loadProfile(path)).rejects.toThrow(/workflow must be removed/);
74+
});
75+
6876
test("loadProfile rejects non-array systemPromptExtensions", async () => {
6977
const dir = makeTmp();
7078
await mkdir(dir, { recursive: true });

tests/unit/config.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,21 @@ test("loadConfig --no-auto disables auto mode", async () => {
8181
});
8282
});
8383

84+
test("loadConfig --no-workflow remains a recognized flag", async () => {
85+
await withSettings(async ({ cwd, globalSettingsPath }) => {
86+
const { impl } = offlineFetch();
87+
const config = await loadConfig(
88+
["--cwd", cwd, "--no-workflow", "do something"],
89+
{
90+
globalSettingsPath,
91+
pricing: { fetchImpl: impl },
92+
},
93+
);
94+
expect(config.configured).toBe(true);
95+
if (config.configured) expect(config.noWorkflow).toBe(true);
96+
});
97+
});
98+
8499
test("loadConfig uses the injected pricing fetchImpl instead of the network", async () => {
85100
await withSettings(async ({ cwd, globalSettingsPath }) => {
86101
resetPricingMetadataRefreshForTests();

0 commit comments

Comments
 (0)