fix(execute): the Phase 8 payload goes on stdin; /trekreview findings closed
/trekreview of 5680591..84a0621 (verdict WARN: 0 BLOCKER, 3 MAJOR, 1 MINOR,
1 MAJOR suppressed as unverified for length only). All closed red -> green:
- Suppressed MAJOR 1d0171a7 (verified live): Phase 8 spliced {plan-path}
into a single-quoted --payload. A lone quote broke the shell parse (event
lost, no written:false to report); a quoted pair ran a command
substitution and still reported written:true. event-emit now reads
`--payload -` from stdin and the three Phase 8 blocks pass the payload
through a quoted heredoc. Checked under bash and zsh.
- 570ba19b: the SC5 set-step extractor read line by line and never saw the
wrapped Step 0 sentinel (`blocked`); it now matches across the break and
the test asserts `blocked` is read.
- c69a865a: the Phase 9 line_ref in jsonl-schemas.md was 9 lines off. Both
trekexecute rows are now pinned to the exact span by a test.
- 0004fa23 (MINOR): the gates_mode_flag_override block says what to do on
written:false (print the reason, continue).
- emit() docstring no longer says failures are swallowed silently.
- 7ffaede5: chosen to KEEP the prose-only legacy `passed` tolerance, because
a public-plugin run started under the 6.1.0 prose would otherwise re-run
every finished step on resume; recorded as an accepted deviation in the
(local-only) brief. No code change.
Suite 1400 (1398/0/2), was 1393.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
84a0621fcc
commit
cb68c4f125
7 changed files with 130 additions and 28 deletions
|
|
@ -2067,6 +2067,38 @@ test('order fields: the trekbrief-stats row\'s line_ref still points at the Phas
|
|||
assert.ok(at >= Number(m[1]) && at <= Number(m[2]), `line_ref ${ref} does not contain the stats-append line (line ${at})`);
|
||||
});
|
||||
|
||||
/** The jsonl-schemas fixture row whose schema_id cell is `id`, split into cells. */
|
||||
function schemaRow(id) {
|
||||
const row = read('tests/fixtures/jsonl-schemas.md').split('\n').find((l) => l.startsWith(`| ${id} |`));
|
||||
assert.ok(row, `jsonl-schemas.md is missing the \`${id}\` row`);
|
||||
return row.split('|').map((c) => c.trim());
|
||||
}
|
||||
|
||||
// The Phase 9 line_ref was measured, then more prose landed above Phase 9 and
|
||||
// nothing re-measured it. Pinned to the span it names: heading to closing fence.
|
||||
test('the trekexecute Phase 9 row\'s line_ref spans the Phase 9 heading to the end of its stdin block', () => {
|
||||
const ref = schemaRow('trekexecute-stats (Phase 9 record)')[4];
|
||||
const m = ref.match(/^trekexecute\.md:(\d+)-(\d+)$/);
|
||||
assert.ok(m, `line_ref "${ref}" is not trekexecute.md:A-B`);
|
||||
const lines = read('commands/trekexecute.md').split('\n');
|
||||
const heading = lines.findIndex((l) => /^## Phase 9\b/.test(l)) + 1;
|
||||
const append = lines.findIndex((l) => /^\s*node \$\{CLAUDE_PLUGIN_ROOT\}\/lib\/stats\/stats-append\.mjs trekexecute\b/.test(l)) + 1;
|
||||
const fence = lines.findIndex((l, i) => i >= append && l.trim() === '```') + 1;
|
||||
assert.ok(heading > 0 && append > heading && fence > append, 'Phase 9 heading, stats-append line and closing fence');
|
||||
assert.equal(ref, `trekexecute.md:${heading}-${fence}`);
|
||||
});
|
||||
|
||||
test('the autonomy-events row\'s line_ref spans emit() in event-emit.mjs', () => {
|
||||
const ref = schemaRow('trekexecute-stats (autonomy events)')[4];
|
||||
const m = ref.match(/^event-emit\.mjs:(\d+)-(\d+)$/);
|
||||
assert.ok(m, `line_ref "${ref}" is not event-emit.mjs:A-B`);
|
||||
const lines = read('lib/stats/event-emit.mjs').split('\n');
|
||||
const start = lines.findIndex((l) => l.startsWith('export function emit(')) + 1;
|
||||
const end = lines.findIndex((l, i) => i >= start && l === '}') + 1;
|
||||
assert.ok(start > 0 && end > start, 'emit() and its closing brace');
|
||||
assert.equal(ref, `event-emit.mjs:${start}-${end}`);
|
||||
});
|
||||
|
||||
test('order fields: docs/architecture.md Stats names them and the order-id join', () => {
|
||||
const text = read('docs/architecture.md');
|
||||
const stats = text.slice(text.indexOf('\nStats:'), text.indexOf('\n## Terminology'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue