Repository navigation
Closed
Labels
epic:estate-readWork from the offline estate read: terragucci gaps and chant bugs (tracker INTENTIUS/chant)
Description
Today
chant workspace train <env>(packages/core/src/workspace/release-train.ts) pins one cut release of eachchantmember and appends it to_members/_workspace/<env>/trains.jsonl.readMemberReleasesskips every other kind, sorepomembers are left out with no notice. In an org workspace, which holds onlyrepomembers,pickTraingets no members, finds no problem, and records a train with an empty member list (read from the code, not run). The record has no digest over its members, and nothing reads trains to deploy (workspace: releases across several members, reconciled with the release train (#2554) #4037).- After an apply, a member's pipeline sends
<product>-appliedto the control repo (CI core: the control repo (cross-repo dispatch, project records, reconcile) for terragucci and plywood #4568, Op waves: control-repo dispatch after the last wave, and cross-stack edge marks in the note #4617). The control repo's<product>-dependents.ymlrecords the outcome in_control/applied.jsonland, afterappliedorpartial, runschant workspace run --dependents-of <member> --op <op>. That runschant run <op>in each dependent's directory inside the control repo's own checkout, with the control repo job's credentials. Arepomember has no directory and its nodes are folded in as nested, so it is skipped, and no Op starts in another repository.
Change
- A train can pin
repomembers. chant reads each one's releases at the pinnedrevthrough its read contract (chant release list --json) and recordsrepo.url,releaseDigestandcommit. A member with no release refuses the train, and an empty train is refused. - The train gets a digest over its member release digests, the same one workspace: releases across several members, reconciled with the release train (#2554) #4037 needs.
- A promote command in the control repo (its name is a decision) dispatches into each member repository in link order, producers first, carrying the train id, env and release digest. The member's pipeline runs
chant run <op> --env <env> --release <digest>at the release's commit, under its own identity. The control repo holds a dispatch-only token per repository and no cloud credentials. - The member's existing
<product>-applieddispatch carries the train id back. The control repo records it and dispatches the next member only afterappliedorunchanged.
Done when
- A fixture org workspace with two
repomembers, each with a cut release, records a train naming both. A member with no release, or no members, refuses. - The same picks give the same train digest.
- Against a fake forge, promote dispatches the first member only. Its
appliedrecord dispatches the second, andfailedstops the train and records where. - The generated member job runs
chant run --release, its deploy record carries thereleaseDigest, and the generated control job has no credential step.
Depends on
#4037 for the train digest and gate binding. The dispatch from #4568 and #4617.
Not in this issue
Gates that span repositories (each member keeps its own gate), rolling a train back, and the lane view.
Tracked on #5105.
Metadata
Metadata
Assignees
Labels
epic:estate-readWork from the offline estate read: terragucci gaps and chant bugs (tracker INTENTIUS/chant)
Activity
lex00 commentedon Nov 15, 2026
Scope, read against origin/estate/4037-train-promote a2388e3 (chant#4037, pending its batch)
The premise holds on that base.
readMemberReleasesstill readschantmembers only, so an org workspace records nothing for itsrepomembers, and #4037'spickTrainnow refuses the empty train that results.chant workspace train promote(#4037) runs each member'scomponents promotein its own directory, which arepomember does not have. The applied dispatch (#4568, #4617) carries member, op, sha and outcome, and nothing that names a train.What already exists
trainDigestover{ member, releaseDigest }sorted by member, the train record,train list --jsonwith each train's promotions, andpromoteTrainforchantmembers (workspace: releases across several members, reconciled with the release train (#2554) #4037).fetchRepoAt(workspace: org scope: members that reference other repos' workspaces, generated or checked by the wardens #3168) fetches arepomember's pinnedrevinto the user's cache, one detached worktree per revision.chant workspace graphreads the member there through its own read contract.chant release list --json(lifecycle: the release is what graduates: cut from a green commit, shared artifact digests, one compile target per environment #4026) is the releases read contract. It reads the localchant/lifecyclebranch and never fetches.chant run --components <sel> --env <env> --release <label|digest>(records: join commit, release, gate and deploy through the release digest #4043, run --components --release: deploy the release's own artifacts, without building them again #4694, components: skip a component whose inputs didn't change since the environment's current release #4695) deploys a release from a checkout of its commit, refuses any other commit, and its deploy records carryreleaseDigest.<product>-dependents.ymlrecords each applied dispatch in_control/applied.jsonland runs the member's dependents.Decisions
chant workspace train promote <env> [<train>]. When the train pinsrepomembers, it dispatches instead of running members. A train that pins both kinds is refused at promote, since one half runs here and the other in other repositories.--continueadvances a promote already in flight from the answers recorded in_control/applied.jsonl, and starts nothing new. The control repo runs it when an applied dispatch names a train. Without--continue, a promote with a run in flight refuses and names the member it waits on.chant run --components all --env <env> --release <digest>at the release's commit, because that is the run that deploys a release and recordsreleaseDigesttoday.chant run <op> --releasedoes not exist. Adding it is a separate change.CHANT_TRAIN_TOKEN_<MEMBER>(the member name upper-cased, every other character_). The control job holds these tokens and nothing else.waiting, and the train stops there asgated. No workspace gate covers members in different repositories, so--gateis refused for such a train. The dispatch payload carries the cover's identity fields (member, environment, release digest), and the step records the answer in workspace: releases across several members, reconciled with the release train (#2554) #4037's step shape.Contract (Done when)
repomember's releases are read at its pinnedrev: chant fetches the revision into the cache (fetchRepoAt), fetches that repository'schant/lifecycleinto the cache clone, and runschant release list --jsonin the fetched workspace root. A train member then carriesrepo: { url, rev }besidereleaseDigest,commitandlabel. A member with no release refuses the train, as does a read that fails or an empty train. Shown by a test over two temp repositories standing in for the members, with local URLs, a temp cache, and a stand-in chant for the read.trainDigest, whatever the members' kinds. Shown by a pure test.chant workspace train promote <env>in a workspace whose train pinsrepomembers writes a workspace run record citing the train. Each step names the member's repository. The command dispatches the first member in link order (producers first) and marks its stepdispatched. The dispatch carries the member, env, train id, run id, release digest and the release's commit.--continuereads the answers:appliedorunchangedmarks the stepokand dispatches the next member.failed,partialorwaitingstops the run asfailorgatedand records the step it stopped at. An answer for another release digest fails the step. With no answer yet, nothing is written. Shown by a test against a fake dispatcher and temp repo ledgers: before an answer, only the first member is dispatched. Itsapplieddispatches the second, and afailedstops the train and records where.train,run,envandreleasewhen the member's job ran for a train._control/applied.jsonlkeeps them, and the control repo's step runstrain promote <env> <train> --continuefor such a dispatch in place of the dependents. Shown by tests of the request, the script and the record.@intentius/chant/control/train) and serialized for GitHub by the github lexicon:<product>-train.ymltakes the<product>-traindispatch, checks out the release's commit, and runschant run --components all --env "$env" --release "$release". It then sends<product>-appliedwith the outcome and the train fields.<product>-train.ymlstarts a promote. Its job holds only the dispatch tokens: no cloud credential step and noid-tokenpermission.Shown by tests of both files. A run under
--releaserecordingreleaseDigestis already shown byrun-release.test.ts.train list --jsonshows the newest record of each run, withdispatchedsteps and each member'srepo. Theworkspace trainCLI page documentsrepomembers, the promote across repositories and--continue.Not in this issue
chant run <op> --release, rolling a train back, gates that span repositories, and the lane view.repomember's releases from a member below its workspace root. The member'srepo.workspacecan name that directory.chore: regenerate the floor table and the fan-out example's workflow …
feat: estate-read batch 4, lint and import fixes, YAML emit, Grafana …