mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-10 15:09:00 +02:00
fix(test): kill the silent-truncation race; exempt the tier-corrected shrinks
The full-suite shakeout (budgeted by the plan) surfaced both immediately: 1. server-embedder-terminal-port.test.ts stubbed process.exit and restored the REAL exit in its finally — but shutdown() schedules async work that can call process.exit AFTER restoration, killing the entire bun process mid-suite with exit 0 and NO summary. This is the silent-truncation class the new free-suite CI job guards against, reproduced locally on the first full run. Exit now stays a logging no-op between tests (late async exits become visible stderr lines, not process death); the true exit returns in afterAll. 2. The 80%-of-baseline shrink guard correctly flagged the six tier-corrected skills — their baseline was measured at the silent tier-4 default. Added to INTENTIONAL_SHRINKS with the reason, joining spec's double-preamble entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
593be14c49
commit
be2f3c286a
@@ -171,7 +171,16 @@ describe('SKILL.md size budget regression (gate, free)', () => {
|
||||
// {{PREAMBLE}} literally, so the generator expanded the ENTIRE preamble a
|
||||
// second time mid-sentence (~47 KB of duplication). Fixed by rewording the
|
||||
// prose; spec/SKILL.md now carries exactly one preamble (~80.9 KB, ×0.79).
|
||||
const INTENTIONAL_SHRINKS = new Set<string>(['spec']);
|
||||
// - scrape/diagram/open-gstack-browser/landing-report/pair-agent/skillify:
|
||||
// the baseline measured these at the silent tier-4 default (a missing
|
||||
// preamble-tier frontmatter fell through `?? 4`). Their tiers are now
|
||||
// declared correctly (1-2), shedding the tier-2..4 onboarding prose they
|
||||
// never should have carried (-271 lines each for tier 1).
|
||||
const INTENTIONAL_SHRINKS = new Set<string>([
|
||||
'spec',
|
||||
'scrape', 'diagram', 'open-gstack-browser',
|
||||
'landing-report', 'pair-agent', 'skillify',
|
||||
]);
|
||||
|
||||
const undershoots: Array<{
|
||||
skill: string; beforeBytes: number; afterBytes: number; ratio: number;
|
||||
|
||||
Reference in New Issue
Block a user