test(shared-libs): trim the resumed review replays' setup and report

Every sibling review session (revalidation, path-eligibility, index-flags,
prior-coverage) loaded qa/sections/exploratory.md and often scope.md although
its QA and native adversarial results are supplied synthetic inputs, then spent
a second request on shared-code-reuse.md and base metadata. The resumed scope
now states that the supplied results replace Step 4's QA method loading; the
revalidation contract names one first response (workflow, checklist, finding,
prerequisites, shared-code-reuse.md, base metadata) and caps the summary at
twelve lines. Receipt order, direct source reads, the checker, the question and
final persistence are unchanged.
This commit is contained in:
garrytan committed 2026-09-30 19:36:02 +00:00
1 parent ea7fbbcb7c
commit cc044e5f89
2 files changed
+13 -4

No files matched your search

+7 -1
View File
@@ -119,7 +119,9 @@ describe('bounded shared-code revalidation prompt', () => {
for (const requirement of ['not evidence that this model executed those stages', 'never actual native coverage credit',
'Missing, failed, blocked, malformed or stale prerequisites require noncompletion', 'unchanged COMPLETED and CONVERGED rules',
'Any source, branch, base, index or configuration change invalidates', 'do not regenerate them',
'A finding that requires edits blocks this bounded replay', resumed.input, resumed.checkCommand]) expect(prompt).toContain(requirement);
'A finding that requires edits blocks this bounded replay', resumed.input, resumed.checkCommand,
"replace Step 4's early QA selection and method-loading prerequisites", 'read no QA scope or method assets']) expect(prompt).toContain(requirement);
expect(original).not.toContain('read no QA scope or method assets');
expect(prompt.slice(prompt.indexOf('Revalidation fixture execution contract:')))
.toBe(original.slice(original.indexOf('Revalidation fixture execution contract:')));
const production = fs.readFileSync(path.join(SHARED_LIBS_ROOT, 'review/SKILL.md.tmpl'), 'utf8');
@@ -141,6 +143,10 @@ describe('bounded shared-code revalidation prompt', () => {
expect(contract).toContain('Do not read the diff until step 2 verifies the start record');
expect(contract.indexOf('Read that token\'s record')).toBeLessThan(contract.indexOf('Then read the diff in a subsequent call'));
expect(contract).not.toMatch(/[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}/);
expect(prompt).toContain(`${SHARED_LIBS_ROOT}/review/sections/shared-code-reuse.md (Step 5.0 requires it for the supplied prior Skip)`);
expect(prompt.indexOf('Your first response holds')).toBeLessThan(prompt.indexOf("gstack-review-log' --start review"));
expect(prompt).toContain('Keep the final review summary to at most twelve lines');
expect(base).not.toContain('Keep the final review summary');
expect(contract).toContain('Batch independent required source reads');
expect(contract).toContain('Preserve every required evidence check and dependency');
expect(contract).toContain('complete, untruncated read-back');