Repository navigation
Arm /land through transient states, ask small acks inline (work-system 1.33.0) - #104
Merged
Merged
Conversation
gering
force-pushed
the
task/improve-land-armed-and-inline-ack
branch
3 times, most recently
from
November 4, 2026 21:33
8fdb57c to
409fb6e
Compare
gering
force-pushed
the
task/improve-land-armed-and-inline-ack
branch
from
November 7, 2026 15:09
409fb6e to
ff245d3
Compare
…m 1.33.0) - land-gate.py: one classifier for every pre-merge /land state (ready, wait = transient, stop = hard, merged); pr-lagging (local == pushed branch, PR head stale) waits instead of aborting - arm/wait: bind the exact HEAD and the PR head seen at arm, wait in bounded 8-minute calls up to a 45-minute deadline; head-moved, pr-head-moved, a hard state or the deadline disarm - armed state in the git common dir, bound to arm_id + herdr pane; landing.sh end clears it with the landing marker - /land asks the post-review delta ack as one AskUserQuestion before any wait; prose relays the class, a stops table covers every reason - tests, README, CHANGELOG, knowledge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RtoWCyDFZc9zp1HFv5spih
gering
force-pushed
the
task/improve-land-armed-and-inline-ack
branch
from
November 7, 2026 20:22
ff245d3 to
89d01b5
Compare
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.
Summary
/landnow stops only for something serious.One classifier —
scripts/land-gate.py probedecides every pre-merge state:ready,wait(class=transient),stop(class=hard) ormerged. The/landprose only relays the class. Its stops table is cross-checked bytest_land.pyagainst every hardreason=the script can print.pr-lagging(the PR Recognise native-installer claude in /sessions (work-system 1.31.1) #100 incident): local == the pushed branch (read withgit ls-remote), but the PR head is stale. This is now transient instead ofhead=diverged→ abort. Other transient states: CI queued or running, no check yet in a repo with workflows (180 s grace), mergeabilityUNKNOWN, a gh/GitHub error.Armed
/land—armbinds the exactHEADthe user landed on and the PR head seen at that moment, with a 45-minute deadline and anarm_id.waitre-probes in bounded 390-second calls (a tool call caps at 10 min, and a foregroundsleepis blocked) and prints progress lines. Any of these disarms it and reports: a hard state, a new local head (head-moved), a PR head it never saw (pr-head-moved), or the deadline. The armed state lives in the git common dir, is bound toarm_id+ the herdr pane, and grants nothing;landing.sh endclears it on every stop path. Only a typed/landarms, and there is no daemon.Inline acknowledgement — when a post-review delta is the only coverage gap,
/landsummarizes it (exactly as/pr-flow:mergestep 6b does) and asks oneAskUserQuestionbefore any wait. The options are acknowledge and land / show the raw delta / re-review / stop. Only the user's own answer counts./mergethen seesvia=user-ackand does not ask again.CI like
/merge— only a check that branch protection requires is a hard stop. A red optional check comes back asci=failed-optional: ready, and/mergewarns and asks. Pending checks are waited for while branch protection requires none, otherwise only the required ones.STALEnever blocks.Local review (
/swarm:review, round 1/5): lens-only, because both cc-harness voices failed with "no gateway token". Of 13 findings I agreed with 10 and applied them; that is where the required-only CI rule comes from. The others: a runningwaitnow re-reads its marker and stops withdisarmed; the slice is 390 s so it stays under the tool cap; the timeout line now names what it waited for (last_wait=); plus small hardening. Not applied: #3 (no checks → ready after the grace period is deliberate, and/mergestill gates required checks) and #11 (the post-merge head check runs where the gate's lane checks no longer hold). The outside-herdr session binding is documented as a residual. The fixes are recorded as agreed fixes (covered via=agreed-fixes).Local review round 2 (
/swarm:review --fix, again lens-only: both cc-harness voices still fail with "no gateway token"): 14 findings. I applied 12, fully or in part:mergeStateStatus:BLOCKED,BEHINDandDRAFTused to read as ready. NowBLOCKEDwith every check green waits for the CI grace (a required check that has not registered yet), then stops asmerge-blocked.REVIEW_REQUIRED,DRAFTandBEHINDare hard stops.refs/heads/<branch>on the branch's remote), notbranch.<b>.merge.no-upstreamis gone.arm --head <the probe's head_sha=>: the armed head is the one that was probed and acknowledged.ci-required-unknown) instead of stopping.waitexits non-zero. Doc fixes: the 390 s slice, the CI wording, the top-level README.relation(), but it is tested by executing it; moving it into the script is a possible follow-up.Decisions:
/landwas typed disarms and asks. A pushed amend of the lane is not accepted, because the script cannot tell an amend from a new change.unpushedstays hard:/landnever pushes.Version: work-system 1.33.0. This is the next free minor after #100 (1.31.1) and #101 (1.32.0), so a rebase after those land will touch only the CHANGELOG/manifest lines.
Local review round 3 (
/swarm:review --fixafter the rebase onto #101/#103, cross-family: session lenses plus cc-harnessgpt-6.1-solandgrok-4.7; 2 of 15 grok calls timed out): 21 findings, 13 ✅ and 4 🟨 applied, 4 ❌ left:DRAFTandBEHINDare ready again:/pr-flow:mergeasks to mark a draft ready and rebases a branch that is behind, so the round-2 hard stops took that away.REVIEW_REQUIREDstays hard and is now checked before CI, so a pending check cannot hide it behind the armed wait.upstream-mismatch(hard, consensus of all three families):/mergechecks unpushed commits against@{u}and pushes its rebase only with one. The gate keeps comparing against the PR's branch, and now also requires@{u}to be that branch.isCrossRepository). A disarm during a slow classify wins overready. A lagging PR head is no longer fetched. The MERGED relation uses the branch's remote./landhandles aprobethat exits non-zero. The inline ack offersShow the raw deltafirst, so a stray Enter only shows the diff. The stops-table indentation is fixed.pr checks --json(unsupported), the slice timing (the worst case stays under 600 s), merging the gate withworkers.py ready_for_merge(a different purpose), and deriving the armed path inlanding.sh(the proposed fix does not work).Test plan
test_land_gate.py(new): every classification on a real bare origin + worktree with a fake gh, arm/wait across calls, head binding, deadline, arm_id/pane checks,landing.sh enddisarmtest_land.pyupdated (gate, ack, armed contract, stops-table coverage)test_land_gate.py: required vs optional checks, STALE, a marker removed mid-wait,last_waiton timeouttest_land_gate.py: merge states (DRAFT/BEHIND ready, BLOCKED, REVIEW_REQUIRED also behind a pending check, UNSTABLE), missing or foreign upstream →upstream-mismatch, fork PR,arm --headmismatchscripts/check-structure.pygreen (after both fix rounds)🤖 Generated with Claude Code
https://claude.ai/code/session_01RtoWCyDFZc9zp1HFv5spih