fix(review): pass Review Army checklists by path, run research alongside dispatch, always probe the design detector; state review-log invocation and statuses in the caller fixture

- review-army-perf-n-plus-one: the parent copied full checklists into agent
  prompts and ran web research before dispatch (290 s on a 12-line diff); 212 s now.
- review-design-lite: 5 of 6 captured trials reported the detector absent
  without probing; the probe is mandatory and its first line is reported, and
  the contract credits only fake-engine rule ids the checklist never names.
- review-exploratory-small-cli: the fixture never gave review-log's direct
  invocation or status vocabulary; the model ran it through bun and wrote
  status "blocked". The prompt states both and the validator rejects
  out-of-vocabulary review statuses.
Each case passed a focused paid run after repair.
This commit is contained in:
garrytan committed 2026-09-29 22:49:12 +00:00
1 parent a18e6cf655
commit a06d22e52a
15 files changed
+155 -62

No files matched your search

+23
View File
@@ -118,6 +118,29 @@ describe('caller native-event observer controls', () => {
expect(validateCallerEvidence(observed)).toContain('review completion preceded handoff freshness decision');
});
test('captured gate-census-5 review record: bun-wrapped helper and receipt status are outside the interface', () => {
// ci-36629958451-1-gate-census-5 review-exploratory-small-cli, native events 68 and 70 (fixture paths shortened).
const record = (status: string) => `/runtime/bin/gstack-review-log '{"skill":"review","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","commit":"'"$(git rev-parse --short HEAD)"'","branch":"caller-change","status":"${status}","completed":false,"converged":false,"critical":1,"informational":0,"findings":[{"path":"scale.ts","line":3,"category":"functional-contract","severity":"CRITICAL","fingerprint":"scale.ts:3:functional-contract","action":"ask-pending"}]}' --finish d45404cf-ba19-4bc6-a505-9801e9322f54`;
const errorsFor = (command: string, caller: 'review' | 'ship' = 'review') => {
const observed = { ...evidence(), caller };
observed.result.transcript.push(...nativeCall('record', 'Bash', { command }, 'Saved'));
return validateCallerEvidence(observed);
};
expect(errorsFor(`bun ${record('blocked')}`)).toContain('command outside declared caller observation interface');
expect(errorsFor(record('blocked'))).toEqual(['review record status outside the review vocabulary: blocked']);
expect(errorsFor(record('issues_found'))).toEqual([]);
expect(errorsFor(record('unavailable'))).toEqual(['review record status outside the review vocabulary: unavailable']);
expect(errorsFor(record('unavailable'), 'ship').filter(error => error.includes('vocabulary'))).toEqual([]);
expect(errorsFor(generatedReviewRecord('/runtime/bin/gstack-review-log', 'native-token').replace('"status":"clean"', '"status":"blocked"'))).toEqual([]);
const prompt = (id: 'review-exploratory-small-cli' | 'ship-exploratory-small-cli') => {
const fixture = createQaCallerFixture(id, { installRuntime: false });
try { return qaCallerSessionOptions(fixture, 'free-control').prompt; } finally { fs.rmSync(fixture.root, { recursive: true, force: true }); }
};
expect(prompt('review-exploratory-small-cli')).toContain("/bin/gstack-review-log '<JSON>' --finish <token>`, never through bun");
expect(prompt('review-exploratory-small-cli')).toContain('otherwise issues_found; a review stopped at a gate records completed:false');
expect(prompt('ship-exploratory-small-cli')).toContain('otherwise issues_found (unavailable for missing dispatched reviewer output)');
});
test('a later unchanged handoff reread does not invalidate an already completed freshness decision', () => {
const observed = evidence();
observed.result.transcript.push(