diff --git a/CHANGELOG.md b/CHANGELOG.md index 18116e276..449770ff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ### Tests - `test/honesty-kernel.test.ts` no longer requires the Step 16 pointer. It now rejects any `Step ` cross-reference in the kernel, which every skill renders. -- `test/resolver-ask-user-format.test.ts` checks that item 1 states the unattended pending set with no section or block pointer (no "Unattended session block", no "per its printed"). It also checks that the failure fallback's `unattended` branch keeps destructive or irreversible options pending, and that the hook's unattended directive says the same. `test/gstack-skill-start.test.ts` checks that the block gstack-skill-start actually prints keeps destructive or irreversible options pending for every skill it samples. `test/auq-error-fallback-hook.test.ts` asserts the hook's unattended directive no longer says "Unattended session block". +- `test/resolver-ask-user-format.test.ts` checks that item 1 states the unattended pending set with no section or block pointer, in any spelling of the unattended-session block or "per its printed". It also checks that the failure fallback's `unattended` branch keeps destructive or irreversible options pending, and that the hook's unattended directive says the same. `test/gstack-skill-start.test.ts` checks that the block gstack-skill-start actually prints keeps destructive or irreversible options pending for every skill it samples. `test/auq-error-fallback-hook.test.ts` asserts the hook's unattended directive no longer says "Unattended session block". - `test/plan-reality.test.ts` checks that the reality-rows block for the eng and ceo phases says its `gstack-plan-reality check` line prints `PLAN_REALITY`. - 89 pins in `test/fixtures/skill-md-size-allowlist.json` were moved to their new exact sizes, and every pin went down. 78 went down by 62 characters. The 11 non-Claude plan-eng-review pins went down by 38, because they also inline the 24-character "prints `PLAN_REALITY`" pointer from `review-sections.md`. Both figures already include the destructive/irreversible carve-out the fallback branch keeps. The /ship goldens were regenerated. diff --git a/test/auq-error-fallback-hook.test.ts b/test/auq-error-fallback-hook.test.ts index 9c94ccec5..8f6556697 100644 --- a/test/auq-error-fallback-hook.test.ts +++ b/test/auq-error-fallback-hook.test.ts @@ -88,7 +88,7 @@ describe('directiveFor — per-session-kind instruction', () => { // fails_when=the literal "Unattended session block" pointer returns; why_new=CQ3 checks the resolver prose only, // not this hook; seam=none; no_claim=model behaviour after the injection, and other session-block pointers such as // the spawned one (pure function; unit only) - expect(d).not.toContain('Unattended session block'); + expect(d).not.toMatch(/unattended[- ]session[`'\s]*block/i); }); test('spawned directive carries a self-contained destructive carve-out (#2733 review)', () => { diff --git a/test/resolver-ask-user-format.test.ts b/test/resolver-ask-user-format.test.ts index 0be455295..8da25f584 100644 --- a/test/resolver-ask-user-format.test.ts +++ b/test/resolver-ask-user-format.test.ts @@ -24,6 +24,8 @@ import { generateAskUserFormat } from '../scripts/resolvers/preamble/generate-as import { directiveFor } from '../hosts/claude/hooks/auq-error-fallback-hook.ts'; import { expectMentions, expectTokens } from './helpers/prompt-structure'; +const UNATTENDED_POINTER = /unattended[- ]session[`'\s]*block|per its printed/i; + function makeCtx(): TemplateContext { return { skillName: 'test-skill', @@ -223,8 +225,7 @@ describe('generateAskUserFormat — runtime-failure prose fallback', () => { // Value: protects=the failure fallback's unattended branch states its rule with no pointer to a section the reader // never sees; fails_when=the "(Unattended session block)" pointer returns to that branch; why_new=CQ3 reads item 1 // only and the hook test reads the hook only; seam=none; no_claim=model behaviour after an AUQ failure (unit only) - expect(unattended).not.toContain('Unattended session block'); - expect(unattended).not.toContain('per its printed'); + expect(unattended).not.toMatch(UNATTENDED_POINTER); } }); @@ -377,8 +378,7 @@ describe('CQ3 — Tool resolution item 1 states the unattended rule with no sect const item1 = out.split('\n').find(line => line.startsWith('1. **\`SESSION_KIND: spawned\` echoed**')) ?? ''; expect(item1, 'Tool resolution item 1 must exist').not.toBe(''); expectMentions(item1, [['unattended', 'consent', 'unrecommended question', 'approval gate', 'pending']], `${skillName} item 1`); - expect(item1).not.toContain('Unattended session block'); - expect(item1).not.toContain('per its printed'); + expect(item1).not.toMatch(UNATTENDED_POINTER); }); } });