Repository navigation
Design one landing door
land.yml is the one landing door: merge at main's tip, prove the seed, mint the scale row, consume the branch
STATUS: LANDED 3168004b7a37 (2026-11-17) REV: 1 BASE: 4bc653cd853f, tree clean, 2026-11-17
The issue: maxon-lang/maxon#229. The ruling it implements: maxon-lang/maxon#223, decisions 1–10 and "the job that holds the push credential never runs a compiler built from the branch". The ruling's chain part ("A chain land holds nothing") is maxon-lang/maxon#230 and is not this change: the chain path keeps working as it does at BASE.
Main has three doors, git push origin main, fleet.mjs land and land.yml. Each requires the candidate to descend from main's tip when the push happens. When main moves, the author rebases, rebuilds, re-gates and re-mints the scale row, although the commits it rebased over usually touch other files.
Today, on land.yml:
| Program (a branch pushed, or dispatched) | Actual | Expected |
|---|---|---|
one commit, Land: main, its base one commit behind main, touching a file main did not |
plan fails: "does not fast-forward origin/main — rebase onto it and push again" | merged at main's tip and pushed |
a commit whose Land: main line sits in the body, not the final paragraph |
plan prints "carries no Land: trailer — nothing to land", run green |
plan fails: "move it into the final paragraph" |
| a compiler change whose author read the ladder | the author mints the row by hand, on a rebased tree, at their own path | the door mints it on the merged tree, carried as a Scale-Note: trailer |
| a commit that adds a scale row by hand | accepted | refused, naming the trailer |
| two land runs pushed close together | one shared concurrency group: a pending run is replaced and does not land | both run; the compare-and-swap push serialises |
| a run that ends (landed or bounced) on a trailer-pushed branch | the branch stays; the author deletes it by hand before re-pushing under the same name | the run deletes it if it still points at the run's head |
the land job |
checks out the branch and runs its land.sh with the App token (builds nothing today, but nothing keeps the merge and build out of it) |
the credentialed job runs git alone; merge, build and row are made in a job without the credential |
Full survey: kept by the planner (not in the repository). Paths relative to the repository root.
-
scripts/land.sh(677 lines). Subcommandssubmit [--rehearsal],chain,in-flight [--wait],plan,freeze,prove,publish,land,retract(usage:7-16, dispatcher:663-677).- Trailers:
land_trailers():102-105usesgit interpret-trailers --parse, case-insensitive key. ALand:line outside the final paragraph is not seen;landing_modereturns empty (:289) andcommand_planwriteskind noneand returns 0 (:304-308).landed_message():186-201stripsLand:lines from the final paragraph. -
plan:297-364: base isorigin/main(fetch_branch:98-100); the fast-forward refusal is:317; merge commits refused:320-321; a commit touchingscripts/seed-tagrefused:322-323; builds the head with the seed pinned at base via./scripts/build-from-seed.shin a worktree attemp/land-branch/tree(prepare_tree:128-151,build_prepared_tree:153-155);classify():266-279: accepted+1 commit ordinary, accepted+>1 fail (squash), refused+1 fail, refused+>1 chain. -
land:475-494:require_base_unmoved(:444-450, comparesls-remotetip withLAND_BASE), then a plaingit push origin <tip>:refs/heads/main. Ordinary pushes the author's commit itself. -
submit:630-661: pushesland/<12 hex of HEAD>(a fresh name per attempt), dispatches, polls the run, then deletes the branch itself (:653). - Nothing in
land.shtouches the scale log.
- Trailers:
-
.github/workflows/land.yml(196 lines). Push on**, !mainandworkflow_dispatchwith inputmode(rehearsal|main). Concurrency:17-19: groupland-mainfor every real land,cancel-in-progress: false(a pending run is replaced). Workflow permissionscontents: read. Jobs:plan(builds a compiler) ·credential(App token probe, main mode) ·chain·prove(matrix) ·publish(contents: write) ·land(:159-177: mints the App token, checks out the branch with it, runsland.sh land) ·retract. The start test iscontains(message, "\nLand:")(:18,:30), cruder thanland.sh's parsed trailer — the mismatch behind the green "nothing to land". -
Scale rows.
scale-testis a compiler subcommand (maxon-bin/Main.maxon:48,Testing/ScaleTestRunner.maxon,ScaleHistory.maxon,ScaleDigest.maxon).--noterecords only into the tree the measuring compiler was built in place in (treeToRecord,ScaleDigest.maxon:114-130), with a staleness refusal on source mtimes. The tree digest covers the.maxonfiles ofmaxon-bin/,stdlib/,runtime/(ScaleDigest.maxon:63-96). The corpus is generated into.scale-tmp/under the cwd.--check-rowdigests the cwd tree against the last row (ScaleHistory.maxon:216-246). -
scripts/check-scale-rows.shfix texts::45RowFix("re-runmaxon scale-test --note=…on this tree; a row is minted last, after the rebase"),:46EditFix. It runs inci.yml:406-415(--range … --compiler) andscale-rows.yml(--history-only); merge commits are skipped (:474-476). -
docs/optimization-log.mdheader "How rows get here":30-86(rows appended by the tool, minted after the rebase),minted at/corpussemantics:88-110(deltas print only when both match the previous row), CPU noise band:195(measured locally). Last rows were minted at/home/user/maxon/..., older ones at Windows paths. -
.gitattributes:docs/optimization-log.md merge=unionis the only union file. -
Build inputs.
build-from-seed.sh(seed path build, thenmaxon run buildin place);fetch-seed.sh,scripts/lib/{seed,host-binaries}.sh,scripts/seed-tag.ci.yml:11-12,59-63countsmaxon-bin/,stdlib/,runtime/,vendor/,project.maxonandscripts/{fetch-seed.sh,seed-tag,build-from-seed.sh,fetch-vendor.sh,lib/**}as build inputs. -
Docs that describe the door:
docs/RELEASING.md:67-138("Landing a branch —land.yml", the concurrency paragraph:103-111, "How a commit reaches main":124-133),:459-464(the landing App)./land§4:213-228, §7:259-271(in-flight wait,pull --rebase), §8:273-301(the row gate:289), §9:303-335(git push origin main, rejected push = re-gate and re-mint, "the push ends the change").situations.md:227-234("A rejected push").compiler-workflow"Landing a commit with its own seed":208-251. -
Host: this machine's git is 2.36 (no
merge-tree --write-tree, which needs 2.38). The door's merge runs on the runner only.
-
Which
specsfiles own this behaviour: none. The door is a workflow and a shell script; no spec,tests/corpus or self-test exercisesland.sh,land.ymlorcheck-scale-rows.sh. -
Existing cases that touch it: the
tests/cli/scale-test-*.maxtestcases (15) pinscale-test --note/--check-rowbehaviour, which this change does not alter;ScaleHistorySelfTest.maxonlikewise. Nothing pins the door. - Neighbouring cases: none. The issue's acceptance is runner rehearsals (§6), which is the only place this behaviour runs.
One git-only merge procedure in land.sh, called by an uncredentialed job that also builds and mints, and again by the credentialed job that only re-merges and pushes.
-
Trailers — one predicate. A commit's
Land:andScale-Note:are read by one function overinterpret-trailers --parse. If the message holds a line with either key that the parse did not return, the plan fails: "theLand:line is not in the commit's final paragraph — move it into the final paragraph" (and the same forScale-Note:). The workflow's crude start test stays crude, so the run starts and fails. -
Base is
merge-base(origin/main, head); the fast-forward refusal goes for ordinary lands. A chain still requiresbase == origin/main(its path is #230's), with a fix naming the rebase. -
Refuse a hand row. If
base..headchanges any row of the three history tables, the plan fails, naming theScale-Note:trailer. The table is read by the one readercheck-scale-rows.shalready has (open choice 2). - Classify as today (build the head with the seed pinned at its base). Ordinary only from here; the chain path is untouched.
-
Merge at the tip (
merge_onto <tip> <base> <commit>): the overlap set is (files changedbase..commit) ∩ (files changedbase..tip) minus files whosemergeattribute isunion(read withgit check-attragainst the tip's tree). Non-empty: bounce, naming the files and "rebase by hand and submit again". Empty:git merge-tree --write-tree(with the attribute source pinned to the tip, so union is honoured whatever the checkout holds) andcommit-treeonto the tip with the author's identity and date, the message less itsLand:line, the committer the bot. Main always receives this commit, so every land has one shape. -
Prove the seed (decision 4):
seed_inputs_differ <treeA> <treeB>compares, by git tree/blob id,maxon-bin/,stdlib/,runtime/,vendor/,project.maxon,maxon.maxtasks,scripts/seed-tag,scripts/build-from-seed.sh,scripts/fetch-seed.sh,scripts/fetch-vendor.sh,scripts/lib/(open choice 3). Same as the built head: skip. Different: check out the merged tree in the same worktree andbuild-from-seed.shwith the seed pinned at the tip; a refusal bounces. -
Mint the row (decision 5): with a
Scale-Note:, runmaxon scale-test --note=<note>intemp/land-branch/treeholding the merged tree, with the compiler built there (the head's build when step 6 skipped — the seed inputs, and so the files' mtimes, are unchanged by the checkout). The log blob joins the merged tree; the landed commit is written with it. A refused note bounces. Every row is minted at one runner path with one corpus. -
Hand-off. The plan job (
contents: read, no secret) uploads the landed commit as a git bundle artifact and outputs the tip it merged onto (T1) and the landed sha. -
The push job (
land) holds the App token and runs git alone — no build, nomaxon. It fetches the bundle and main (T2).T2 == T1: push with--force-with-lease=refs/heads/main:T1.T2 != T1: ifseed_inputs_differ T1 T2is false, re-merge withmerge_onto T2 T1 <landed>(the overlap check runs again; a concurrent row in the union log merges, ours last) and push with the lease onT2; a rejected lease repeats this, bounded (3). If main moved by a seed input, the job re-dispatches the run (workflow_dispatchwith anattemptinput,actions: write, bounded at 3), or bounces when the bound is spent. It records the sha main received as a::notice title=landed::<sha>annotation. -
No concurrency group (decision 7). Chain runs stay guarded by
require_base_unmovedas today. -
Consume the branch (decision 6): a final
consumejob (if: always(),contents: write, GITHUB_TOKEN, no build) deletes the run's branch with a compare-and-swap push (--force-with-lease=refs/heads/<b>:<head> :refs/heads/<b>), so a branch re-pushed meanwhile is kept. It skips a run that re-dispatched itself.submitstops deleting, and pushes to one name per local branch (land/<local branch>), so a rewritten commit goes up under the same name with a plain push; a push rejected because the name still exists means a run of it is still going. -
The verdict ends the change (decision 9):
land.sh await <branch> <head>(split out ofsubmit, used by it) waits for the run and prints the sha main received, read from the annotation. It serves theLand: maintrailer route too. -
Rehearsal reaches every path. A rehearsal runs every ordinary step and never pushes; the
landjob runs without a token and stops before the push, printing the commit it would push. Rehearsal-only dispatch inputstipandmovedstand in for main's tip at plan time and at push time, so the re-merge, the union merge, the overlap bounce and the seed-input re-dispatch decision are rehearsable without touching main. They are refused inmainmode. -
Docs:
docs/RELEASING.md"Landing a branch" and "How a commit reaches main" rewritten for one door (decisions 1–10), the landing-App paragraph for the job split;docs/optimization-log.mdheader (rows minted byland.ymlon the runner from aScale-Note:; the CPU noise band re-measured for the runner from the rehearsals);check-scale-rows.shRowFix/EditFixname the trailer;/land§4 (settle the note as the trailer), §7 (no rebase for the door; the in-flight chain wait stays until #230), §8 (the row gate goes), §9 (submit orLand: main, the run's verdict and the sha main received end the change; a bounce is rebase by hand + re-take only what moved + submit under the same name);compiler-workflowchain section (no fast-forward, branch consumed by the run).
Rejected:
- Push the author's commit unchanged when it is already a fast-forward with no note — two shapes on main for one door; the landed commit is always the door's.
-
Pass the merged tree to the push job as a workflow output — a tree is not an output; a bundle carries the objects and is verified by
git bundle verify. - Hold the merge, build and push in one job with the App token — the ruling forbids it.
-
Plan job pushes the candidate to a scratch ref for the push job — it would need
contents: writein the job that runs the branch's compiler. -
Delete the branch with
gh apiafter reading its sha — a race deletes a branch re-pushed between the read and the delete; the lease does not. -
A fresh branch name per
submit(today'sland/<sha>) — ruled out by #223. -
Rehearse the union and re-merge paths with real
mainlands — lands throwaway commits on main.
One implementer (one partition), with the docs pass after:
-
scripts/land.sh— trailers, base, hand-row refusal,merge_onto,seed_inputs_differ, minting, bundle, push/re-merge/re-dispatch, consume,submit/await. -
.github/workflows/land.yml— concurrency removed,tip/moved/attemptinputs,planuploads the bundle,landruns git alone in both modes,consumejob. -
scripts/check-scale-rows.sh— fix texts (and, open choice 2, the table reader made sourceable). -
docs/RELEASING.md, the header prose ofdocs/optimization-log.md,.claude/skills/land/SKILL.md§4 §7–§9,.claude/skills/compiler-workflow/SKILL.mdchain section; open choice 4:.claude/skills/land/situations.md"A rejected push".
- No compiler, runtime or stdlib source changes; no self-compile, no seed chain, no error code, no cross-target arm.
- No
RELEASE_NOTES.mdentry (a workflow and tooling change, per the issue). -
docs/source:docs/RELEASING.mdowns the door; regenerate the site (node website/scripts/sync-docs.mjs) if it is a synced source. - Lint:
bash -nandshellcheckonland.shandcheck-scale-rows.sh;actionlintonland.ymlif available. - Nothing about any agent fleet in a commit, the docs or this page.
| # | Rehearsal | Asserts | Red today because |
|---|---|---|---|
| R1–R3 | three dispatches of one tree with a Scale-Note:, started together, mode=rehearsal
|
all three run to completion (none cancelled); identical Allocations and Bytes rows; their CPU rows give the runner's noise band | the shared group replaces pending runs; nothing mints a row |
| R4 |
tip = main, moved = a commit on main's tip that appends a row to all three tables |
the land job re-merges with git alone; the union log holds both rows, ours last; check-scale-rows.sh --range passes on the result |
the plan refuses a non-fast-forward; the land job does not merge |
| R5 | a branch based one commit behind main, touching a file the newer commit did not | merged at the tip; seed proof skipped or run per the predicate | "does not fast-forward" |
| R6 | a commit with its Land: rehearsal line in the body |
the plan fails naming "move it into the final paragraph" | green "nothing to land" |
| R7 | a branch changing a file tip also changed → bounce; the run deletes the branch; a fixed commit pushed under the same name with a plain push |
bounce names the file; branch gone without a hand delete; second run proceeds | non-fast-forward refusal; the branch is never deleted on the trailer route |
| R8 | a commit adding a row by hand | refused naming Scale-Note:
|
accepted |
| R9 |
moved changes a seed input |
the land job chooses re-dispatch (rehearsal: one re-dispatched rehearsal run, bounded) |
no such path |
| — | structural: the land job's steps |
no build step, no maxon invocation; merge/build/row only in plan (contents: read) |
land checks out with the App token today |
| — | the change lands itself: its own commit carries Land: main and goes through the new door |
main receives the door's commit; the annotation names its sha | — |
ONE /land.
-
Rehearsal-only
tip/movedinputs (step 13) — workflow surface whose only purpose is rehearsing paths that otherwise need main to move. Recommended: add them, refused inmainmode. -
The hand-row check's table reader. Recommended: make
check-scale-rows.sh's table extraction a sourced function (scripts/lib/) thatland.shalso calls, rather than a second awk parser — this widenscheck-scale-rows.shbeyond "fix text only". -
The seed-input predicate includes
vendor/,project.maxon,maxon.maxtasksandscripts/fetch-vendor.shbeyond the ruling's list, becauseci.ymlcounts them as build inputs. Recommended: include them. -
.claude/skills/land/situations.md"A rejected push" becomes false under the door. Recommended: rewrite it in this commit (outside the listed area). -
Out of area, left alone:
fleet.mjs landand.claude/agents/orchestrator.md(the fleet's fast-forward door),.claude/skills/assign-task,.claude/skills/fannkuch-iterate("a push rejected …"). Recommended: a follow-up issue, not this commit. - Rehearsal also consumes the branch (decision 6 does not distinguish modes). Recommended: yes.
-
Landing this change through its own door (
Land: mainon its branch). Recommended: yes — it is the only proof of the main-mode path. -
#224 (
/land: re-take only results whose inputs changed) also edits/landSKILL.md; whichever lands second takes the other's text.
- 2026-11-17: on the runner (git 2.56.1)
git merge-tree --write-treehonoursmerge=uniononly from the worktree's attributes or an attribute source: with neither (a bare clone, or the file removed) the two appended rows conflict;git --attr-source=<tip>merges them, the first-named side's row first.merge_ontopins the attribute source to the tip and names the tip first, so the landed row is last. - 2026-11-17: rulings on section 8: 1 yes; 2 yes (the table reader moves to
scripts/lib/); 3 yes; 4 yes; 5 not in this change; 6 yes; 7 yes.