You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr-plan and pr-apply: progress events per wave and component, and the report where a viewer can read it #4007
A viewer of a pull request's apply (a dashboard, behold's kiosk, a person reading the job log) cannot tell which component is applying, which wave it is in, or how each one ended until the job is over, and then only from the summary table. The report that says it all is written to .chant/pr in the job's workspace, which leaves the job only as a CI artifact. chant run --components already streams progress; pr-apply does not.
Current behaviour
packages/core/src/cli/handlers/pr.ts:478: pr-apply calls applyPrSet without onProgress, though applyPrSet takes one (packages/core/src/components/pr-run.ts:208, :232).
packages/core/src/cli/handlers/run.ts:1007-1016: chant run --components --progress-json streams one RunProgressEvent per line (packages/core/src/components/run-progress.ts).
packages/core/src/cli/handlers/pr.ts:233-239: the report, change set and note go to --output only; :273-277 prints one line per member at the end.
Acceptance criteria
pr-plan and pr-apply take --progress-json and stream the same events run --components does: run start with the waves, each wave and component start and end with its status, and the gate's decision (approved, refused with its reason).
Without the flag, pr-apply prints one line as each wave starts and as each component settles, so the job log shows the waves in order.
--report-url <s3 or file URL> (or an equivalent the generators can set) copies pr-<stage>.json and change-set.json where a reader outside the CI system can fetch them, keyed by pull request and commit.
The generated pull-request pipeline passes the flags when its generator option asks for them.
Tests for the events of a two-wave apply and of a refused gate.
#4041 implements the events this issue asks for. chant components pr-plan and pr-apply take --events-json, which prints the run-event stream (run-event.schema.json, contract 1, chant 0.124.28 and newer) to stdout, one line per event. The stream opens with run-start carrying the waves. Planning is a plan phase with a plan step per component. The pull request's gate is a gate phase: gate-resolved names who approved, and gate-waiting carries the refusal's message. On pr-apply, each wave and component start and settle follow with their status, and a refused apply settles gated. --progress-json is not added here, since the RunProgressEvent shape is deprecated in favour of the run-event stream.
Still open in this issue: the human line per wave start and component settle without the flag; --report-url for pr-<stage>.json and change-set.json; the generator option that passes these flags in the generated pull-request pipeline.
From behold (INTENTIUS/behold#679, #711): with #4019, #4041 and #4042 closed, the events exist. The piece behold still needs for CI runs is where they land. In a CI job the store is under the checkout's git directory (run-event-store.ts), which the job discards, so pr-plan and pr-apply events are lost when the job ends.
What would let a viewer follow and replay a pipeline run: CHANT_RUN_EVENTS_DIR documented for CI, and an upload of the run's events (and pr-plan.json / pr-apply.json) to a store a viewer can read, the way terragucci copies its reports to a bucket. The generated pr-loop workflow could set both.
Activity
lex00 commentedon Oct 17, 2026
#4041 implements the events this issue asks for.
chant components pr-planandpr-applytake--events-json, which prints the run-event stream (run-event.schema.json, contract 1, chant 0.124.28 and newer) to stdout, one line per event. The stream opens withrun-startcarrying the waves. Planning is aplanphase with aplanstep per component. The pull request's gate is agatephase:gate-resolvednames who approved, andgate-waitingcarries the refusal's message. On pr-apply, each wave and component start and settle follow with their status, and a refused apply settlesgated.--progress-jsonis not added here, since theRunProgressEventshape is deprecated in favour of the run-event stream.Still open in this issue: the human line per wave start and component settle without the flag;
--report-urlforpr-<stage>.jsonandchange-set.json; the generator option that passes these flags in the generated pull-request pipeline.run events: emitters in the local runtime, components, promote, fan-o…
lex00 commentedon Oct 17, 2026
From behold (INTENTIUS/behold#679, #711): with #4019, #4041 and #4042 closed, the events exist. The piece behold still needs for CI runs is where they land. In a CI job the store is under the checkout's git directory (
run-event-store.ts), which the job discards, so pr-plan and pr-apply events are lost when the job ends.What would let a viewer follow and replay a pipeline run:
CHANT_RUN_EVENTS_DIRdocumented for CI, and an upload of the run's events (and pr-plan.json / pr-apply.json) to a store a viewer can read, the way terragucci copies its reports to a bucket. The generated pr-loop workflow could set both.🤖 Generated with Claude Code