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
|
|
@ -1645,18 +1645,18 @@ and operator tooling can see that the pipeline reached its terminal
|
|||
boundary:
|
||||
|
||||
```bash
|
||||
node ${CLAUDE_PLUGIN_ROOT}/lib/stats/event-emit.mjs \
|
||||
--event main-merge-gate \
|
||||
--payload '{"plan":"{plan-path}","wave_count":{wave-count}}'
|
||||
node ${CLAUDE_PLUGIN_ROOT}/lib/stats/event-emit.mjs --event main-merge-gate --payload - <<'JSON'
|
||||
{"plan":"{plan-path}","wave_count":{wave-count}}
|
||||
JSON
|
||||
```
|
||||
|
||||
Fill in the placeholders yourself; the payload is single-quoted, so the shell
|
||||
expands nothing in it (shell state from an earlier Bash call does not survive,
|
||||
and an expanded variable is how this event used to print `payload-not-json`).
|
||||
`{plan-path}` is the repo-relative plan path — a Voyage plan path
|
||||
(`.claude/projects/<date>-<slug>/plan.md` or
|
||||
`.claude/plans/trekplan-<date>-<slug>.md`) holds no quote character.
|
||||
`{wave-count}` is the number of merged waves, `1` on the single-session path.
|
||||
Fill in the placeholders yourself. The payload goes on stdin through a quoted
|
||||
heredoc, so the shell expands nothing in it: not a variable (shell state from an
|
||||
earlier Bash call does not survive, and an expanded variable is how this event
|
||||
used to print `payload-not-json`), and not a quote character or `$(...)` in the
|
||||
plan path. `{plan-path}` is the repo-relative plan path written as a JSON
|
||||
string (escape a `"` or `\` in it). `{wave-count}` is the number of merged
|
||||
waves, `1` on the single-session path.
|
||||
|
||||
Run each event call as its own command, never chained with `&&`. The writer
|
||||
prints `{"written": true, ...}`. On `"written": false` (exit 1), print its
|
||||
|
|
@ -1679,9 +1679,9 @@ and the merge that publishes the integrated result.
|
|||
|
||||
On confirm:
|
||||
```bash
|
||||
node ${CLAUDE_PLUGIN_ROOT}/lib/stats/event-emit.mjs \
|
||||
--event main-merge-approved \
|
||||
--payload '{"plan":"{plan-path}"}'
|
||||
node ${CLAUDE_PLUGIN_ROOT}/lib/stats/event-emit.mjs --event main-merge-approved --payload - <<'JSON'
|
||||
{"plan":"{plan-path}"}
|
||||
JSON
|
||||
```
|
||||
|
||||
On the multi-session wave path (Phase 2.6), and only when `next-wave` said
|
||||
|
|
@ -1695,14 +1695,13 @@ cleared:
|
|||
|
||||
On decline:
|
||||
```bash
|
||||
node ${CLAUDE_PLUGIN_ROOT}/lib/stats/event-emit.mjs \
|
||||
--event main-merge-declined \
|
||||
--payload '{"plan":"{plan-path}","reason":"hold-for-review"}'
|
||||
node ${CLAUDE_PLUGIN_ROOT}/lib/stats/event-emit.mjs --event main-merge-declined --payload - <<'JSON'
|
||||
{"plan":"{plan-path}","reason":"hold-for-review"}
|
||||
JSON
|
||||
```
|
||||
|
||||
The reason is the literal label of the one decline option, never the
|
||||
operator's free text (free text in a shell argument breaks the JSON and can be
|
||||
expanded by the shell).
|
||||
operator's free text (free text breaks the JSON).
|
||||
|
||||
On decline, nothing is cleared: the merged-waves record is kept.
|
||||
|
||||
|
|
@ -2010,7 +2009,9 @@ node ${CLAUDE_PLUGIN_ROOT}/lib/stats/event-emit.mjs \
|
|||
|
||||
The record lands in `trekexecute-stats.jsonl` in the plugin data directory as
|
||||
`{ts, event, known_event, payload:{flag, signal_effort}}`. The two payload keys
|
||||
stay in the jsonl; the OTel export allowlist drops them by omission.
|
||||
stay in the jsonl; the OTel export allowlist drops them by omission. On
|
||||
`"written": false` (exit 1), print its `reason` in one line and continue — the
|
||||
override record never blocks the run.
|
||||
|
||||
Standard effort (or absent): use `gates_mode = 'adaptive'` (the
|
||||
default). Low effort: `gates_mode = 'open'` plus sequential-only
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue