diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dad4baaf..18116e276 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 printed `unattended-session` block and the hook's unattended directive say the same. `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 (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/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/gstack-skill-start.test.ts b/test/gstack-skill-start.test.ts index 63f1f9999..8477a9d85 100644 --- a/test/gstack-skill-start.test.ts +++ b/test/gstack-skill-start.test.ts @@ -23,6 +23,7 @@ import * as os from 'os'; import * as path from 'path'; import { generatePreamble } from '../scripts/resolvers/preamble'; import { HOST_PATHS, type TemplateContext } from '../scripts/resolvers/types'; +import { expectMentions } from './helpers/prompt-structure'; const ROOT = path.resolve(import.meta.dir, '..'); const START = path.join(ROOT, 'bin', 'gstack-skill-start'); @@ -389,6 +390,7 @@ describe('gstack-skill-start behavior', () => { for (const text of Object.values(blocks)) { expect(text).not.toContain('skill='); expect(text).toMatch(/never choose them/); + expectMentions(text, [['destructive', 'irreversible', 'pending']], 'printed unattended-session block'); expect(text).toMatch(/never approve a gate/); expect(text).toMatch(/never publish, push, sync or send data off this machine/); } diff --git a/test/resolver-ask-user-format.test.ts b/test/resolver-ask-user-format.test.ts index 6777ed0a1..0be455295 100644 --- a/test/resolver-ask-user-format.test.ts +++ b/test/resolver-ask-user-format.test.ts @@ -219,6 +219,12 @@ describe('generateAskUserFormat — runtime-failure prose fallback', () => { ['destructive', 'irreversible', 'pending'], ['consent', 'unrecommended question', 'approval gate', 'pending'], ], `${skillName} unattended fallback branch`); + // Generated by /ship Step 7 coverage audit pass 1 (GSTA-91, PR #3421). + // 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'); } }); @@ -377,12 +383,8 @@ describe('CQ3 — Tool resolution item 1 states the unattended rule with no sect } }); -describe('CQ4 — the printed unattended-session block and the hook directive keep destructive or irreversible options pending', () => { - test('the printed unattended-session block and the hook directive agree with the resolver fallback', () => { - const startSrc = fs.readFileSync(path.resolve(__dirname, '..', 'bin', 'gstack-skill-start'), 'utf-8'); - const block = /_emit_block unattended-session < { + test('directiveFor(unattended) names destructive or irreversible options as pending', () => { expectMentions(directiveFor('unattended'), [['destructive', 'irreversible', 'pending']], 'hook unattended directive'); }); });