From 47985fbe3bb93c3f27b6187ce95902f8a1ff23f1 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Wed, 27 May 2026 08:53:39 -0700 Subject: [PATCH] fix(ci): bump PHASE_SCOPE assertion to 21 + fix skill-optimizer Anti-Patterns case Two CI failures pre-existing on this branch since the v0.42.0.0 skillopt cathedral landed; master is green because skillopt didn't exist there yet. 1. test/phase-scope-coverage.test.ts asserted ALL_PHASES.length === 20. skillopt is the 21st phase. Bumped to 21 with v0.42.0.0 history line in the comment chain. Sibling fix to the cycle.serial.test.ts bump in commit 08ad2468. 2. skills/skill-optimizer/SKILL.md had `## Anti-patterns` (lowercase p). skills-conformance.test.ts asserts `## Anti-Patterns` (capital P) as the required section header. Single-character rename. Local: 174 skillopt-surface tests + 6 phase-scope tests + 249 skills- conformance tests all green. Typecheck clean. Remaining CI delta: 5 put_page facts backstop failures in shard 10 that reproduce only on Linux CI, not locally even with empty env / cleared HOME / max-concurrency=1. The error surface is `r.isError === true` with no further detail captured in the bun:test output. Pushing these 2 fixes first to narrow the CI signal; will instrument if the 5 persist. Co-Authored-By: Claude Opus 4.7 (1M context) --- skills/skill-optimizer/SKILL.md | 2 +- test/phase-scope-coverage.test.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/skills/skill-optimizer/SKILL.md b/skills/skill-optimizer/SKILL.md index a7c7a9087..1b0eb7e12 100644 --- a/skills/skill-optimizer/SKILL.md +++ b/skills/skill-optimizer/SKILL.md @@ -89,7 +89,7 @@ When invoked, this skill produces: - `skills//skillopt/rejected.json` — bounded LRU of rejected edits - `~/.gbrain/audit/skillopt-YYYY-Www.jsonl` — ISO-week-rotated audit trail -## Anti-patterns +## Anti-Patterns - **Don't bypass the validation gate.** The median-of-3 + epsilon=0.05 is load-bearing; without it, the optimizer accepts noise as improvement. diff --git a/test/phase-scope-coverage.test.ts b/test/phase-scope-coverage.test.ts index 547e9ba3b..503b2449d 100644 --- a/test/phase-scope-coverage.test.ts +++ b/test/phase-scope-coverage.test.ts @@ -41,14 +41,15 @@ describe('PHASE_SCOPE coverage', () => { expect(invalid).toEqual([]); }); - test('all 20 phases covered (regression on accidental omission)', () => { + test('all 21 phases covered (regression on accidental omission)', () => { // Pin the count so a future PR that adds a phase to ALL_PHASES // without updating PHASE_SCOPE notices here too. The v0.39.1.0 // master merge brought in the 17th phase (`schema-suggest`); v0.41 // adds 'extract_atoms' + 'synthesize_concepts' (T9 lens packs) + - // 'conversation_facts_backfill' (v0.41.11.0) for a total of 20. - expect(ALL_PHASES.length).toBe(20); - expect(Object.keys(PHASE_SCOPE).length).toBe(20); + // 'conversation_facts_backfill' (v0.41.11.0) for 20. v0.42.0.0 + // adds 'skillopt' (self-evolving skills cycle phase) for a total of 21. + expect(ALL_PHASES.length).toBe(21); + expect(Object.keys(PHASE_SCOPE).length).toBe(21); }); test('embed remains global (the headline brain-wide phase)', () => {