Skip to content

terragucci repos: blocked roots, and the chant kiosk's story for chapter-carrying scenarios (behold#741) - #742

Merged
lex00 merged 2 commits into
mainfrom
tg-blocked-chapters
Oct 18, 2026
Merged

lex00 merged 2 commits into
mainfrom
tg-blocked-chapters

Conversation

@lex00

@lex00 lex00 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #741.

Two parts. A terragucci repo now reads the blocked roots that terragucci#1164 writes. And the kiosk features #740 built for chant's loop turn on for a terragucci repo when demo.json's step carries chapter.

Blocked roots (terragucci#1164, report minor 41)

  • Server. src/terragucci-reports.ts reads waves[].blocked: [{ root, blocked_by }], the snake_case shape ask demo: serve it as a Cloudflare Worker, and a docs page for it #1164 writes.
    • waveBlocked reads one wave's rows and skips malformed ones.
    • readTerragucci folds the newest tf-apply commit's waves, each wave by its newest report, into blocked: { commit, roots: { <root>: { wave, by } } }.
    • /api/terragucci passes that on. It is absent when no wave blocked anything, so it is always absent for reports before minor 41.
    • ReportWaveState and the run view's wave state gain blocked.
    • unsettled keeps watching a run view past a failure only when one of its waves is blocked, because a run that blocks roots goes on after the failure. A run view without a blocked wave behaves as before.
  • Web. web/terragucci-change.js adds blockedOf(answer, progress).
    • It takes the answer's blocked when it belongs to the run view's commit. It also takes every root of a wave whose run-view state is blocked, with no blocker named until that wave's report has been read.
    • A blocked root is never counted as unchanged. It never planned, so its wave's changed leaves it out.
    • rootStates gives a blocked root "wave N · blocked by X" with tone wait, the tone chant's blocked cards use.
    • waveRows and the wave boxes in web/terragucci-components-live.js show the header "3 applied, 6 blocked by cluster-a", or "6 blocked by network" for a wave none of whose roots ran. The job's own status would say "failed" because the job exits 1, so the header replaces it.
    • A block on a wave the run view has not started is not shown yet.

The story gate

storyGate in web/kiosk.js returns "chant" for a chant repo's loop. It returns "terragucci" for a terragucci repo (/api/project's terragucciComponents) whose current demo.json step has chapter.n. Otherwise it returns null.

  • Each feature chant pull-request loop: live waves and components from chant's run events (behold#631, chant#4007) #740 gated on s.chantLoop is now gated on storyOn(s), which is the chant loop or the terragucci gate:
    • the projected track;
    • the chapter headline;
    • the waiting modal;
    • the dropped kicker, rail and quiet line;
    • the hidden theme picker;
    • the title line.
  • Chant-only paths stay on s.chantLoop: /api/chant/pr, the approval card, the result card, railStep and the side room.
  • Each draw, the kiosk sends the frame { type: "behold:story", on, cycle }.
  • The frame acts on it only when it is bare and shows a terragucci repo's components zoom (tgStoryOn() in web/app.js).
  • Event-help gets story beside chant. story turns on the kiosk's look: one tip at a time, a tip removed at once when it goes, tips hidden behind a modal, the trail fade, and modals kept off the cards they are about and above the bottom band. chant still sets chant's story order. A terragucci gate comes after the merge, so its order stays terragucci's.

How each chant feature is fed for terragucci

#740 feature terragucci source
Projected track and chapters cycles/<demo.tool>/latest.json, read through the same route; the ticks are the paced run view's waves (trackWaves)
Chapter headline, story moving ahead demo.json chapter; it moves to the next chapter once the paced run view shows a failed wave, or every wave applied with the run settled; it never moves back
Reach wedge tgReachOf: on a pull request, the plan report's roots and its reads and dependencies (new pull_request.upstreams); the apex is the changed root (the blast roots that need no other blast root); after a failure, the failed roots over the roots they blocked; edges from the run view's reads
Waiting modal the same waitingSpec; the apply counts as under way once any wave of the paced run view has moved
Paced waves web/terragucci-live-pace.js, with chant's PACE dwell (3 s applying, 1.5 s done, faster to catch up once watching is false); used in the frame for the cards and in the kiosk for the ticks, the tips and the held caption step
Child blocks /api/graph?components=1&blocks=1, which renders the terragucci components graph with childBlocks; the frame asks only while the story is on
Applied earlier the frame remembers, per cycle, the roots that applied in an apply and the roots left failed or blocked; on the next pull request (the fix) and its apply, a root the plan leaves out reads "applied earlier", and a failed or blocked root keeps that state until a plan covers it; a base pin or a new cycle clears it
Plan counts per root new pull_request.counts from each report root's counts, on the cards' facts as "plans 1 update"
Title line "terragucci · [OpenTofu mark] OpenTofu · [Forgejo mark] on Forgejo · fan-out · live demo"; behold ships no terragucci mark, so terragucci is text only; Terraform shows as text only; the engine comes from the repo's declared tools, and the forge from pipelineForge (new terragucciRoots.forge on /api/project)

b-waves, failure and tg-planned-outputs take today's path

  • None of them carries chapter, so storyGate returns null.
  • With the gate null, storyOn(s) is s.chantLoop, and s.chantLoop is always false on a terragucci repo. Every replaced gate therefore evaluates exactly as it did on main.
  • The kiosk sends on: false. tgStoryOn() is false, tgStoryMarks() returns null, and drawTgComponentMarks gets the same arguments as on main. There is no glyph hiding, no chantKioskWaves and no reach, and load() sends no blocks.
  • Event-help gets story: false. st.story is false, so tipsMax stays undefined and no modal placement changes.
  • In componentMarks, the new story work runs only when story is passed. The blocked header and blocked cards run only when the data has blocked.
  • web/kiosk-story-gate.test.js checks that the gate is null for all three scenario names and for a chapter without n.
  • Not done: screenshots of those scenarios against this branch. This lane builds only; the coordinator tests.

Decided

  • The blocked fold and each root's own outcome are a story's alone (coordinator's call, c7776a1).
    • rootStates(…, { story }) and componentMarks(…, { story }) read blocked and outcomes only with the story on.
    • The shared tone tables, the change panel's wave rows and the run view's unsettled rule are back to main's. So b-waves, failure and tg-planned-outputs read exactly as on main, even on ask demo: serve it as a Cloudflare Worker, and a docs page for it #1164's reports.
    • A test checks that the states and the marks are equal with and without the fields when no story is passed.
    • Showing blocked on those scenarios is left for a later decision.
  • Each root's own apply outcome (applied, unchanged, or failed with its error) has been asked of terragucci#1164.
    • Until the field is named, waveOutcomes reads both shapes: waves[].roots[].outcome and waves[].outcomes: [{ root, outcome, error }]. The unused one gets dropped once ask demo: serve it as a Cloudflare Worker, and a docs page for it #1164 names its field.
    • Under the story, a root that applied beside a failed one reads "applied". The failed root's card says "failed: " the way chant's does, with the whole error in its tooltip. The wave's header reads "1 failed, 1 applied".
    • An outcome shows only once its wave has settled in the paced view.
  • The pacer shows a wave seen going straight from queued to applied or failed as applying first, for the dwell. It did apply between two reads, so nothing is invented beyond the step the reads skipped.
  • chantKioskWaves runs for the story too. Box titles read "wave N", edges get arrowheads, and the "the waves apply from the bottom up" note appears, so the bigger card and wave words fit as on chant's kiosk.
  • Reach words say "roots" ("reaches 9 roots", "6 blocked") rather than chant's "stacks".
  • The title tooltip reads "The pipeline is terragucci's (its waves, one job per wave). The demo stack and its driver are terragucci's."

Checks

  • npm run build builds.
  • npx tsc --noEmit shows no errors in the files this changes. The errors it does print are already on main with the shared node_modules: src/run-events.ts, src/run-events.test.ts, src/component-status.test.ts and src/why-trace-fixture.ts resolve against the installed @intentius/chant.
  • New tests, written and not run:
    • src/terragucci-blocked.test.ts: the fold from wave reports, with and without the field, and another commit's rows ignored.
    • web/terragucci-blocked.test.js: card and wave states and headers with and without the field, both reaches, applied earlier, and the pacer.
    • web/kiosk-story-gate.test.js: the gate and the title line.
  • Not run: tests, the stack, any browser or any screenshot.

🤖 Generated with Claude Code

lex00 and others added 2 commits October 18, 2026 14:15
…ter-carrying scenarios (behold#741)

Blocked roots (terragucci#1161, report minor 41): behold reads waves[].blocked
from the newest apply's wave reports and a run view wave state of blocked. A
blocked root reads "blocked by X" in the blocked tone, and a wave's header
"N applied, N blocked by X", or "blocked by X" when none of its roots ran.
Reports without the field read as before.

The #740 kiosk features (projected track, chapter headlines, reach wedge,
waiting modal, paced waves, wave blocks, applied earlier, one tip at a time,
modal placement, title line) turn on for a terragucci repo when demo.json's
step carries `chapter`, fed from terragucci's reports and run view. Without a
chapter (b-waves, failure, tg-planned-outputs) every path is today's.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…r the story gate (behold#741)

blockedOf now runs only for a kiosk telling a chapter-carrying scenario, so
b-waves, failure and tg-planned-outputs read exactly as on main even on
terragucci#1164's reports: the shared tone tables, the change panel's wave
rows and the run view's watching rule are back to main's.

Each root's own apply outcome in its wave (applied, unchanged or failed with
its error), asked of terragucci#1164, is read in both shapes until its field
is named: waves[].roots[].outcome and waves[].outcomes[]. Under the story a
root that applied beside a failed one reads applied, the failed root says its
error as chant's cards do, and the wave's header reads "1 failed, 1 applied".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lex00
lex00 merged commit ef0d9b0 into main Oct 18, 2026
3 checks passed
@lex00 lex00 mentioned this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

terragucci repos: blocked roots, and the chant kiosk's track/chapters/wedge for chapter-carrying scenarios

1 participant