From 946c8c9f2e9fc0fd82b3358bcad645df1d03dd26 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 05:02:36 +0000 Subject: [PATCH] qa: plain self-regulation stop rule; drop the report template's link to an index.md nothing writes --- qa/SKILL.md.tmpl | 12 +++++------- qa/templates/qa-report-template.md | 1 - test/qa-browser-preservation.test.ts | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/qa/SKILL.md.tmpl b/qa/SKILL.md.tmpl index b2451924c..b2deacdb4 100644 --- a/qa/SKILL.md.tmpl +++ b/qa/SKILL.md.tmpl @@ -234,16 +234,14 @@ Record the test created before repair in 8a.5 and its re-test result from 8c: file, command, attribution, tested boundary, value card and red/green evidence, or why it is deferred. This step records results; it does not create another test. Healthy-contract commits use `test(qa): regression test for {contract}`. -**WTF-likelihood exclusion:** test-only commits do not count toward the heuristic. +**Self-regulation exclusion:** test-only commits do not count toward the stop rule in 8f. ### 8f. Self-Regulation (STOP AND EVALUATE) -Every 5 fixes (or after any revert), judge the WTF-likelihood: is the loop now doing -more harm than good? Reverts, edits to unrelated files, fixes spanning many files, a -long run of fixes, and a queue of only Low issues all raise it. - -**If it is high** (two reverts or one unrelated-file edit is enough): STOP immediately. -Show the user what you've done so far. Ask whether to continue. +Every 5 fixes, and after any revert, check whether the loop is doing more harm than +good. **STOP immediately** after two reverts or one edit to a file unrelated to the +finding. Also stop when fixes keep spanning many files or only Low issues remain. +Show the user what you've done so far and ask whether to continue. **Hard cap: 50 fixes.** After 50 fixes, stop regardless of remaining issues. diff --git a/qa/templates/qa-report-template.md b/qa/templates/qa-report-template.md index 439a80ba4..f827d7581 100644 --- a/qa/templates/qa-report-template.md +++ b/qa/templates/qa-report-template.md @@ -13,7 +13,6 @@ | **Pages visited** | {COUNT} | | **Screenshots** | {COUNT} | | **Framework** | {DETECTED or "Unknown"} | -| **Index** | [All QA runs](./index.md) | ## Health Score: {SCORE}/100 diff --git a/test/qa-browser-preservation.test.ts b/test/qa-browser-preservation.test.ts index 521e79d1d..3d3f9604c 100644 --- a/test/qa-browser-preservation.test.ts +++ b/test/qa-browser-preservation.test.ts @@ -229,8 +229,8 @@ describe('compact QA browser recipes retain native operations', () => { const classification = section('### 8e.', '### 8e.5.'); for (const rule of ['passed 8c', 'native regression when available', 'disclose missing test coverage', "undo only this run's repair", 'revert its commit if already committed', 'retain the valid regression/evidence', '"deferred"', 'Never discard user changes']) expect(classification).toContain(rule); const regulation = section('### 8f.', '## Phase 9:'); - for (const rule of ['Every 5 fixes (or after any revert)', 'STOP immediately', 'Ask whether to continue', 'Hard cap: 50 fixes']) expect(regulation).toContain(rule); - for (const signal of [/WTF-likelihood/i, /revert/i, /unrelated/i]) expect(regulation).toMatch(signal); + for (const rule of [/every 5 fixes/i, /after any revert/i, /STOP immediately/i, /ask whether to continue/i, /Hard cap: 50 fixes/]) expect(regulation).toMatch(rule); + for (const signal of [/STOP immediately/i, /revert/i, /unrelated/i]) expect(regulation).toMatch(signal); expect(source).toContain('When in doubt, stop and ask'); const rules = source.slice(source.indexOf('## Additional Rules')); for (const rule of ['Outside an explicitly approved browser bootstrap', 'Only create tests through authorized codification in Phase 8a.5', 'Never modify CI configuration or weaken existing tests', 'use new native test files']) expect(rules).toContain(rule);