From 3ef4be8783047d6a239e2676a00a5131fc14efba Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 26 Oct 2026 00:47:56 +0000 Subject: [PATCH] test(section-manifest): the shared sections/preamble.md renders from the hoist resolver, not a section template (GSTA-96) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- CHANGELOG.md | 1 + test/section-manifest-consistency.test.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b015ba08..432d5a13b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - `test/helpers/skill-startup.ts` (new): `readSkillStartup` (SKILL.md with the shared file spliced in at its pointer, the reading order a skill sees) and `readSkillEffective` (each preamble section once, with this skill's variant applied). Tests that assert preamble rules are in context, E2E fixture extractors, workflow-judge bundles and install checks read these instead of SKILL.md alone; judge bundles keep their pre-hoist content. - `test/helpers/carve-guards.ts`: parity caps for ship, review, autoplan, spec, land-and-deploy, design-consultation, plan-devex-review, plan-ceo-review, office-hours and plan-eng-review raised to their measured unions (owner-approved, Garry 2026-10-25: "do it"), each with its reason. The union now includes the shared file, and office-hours and plan-eng-review count their own copies of shared sections twice until a follow-up dedupes them. - `test/fixtures/skill-md-size-allowlist.json`: 63 pins lowered and 26 deleted (now within the 100,000-character limit). None raised. The deferral note (owner Garry, revisit 2026-11-15) is retired here and in `test/skill-md-size-guard.test.ts`. +- `test/section-manifest-consistency.test.ts`: the generated-orphan check exempts the shared `sections/preamble.md`, which renders from `scripts/resolvers/preamble-hoist.ts` rather than a section template; it still must carry the AUTO-GENERATED header, and the generation freshness check covers its content. `test/paid-pr-profile.test.ts` covers the planner change. - Ship goldens regenerated. 27 paid-test touchfile keys gain `test/helpers/skill-startup.ts`. One existing test-typecheck diagnostic fixed and its baseline lowered. ### Gate integrity diff --git a/test/section-manifest-consistency.test.ts b/test/section-manifest-consistency.test.ts index 50a19f11d..45ad206a5 100644 --- a/test/section-manifest-consistency.test.ts +++ b/test/section-manifest-consistency.test.ts @@ -21,6 +21,7 @@ import { describe, test, expect } from 'bun:test'; import * as fs from 'fs'; import * as path from 'path'; +import { SHARED_PREAMBLE_FILE } from './helpers/skill-startup'; const ROOT = path.resolve(import.meta.dir, '..'); @@ -77,7 +78,7 @@ describe('section manifest ↔ filesystem consistency', () => { }); test('no generated orphan: every sections/X.md has a sections/X.md.tmpl → FAIL', () => { - const orphans = sectionMds.filter(md => !sectionTmpls.includes(`${md}.tmpl`)); + const orphans = sectionMds.filter(md => md !== SHARED_PREAMBLE_FILE && !sectionTmpls.includes(`${md}.tmpl`)); expect(orphans).toEqual([]); });