mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-12 19:44:48 +01:00
qa: replace WTF point table with named signals and a plain stop rule (s07 M9)
The self-regulation check keeps its cadence (every 5 fixes or after a revert), its signals (reverts, unrelated files, sprawl, long runs, low-severity tail), STOP-and-ask, and the 50-fix hard cap. The percentage table goes; the stop threshold (two reverts, or one unrelated-file edit) stops at least as early. W7a pins: qa-browser-preservation:220 drops 'WTF > 20%' and checks the signals case-insensitively; skill-validation:1250 checks the test-only exclusion rule instead of the heading name; carve-guards qa anchor 'WTF-LIKELIHOOD' becomes the '### 8f. Self-Regulation' heading. Template-only commit: generated SKILL.md is expected red until the regeneration commit.
This commit is contained in:
1 parent
c66b3af851
commit
0d9f77bd08
4 files changed
+9
-15
No files matched your search
+5
-12
@@ -238,19 +238,12 @@ Healthy-contract commits use `test(qa): regression test for {contract}`.
|
||||
|
||||
### 8f. Self-Regulation (STOP AND EVALUATE)
|
||||
|
||||
Every 5 fixes (or after any revert), compute the WTF-likelihood:
|
||||
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.
|
||||
|
||||
```
|
||||
WTF-LIKELIHOOD:
|
||||
Start at 0%
|
||||
Each revert: +15%
|
||||
Each fix touching >3 files: +5%
|
||||
After fix 15: +1% per additional fix
|
||||
All remaining Low severity: +10%
|
||||
Touching unrelated files: +20%
|
||||
```
|
||||
|
||||
**If WTF > 20%:** STOP immediately. Show the user what you've done so far. Ask whether to continue.
|
||||
**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.
|
||||
|
||||
**Hard cap: 50 fixes.** After 50 fixes, stop regardless of remaining issues.
|
||||
|
||||
|
||||
@@ -649,7 +649,7 @@ do not launch the downstream skill or open a browser.`,
|
||||
'## Phase 7: Triage',
|
||||
'## Phase 8: Fix Loop',
|
||||
'8e.5. Regression Test',
|
||||
'WTF-LIKELIHOOD',
|
||||
'### 8f. Self-Regulation',
|
||||
'## Additional Rules (qa-specific)',
|
||||
'## Output Structure',
|
||||
],
|
||||
|
||||
@@ -217,7 +217,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)', 'WTF > 20%', 'STOP immediately', 'Ask whether to continue', 'Hard cap: 50 fixes']) expect(regulation).toContain(rule);
|
||||
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);
|
||||
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);
|
||||
|
||||
@@ -1247,7 +1247,7 @@ describe('Phase 8e.5 regression test generation', () => {
|
||||
const content = fs.readFileSync(path.join(ROOT, 'qa', 'SKILL.md'), 'utf-8');
|
||||
expect(content).toContain('8e.5. Regression Test');
|
||||
expect(content).toContain('test(qa): regression test');
|
||||
expect(content).toContain('WTF-likelihood exclusion');
|
||||
expect(content).toMatch(/test-only commits do not count/i);
|
||||
});
|
||||
|
||||
test('qa/SKILL.md Rule 13 is amended for regression tests', () => {
|
||||
|
||||
Reference in new issue
Block a user