Repository navigation
terragucci waves: a wave's result from its own report, not its job's exit - #751
Merged
Merged
Conversation
…exit (behold#751) terragucci ends the Forgejo job of a wave that applied what it planned and blocked the rest as a failure (terragucci#1161), so the fan-out kiosks read "wave 3 failed" where wave 3 applied cluster-b's six apps and blocked cluster-a's six. /api/terragucci now carries `results`: each wave's state, applied, unchanged, failed and blocked roots from its newest report, for the newest four tf-apply commits. The event-help facts (the tip pill, the This cycle trail, the failure modal) and the wave box titles prefer it, and use the job's status only where no report of the wave is read, or the report is older than the job. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the terragucci fan-out kiosks (fan-out-tofu, fan-out-choudoufu), the fix chapter showed a "wave 3 failed" pill. In the change merge's failed run, wave 3 applied cluster-b's six apps and blocked cluster-a's six. terragucci ends that wave's Forgejo job as a failure on purpose (terragucci#1161), so the commit status isn't green while roots are unapplied. The wave's report.json says what happened:
state: "applied", withblockedandoutcomes.behold now words a terragucci wave's result from its report, and uses the job status only when no report of that wave is read (or the report is older than the job, i.e. an earlier run's on the same commit).
What changed
src/terragucci-reports.ts:waveResult()andTerragucciRead.results. Each wave's state, applied, unchanged, failed and blocked roots, by commit, for the newest 4 tf-apply commits, each wave by its newest report (the reports are already in the read's cache).src/terragucci-view.ts:/api/terraguccipassesresultsthrough.web/terragucci-change.js:waveResultOf(answer, commit, wave, { after }),resultWords,resultTone,resultFailed,resultBlocked. Words: "applied 6, 6 blocked by cluster-a", "6 blocked by cluster-a", "1 failed, 1 applied".web/kiosk-event-help.js(the tip pill, the "This cycle" trail, and the failure modal, which opens from afailedfact):failedfact. That applies to the current run's jobs (failedJob) and to the cycle's earlier runs (pastFailures).blockedfact instead: "wave 3 applied 6, 6 blocked by cluster-a", or "wave 3: 6 blocked by cluster-a" when nothing ran. It replaces the plain "wave 3 applied" for that run.pastBlocked) still lead to "wave 3 runs again" in the fix's apply.web/terragucci-components-live.js:reportStatus(). A wave box whose job failed reads the report: "apply-wave-3 · applied 6, 6 blocked by cluster-a", in the blocked tone. This covers the kiosk's and Inspect's wave box titles.A wave that really failed still reads failed: wave 2, where cluster-a failed, has report state
failed.Places that word a wave from its job status, and what happened to each
kiosk-event-help.jscycleFacts,failedJob(pill, trail, modal)failuregave "wave N failed"kiosk-event-help.jsehSnapshotpastFailures(fix chapter's pill/trail)failuregave "wave N failed"pastBlockedkiosk-event-help-ui.jsfailure modal titleWave N failedterragucci-components-live.jscomponentMarkswave title (jobStatus,JOB_WORDS.failure)kiosk-watch.jsresultModel(result card's per-wave rows)appliedkiosk-watch.jsactiveWavefailurepicks the framed wave, but only before the run view has the cyclekiosk.jstrace drawer head (tr.trace.result)kiosk-runs.js(Runs pane,statusIcon,defaultJob) andkiosk-watch.jstailLines(the drawer's log tail)terragucci-lifecycle.js,kiosk-annotations.jsChant repos are unaffected. Their waves come from chant's run events (
chantWaves, which already say "wave 3 applied 6; 6 blocked"), not from job statuses.Tests
src/__fixtures__/terragucci-wave-results/: a real fan-out-choudoufu cycle (605) from the demo bucket. It has the change merge 2a615596 (run 6745: wave 2 failed, wave 3 applied 6 and blocked 6 by cluster-a, both jobsfailure) and the fix merge 5cfbdb79 (run 6748). The tf-apply reports are trimmed to run, roots and waves.src/terragucci-wave-results.test.ts: the read'sresults, andwaveResulton older reports.web/terragucci-wave-results.test.js:npm test: 238 files passed, 6 skipped (3686 tests passed, 20 skipped).tsc --noEmitandnpm run buildboth pass.Live
Served on :4641 against the shared stack and recorded /choudoufu-fanout and /tofu-fanout through the failure and fix chapters. Wave 2 still reads failed: its tip, its "Wave 2 failed" modal, and its box. In the fix chapter, the tip over wave 3 now reads "wave 3 applied 6, 6 blocked by cluster-a", where it used to read "wave 3 failed". The trail reads: wave 1 applied: 1 updated > wave 2 failed > wave 3 applied 6, 6 blocked by cluster-a.
🤖 Generated with Claude Code