fix(review): the coordinator and orchestrator texts say what the code does on refutation and the brief-conflict exception
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
878871a6ad
commit
738efa3e24
6 changed files with 70 additions and 7 deletions
|
|
@ -15,6 +15,14 @@
|
|||
// no longer say "still untracked".
|
||||
// M3 The "Back to planning" save line runs its git diff with --no-relative,
|
||||
// so a session in a subdirectory with diff.relative on saves every file.
|
||||
// M9 The review coordinator's Pass 2 text says what the lib does: a root
|
||||
// escape or a negative line refutes a finding; any other line number
|
||||
// alone never does, and a line past the end goes to `unverified`.
|
||||
// M2 The four flag-table summaries of `--quick` (trekreview, orchestrator,
|
||||
// command-modes, README) name the brief-conflict rule as the exception
|
||||
// to the Pass 3 skip.
|
||||
// K3 The orchestrator's 4-pass item 3 names the brief-conflict lowering as
|
||||
// the exception to the catalogue reset.
|
||||
// No static import of a new export: the file must load at be0b631.
|
||||
// Fix the SOURCE a pin guards, not the pin.
|
||||
|
||||
|
|
@ -143,3 +151,54 @@ test('[M3] the back-to-planning save line carries --no-relative', () => {
|
|||
assert.match(m[1], /^git (?:-c \S+ )*diff (?:--\S+ )*--no-relative (?:--\S+ )*\{start_sha\}$/,
|
||||
`the save line's git diff does not carry --no-relative: ${m[1]}`);
|
||||
});
|
||||
|
||||
// --- M9 ----------------------------------------------------------------------------
|
||||
|
||||
test('[M9] the coordinator text does not say a line number alone never refutes', () => {
|
||||
const coord = flat(read('agents/review-coordinator.md'));
|
||||
assert.doesNotMatch(coord, /\bA line number alone never refutes/,
|
||||
'agents/review-coordinator.md still says a line number alone never refutes, next to a negative line that does');
|
||||
const p2 = between('agents/review-coordinator.md', '### Pass 2 — HubSpot Judge filters', '### Pass 3 — ');
|
||||
assert.ok(sentencesWith(p2, 'a citation that escapes the repo root, or a negative line, refutes the finding').length > 0,
|
||||
'Pass 2 no longer says a root escape or a negative line refutes the finding');
|
||||
const hits = sentencesWith(p2, 'line number alone never refutes');
|
||||
assert.ok(hits.some((s) => /\b[Aa]ny other line number alone never refutes\b/.test(s)
|
||||
&& /`unverified` \(`accuracy:line-out-of-range`\)/.test(s)),
|
||||
`no Pass 2 sentence says any other line number alone never refutes and goes to \`unverified\`: ${hits.join(' | ')}`);
|
||||
});
|
||||
|
||||
// --- M2 ----------------------------------------------------------------------------
|
||||
|
||||
/** The one line of `rel` that starts with `prefix` and holds `needle`. */
|
||||
function oneLine(rel, prefix, needle) {
|
||||
const hits = read(rel).split('\n').filter((l) => l.startsWith(prefix) && l.includes(needle));
|
||||
assert.equal(hits.length, 1, `${rel} must hold exactly one line starting "${prefix}" with "${needle}"; found ${hits.length}`);
|
||||
return hits[0];
|
||||
}
|
||||
|
||||
const BRIEF_CONFLICT_SKIP = /the coordinator's reasonableness filter,? except the brief-conflict rule\b/;
|
||||
|
||||
test('[M2] each of the four flag-table summaries names the brief-conflict exception', () => {
|
||||
const summaries = [
|
||||
['commands/trekreview.md --quick row', oneLine('commands/trekreview.md', '| `--quick` |', 'reasonableness filter')],
|
||||
['agents/review-orchestrator.md quick mode', flat(between('agents/review-orchestrator.md', '- `quick` — ', '- `validate` — '))],
|
||||
['docs/command-modes.md --quick row', oneLine('docs/command-modes.md', '| `--quick` |', 'reasonableness filter')],
|
||||
['README.md Quick row', oneLine('README.md', '| **Quick** | `/trekreview ', 'reasonableness filter')],
|
||||
];
|
||||
for (const [where, text] of summaries) {
|
||||
assert.match(text, BRIEF_CONFLICT_SKIP, `${where} skips the reasonableness filter without the brief-conflict exception: ${text}`);
|
||||
}
|
||||
});
|
||||
|
||||
// --- K3 ----------------------------------------------------------------------------
|
||||
|
||||
test('[K3] orchestrator item 3 names the brief-conflict lowering as the exception to the reset', () => {
|
||||
const item = flat(between('agents/review-orchestrator.md', '3. **Cloudflare reasonableness**', '4. **Compute verdict**'));
|
||||
const at = item.indexOf('reset a severity that does not match its catalogue tier.');
|
||||
assert.ok(at !== -1, `item 3 no longer resets a severity to its catalogue tier: ${item}`);
|
||||
const next = sentencesWith(item.slice(at + 'reset a severity that does not match its catalogue tier.'.length), ' ')[0] ?? '';
|
||||
assert.match(next, /\bexception to (the|this) reset\b/, `the sentence after the reset does not name an exception to it: ${next}`);
|
||||
assert.match(next, /brief-conflict lowering/, `the exception to the reset is not the brief-conflict lowering: ${next}`);
|
||||
assert.match(next, /MAJOR[^.]*\bMINOR\b/, `the exception does not say a MAJOR drops to MINOR: ${next}`);
|
||||
assert.match(next, /`brief_lowered_from: MAJOR`/, `the exception does not name brief_lowered_from: MAJOR: ${next}`);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue