Skip to content

Commit e3006f2

Browse files
committed
test(cli): the retired-key e2e fixture uses a retired member with no tree-absence pin
agent.lifecycle's retirement pins the key absent from the tree outside its kit, so authoring it in this fixture redded spec's test:repo. The #9418 fixture now carries `structuredOutput.format: 'regex'` inside defineAgent (agent-structured-output-refused-members-removed, protocol 18) beside the Dashboard.create refreshInterval tombstone. Claude-Session: https://claude.ai/code/session_01QSeKYnN7X5PL1HWYjGfKJY Co-authored-by: Claude <noreply@anthropic.com>
1 parent f73c11c commit e3006f2

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

‎packages/cli/test/migrate-meta.e2e.test.ts‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,14 @@ describe('os migrate meta --from 16 (e2e over the real CLI)', () => {
358358
* example apps use), and the retired keys authored inside them. A
359359
* `defineStack`-only tolerance passes the first and fails the last two.
360360
*
361-
* The retired keys are ones whose tombstone and conversion still stand
362-
* (`agent.lifecycle`, `dashboard.refreshInterval`; protocol 18, which
363-
* `--from 16` replays into). The fixture used to carry `agent.knowledge` and
364-
* `skill.triggerPhrases`, whose 16.x kits aged out (#25767): their tombstones
365-
* and conversions left the spec, so neither is a retired key any more, only an
366-
* unknown one.
361+
* The retired spellings are ones whose refusal and conversion still stand
362+
* (the `dashboard.refreshInterval` tombstone, and `regex`, a retired member of
363+
* `agent.structuredOutput.format` refused at parse with its prescription;
364+
* protocol 18, which `--from 16` replays into). The fixture used to carry
365+
* `agent.knowledge` and `skill.triggerPhrases`, whose 16.x kits aged out
366+
* (#25767): their tombstones and conversions left the spec, so neither is a
367+
* retired key any more, only an unknown one. `agent.lifecycle` is not used:
368+
* its retirement pins the key absent from the tree outside its own kit.
367369
*
368370
* The second test is the other half of the pin, and it is the one that keeps
369371
* this a restoration rather than a widening: `os validate` on the SAME fixture
@@ -396,7 +398,7 @@ export default defineStack({
396398
label: 'Agent',
397399
role: 'Helper',
398400
instructions: 'help',
399-
lifecycle: { id: 'rk', initial: 'open', states: { open: {} } }, // RETIRED in 17.7.0 — the whole point
401+
structuredOutput: { format: 'regex' }, // RETIRED member in 17.7.0 — the whole point
400402
})],
401403
dashboards: [Dashboard.create({
402404
name: 'rk_ops',
@@ -437,12 +439,12 @@ export default defineStack({
437439
expect(parsed.from).toBe(16);
438440
// …and through helpers imported from a spec subpath, which is where a
439441
// tolerance scoped to `defineStack` alone would still have refused.
440-
expect(appliedAt.get('agent-lifecycle-removed')).toBe('agents[0].lifecycle');
442+
expect(appliedAt.get('agent-structured-output-refused-members-removed')).toBe('agents[0].structuredOutput.format');
441443
expect(appliedAt.get('dashboard-refresh-interval-to-refresh-interval-seconds')).toBe('dashboards[0].refreshIntervalSeconds');
442444
expect(parsed.schemaValid).toBe(true);
443445

444446
const snap = JSON.parse(readFileSync(join(rkDir, 'migrated.json'), 'utf-8'));
445-
expect(snap.agents[0].lifecycle).toBeUndefined();
447+
expect(snap.agents[0].structuredOutput).toBeUndefined();
446448
expect(snap.dashboards[0].refreshInterval).toBeUndefined();
447449
// The rest of the artifact survives the tolerant load intact — the codemod
448450
// removes what retired, not what it could not parse.
@@ -461,7 +463,7 @@ export default defineStack({
461463
} catch (e: any) {
462464
refused = true;
463465
const output = `${String(e.stdout ?? '')}${String(e.stderr ?? '')}`;
464-
expect(output).toMatch(/`agent\.lifecycle` was removed/);
466+
expect(output).toMatch(/`regex` was removed/);
465467
expect(output).toMatch(/os migrate meta --from 17/);
466468
}
467469
expect(refused, '`os validate` must still reject a retired key').toBe(true);

0 commit comments

Comments
 (0)