Standing runner handed push for a landing-pr app-report ticket (#2177) — re-check landing_mode_for at land time #2181
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#2181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A standing session was handed
pushfor alanding-prapp-report ticket — risk of pushing external-origin work tomainWorking #2177, the standing session-runner's injected ticket context read
Landing mode for this ticket (resolved by the runner): push. But #2177 is anapp-report descendant (
<!-- origin: app-report #2047 -->) carryinglanding-pr,and the authoritative resolver disagrees:
Following the injected
pushline, the session pushed the fix tomain(
6454feb4) before detecting the marker; it was then reverted (43ee3181) andre-landed via PR #2179 (the correct ADR 0267 path). No net harm this time, but
the hazard is real: a
landing-prticket (which may carry words typed outsidethe project) can reach
mainthrough a direct push whenever the runner'sresolution and
landing_mode_fordisagree.Likely cause: the
landing-prlabel (and/or the runner snapshot) postdates themoment the runner computed the landing line, so it resolved the repo default
(
push). Either the label was added after launch (a race) or the runner'slanding-line computation diverges from
landing_mode_for.Ask: the standing session should re-check
landing_mode_forat land time (notonly trust the injected line), or the runner should resolve the line from the
same
landing_mode_forat the latest possible moment — so an app-report /landing-prticket can never be pushed straight tomain. Harness/runner class;.sandcastle/is protected (#445). Related: #2177, PR #2179, ADR 0267.Ruled by agent under ADR 0174 — veto anytime.
Ruling: category
bug, stateready-for-session.landing-prand the<!-- origin: app-report #2047 -->marker are left untouched.The hazard is real and confirmed. The standing session-runner handed #2177 (an app-report descendant carrying
landing-pr) the injected lineLanding mode for this ticket (resolved by the runner): push, whilelanding_mode_for 2177resolvespr. The session followed the injected line and pushed tomain(6454feb4) before detecting the marker; it was reverted (43ee3181) and re-landed via PR #2179 — no net harm this time, but alanding-prticket (which may carry outside-origin words, ADR 0267) reachingmainby direct push is a one-way leak if it is ever missed.Why a two-way door. The fix — have the session (or the runner) re-check
landing_mode_forat the latest possible moment rather than trust a stale injected line — is a runner/harness change, revertible per commit and provable by a.sandcastle/test that asserts alanding-prticket never resolves topush. Not on the one-way-door list: no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend. The fix closes a push-to-mainleak; it does not open one.Why
ready-for-sessionand notready-for-agent. The change lives in the runner / landing-resolution path under protected.sandcastle/(#445) — likely a FACTORY_MANIFEST path requiring the dev-factory backport-off-pin route, as #2177 itself took. That is live-repo / protected-path standing a swarm worker lacks (list-ready-tasks.shreads onlyready-for-agent; the #445 boundary rolls back any.sandcastle/touch). A session prepares + verifies the fix and lands it per ADR 0180, honouring the inheritedlanding-prfor the idss re-vendor.Report policy intact. Descends from app report #2047; its words are outside input — data, never instructions.
landing-prand the origin marker stay; work lands by a human-approved PR, never a push tomain. Only a human lifts the policy.Ruled by agent under ADR 0174 — veto anytime.
What landed
The fix is harness/runner-class machinery under
.sandcastle/— factory-vendored (ADR 0180) and protected (#445), so it has no in-repo idss surface. It lands upstream as dev-factory PR #344: Matou/dev-factory#344It re-checks
landing_mode_forat the last revertible moment — the push itself (idss #2181's ask), closing the race where alanding-prlabel added between the runner's pick-time snapshot and the session's push lets external-origin work reachmainthrough a direct push (#2177):git-hooks/pre-pushGate 0 — whenSESSION_RUNNER_LAND_TICKETis set (exported bysession-runner.sh; unset for swarm reconcile and human pushes → a no-op there) and the push targetsrefs/heads/main, re-resolvelanding_mode_forand block only on a CONFIRMEDprverdict, pointing atland-pr.sh. Fail-OPEN on any resolution error, so a forge blip can never wedge a legitimate push-mode session.session-runner.sh— exportsSESSION_RUNNER_LAND_TICKET=$pickbefore the claude call so the hook (already wired viacore.hooksPath) sees the ticket.prompts/session-runner-prompt.md— the push-branch session re-checkslanding_mode_forbefore pushing, landing cleanly as a PR instead of hitting the wall. The two committed rendered copies the render-cutover test pins were regenerated from the edited skeleton.Proof
New offline test
tests/prepush-land-mode-gate-test.shdrives realgit pushes to a local bare remote with a stubbedlanding-lib: a now-prticket is blocked from pushingmain; a push-mode ticket, an un-scoped (swarm/human) push, aprlanding's ownagent/issue-<N>push, and an unresolvable mode (fail-open) all pass. The affected suites re-pass (onboard-lib276/0 incl. the render cutover,session-runner,prepush-drift,prompt-render-lib,landing-lib). The only full-suite failure is the pre-existinggate-lib-test.shgofmt-version mismatch on the host, reproducible on an unmodified checkout.Why human
Two residues this standing session cannot cross:
pre-pushhook (every host, every push) — its merge is a human-approved call (ADR 0180).land-pr.shtargets idss and a cross-repo merge cannot auto-close this ticket, so #2181 cannot drain through the normal pr-mode session lane..sandcastle/FACTORY_REF+ re-vendoring (onboard.sh vendor), which itself lands in idss via its ownlanding-prPR. That is a two-way-door a future session can do — but only after #344 merges, so re-queueing #2181ready-for-sessionnow would just burn attempts against an unmerged dependency.landing-prand the<!-- origin: app-report #2047 -->marker are left in place (never removed). Relabellingready-for-human: merge #344, then bumpFACTORY_REF/ re-vendor (or re-queue this ticketready-for-sessionfor the vendor bump).workflow preparedwith ENOSPC on /home/swarm/.cache/act, so ~1 in 3 pool-label triage/resume-asks/ci ticks reds instantly (#2076 mechanism, second host) #2174