push mode: worker never pushes main; HOST lands after verify (#193) #229
Closed
matou-build-agent
wants to merge 1 commit from
agent/issue-193 into main
pull from: agent/issue-193
merge into: Matou:main
Matou:main
Matou:sandcastle/rescue-20261120-212246
Matou:sandcastle/rescue-20261120-202650
Matou:sandcastle/rescue-20261120-202316
Matou:sandcastle/worker/20261120192753-1909682
Matou:sandcastle/rescue-20261120-191443
Matou:sandcastle/rescue-20261120-195103
Matou:sandcastle/rescue-20261120-201254
Matou:sandcastle/rescue-20261120-201438
Matou:sandcastle/rescue-20261120-144756
Matou:sandcastle/rescue-20261120-184843
Matou:sandcastle/rescue-20261120-190817
Matou:sandcastle/rescue-20261120-045815
Matou:sandcastle/rescue-20261120-143144
Matou:sandcastle/rescue-20261120-144025
Matou:sandcastle/worker/20261120032838-3834852
Matou:sandcastle/worker/20261120034547-1076409
Matou:sandcastle/rescue-20261120-031041
Matou:sandcastle/rescue-20261120-035031
Matou:sandcastle/rescue-20261120-041046
Matou:sandcastle/rescue-20261120-041556
Matou:sandcastle/rescue-20261120-042712
Matou:sandcastle/rescue-20261120-044145
Matou:sandcastle/rescue-20261120-044401
Matou:sandcastle/worker/20261120020735-3225234
Matou:sandcastle/rescue-20261120-025017
Matou:sandcastle/worker/20261120012937-3577764
Matou:sandcastle/rescue-20261120-024432
Matou:sandcastle/rescue-20261120-012510
Matou:sandcastle/rescue-20261120-020027
Matou:sandcastle/rescue-20261120-022005
Matou:sandcastle/rescue-20261120-023040
Matou:sandcastle/rescue-20261120-023059
Matou:sandcastle/rescue-20261120-023617
Matou:sandcastle/rescue-20261120-023726
Matou:sandcastle/rescue-20261120-024624
Matou:sandcastle/rescue-20261120-030108
Matou:sandcastle/rescue-20261120-011059
Matou:sandcastle/rescue-20261119-235227
Matou:sandcastle/rescue-20261119-220002
Matou:sandcastle/rescue-20261119-234418
Matou:sandcastle/worker/20261119210537-2901903
Matou:sandcastle/rescue-20261119-215319
Matou:sandcastle/worker/20261119210832-2140478
Matou:sandcastle/rescue-20261119-205729
Matou:sandcastle/worker/20261119195637-2051281
Matou:sandcastle/rescue-20261119-203604
Matou:sandcastle/rescue-20261119-212545
Matou:sandcastle/rescue-20261119-213258
Matou:sandcastle/rescue-20261119-214233
Matou:sandcastle/rescue-20261119-215039
Matou:sandcastle/rescue-20261119-200052
Matou:sandcastle/rescue-20261119-202558
Matou:sandcastle/rescue-20261119-202859
Matou:sandcastle/rescue-20261119-204522
Matou:sandcastle/rescue-20261119-202901
Matou:sandcastle/worker/20261119192821-2242548
Matou:sandcastle/rescue-20261119-201432
Matou:sandcastle/worker/20261119185826-1049892
Matou:sandcastle/rescue-20261119-192442
Matou:sandcastle/rescue-20261119-194543
Matou:sandcastle/rescue-20261119-195715
Matou:sandcastle/rescue-20261119-195042
Matou:sandcastle/rescue-20261119-194153
Matou:sandcastle/rescue-20261119-193223
Matou:sandcastle/rescue-20261119-181821
Matou:sandcastle/rescue-20261119-182031
Matou:sandcastle/rescue-20261119-191400
Matou:sandcastle/rescue-20261119-184524
Matou:sandcastle/rescue-20261119-185251
Matou:sandcastle/rescue-20261119-190111
Matou:sandcastle/rescue-20261119-171507
Matou:sandcastle/rescue-20261119-172406
Matou:sandcastle/rescue-20261119-180227
Matou:sandcastle/rescue-20261119-181611
Matou:sandcastle/rescue-20261119-183926
Matou:sandcastle/rescue-20261119-165410
Matou:sandcastle/rescue-20261119-181300
Matou:sandcastle/worker/20261119152654-1251003
Matou:sandcastle/rescue-20261119-175608
Matou:sandcastle/rescue-20261119-153212
Matou:sandcastle/rescue-20261119-155612
Matou:sandcastle/rescue-20261119-161612
Matou:sandcastle/rescue-20261119-162645
Matou:sandcastle/rescue-20261119-151259
Matou:sandcastle/worker/20261119-091545-699963
Matou:sandcastle/rescue-20261119-152400
Matou:sandcastle/rescue-20261119-150650
Matou:sandcastle/rescue-20261119-151018
Matou:sandcastle/rescue-20261119-145753
Matou:sandcastle/rescue-20261119-144640
Matou:sandcastle/worker/20261119-141805-b375a7
Matou:sandcastle/rescue-20261119-143616
Matou:sandcastle/rescue-20261119-142315
Matou:sandcastle/rescue-20261119-143536
Matou:sandcastle/rescue-20261119-144907
Matou:sandcastle/rescue-20261119-150929
Matou:sandcastle/rescue-20261119-140252
Matou:sandcastle/rescue-20261119-132837
Matou:sandcastle/rescue-20261119-140917
Matou:sandcastle/rescue-20261118-232015
Matou:sandcastle/rescue-20261118-224358
Matou:sandcastle/rescue-20261118-231012
Matou:sandcastle/rescue-20261118-221954
Matou:sandcastle/rescue-20261118-223235
Matou:sandcastle/rescue-20261118-215029
Matou:sandcastle/rescue-20261118-220457
Matou:sandcastle/rescue-20261118-213647
Matou:sandcastle/rescue-20261118-213651
Matou:sandcastle/rescue-20261118-203142
Matou:sandcastle/rescue-20261118-201242
Matou:sandcastle/rescue-20261118-160449
Matou:sandcastle/worker/20261118-151037-fa1423
Matou:sandcastle/rescue-20261118-141033
Matou:sandcastle/rescue-20261118-153435
Matou:sandcastle/rescue-20261118-155226
Matou:sandcastle/rescue-20261118-140135
Matou:sandcastle/rescue-20261118-072336
Matou:sandcastle/rescue-20261118-071306
Matou:sandcastle/rescue-20261118-065902
Matou:sandcastle/rescue-20261118-070925
Matou:sandcastle/rescue-20261118-064628
Matou:sandcastle/rescue-20261118-060611
Matou:sandcastle/rescue-20261118-063652
Matou:sandcastle/rescue-20261118-065117
Matou:sandcastle/rescue-20261118-065556
Matou:sandcastle/rescue-20261118-055026
Matou:sandcastle/worker/20261118-000033-5f0b74
Matou:sandcastle/rescue-20261118-054929
Matou:sandcastle/rescue-20261118-053613
Matou:sandcastle/worker/20261118-050837-870db6
Matou:sandcastle/rescue-20261118-051315
Matou:sandcastle/rescue-20261118-052156
Matou:sandcastle/rescue-20261118-053056
Matou:sandcastle/rescue-20261118-042651
Matou:sandcastle/rescue-20261118-050517
Matou:sandcastle/rescue-20261118-052017
Matou:sandcastle/rescue-20261118-052046
Matou:sandcastle/rescue-20261118-053617
Matou:sandcastle/rescue-20261118-040341
Matou:sandcastle/rescue-20261118-035452
Matou:sandcastle/rescue-20261117-180034
Matou:sandcastle/worker/20261117-173516-cca624
Matou:backport/idss-2068-2111-2114
Matou:sandcastle/rescue-20261117-123242
Matou:sandcastle/rescue-20261117-124231
Matou:backport/idss-2057
Matou:sandcastle/rescue-20261116-154411
Matou:sandcastle/rescue-20261117-175037
Matou:sandcastle/rescue-20261116-153352
Matou:sandcastle/rescue-20261107-062749
Matou:session-runner-land-mode-recheck-2181
Matou:sandcastle/rescue-20261107-061316
Matou:fp/idss-2180
Matou:sandcastle/rescue-20261107-060212
Matou:forward-port/provision-disk-guard
Matou:sandcastle/rescue-20261107-060021
Matou:sandcastle/rescue-20261107-054649
Matou:sandcastle/worker/20261107-043349-cf0d7e
Matou:backport/idss-2177
Matou:sandcastle/rescue-20261116-175301
Matou:sandcastle/rescue-20261116-175950
Matou:backport/idss-2176
Matou:sandcastle/rescue-20261106-135208
Matou:sandcastle/rescue-20261107-045600
Matou:sandcastle/rescue-20261107-051315
Matou:sandcastle/rescue-20261107-053423
Matou:sandcastle/worker/20261106-111451-8c1ff0
Matou:sandcastle/rescue-20261106-023514
Matou:sandcastle/rescue-20261106-113455
Matou:sandcastle/rescue-20261106-115043
Matou:sandcastle/rescue-20261106-121303
Matou:sandcastle/rescue-20261106-134211
Matou:sandcastle/worker/20261106-013937-c15abc
Matou:fix/336-job-locality-runner-uuid
Matou:sandcastle/rescue-20261106-000320
Matou:sandcastle/rescue-20261105-113317
Matou:sandcastle/rescue-20261105-235352
Matou:sandcastle/rescue-20261106-020541
Matou:sandcastle/rescue-20261106-022516
Matou:sandcastle/rescue-20261106-024735
Matou:sandcastle/rescue-20261106-024744
Matou:sandcastle/rescue-20261106-024751
Matou:sandcastle/worker/20261105-104416-4319e1
Matou:sandcastle/rescue-20261105-111401
Matou:sandcastle/worker/20261105-054650-133b83
Matou:sandcastle/rescue-20261105-104304
Matou:sandcastle/rescue-20261105-110432
Matou:sandcastle/rescue-20261105-110637
Matou:sandcastle/rescue-20261105-112240
Matou:sandcastle/rescue-20261105-102818
Matou:sandcastle/worker/20261105-090131-e38a52
Matou:sandcastle/rescue-20261105-101105
Matou:sandcastle/rescue-20261105-094209
Matou:sandcastle/rescue-20261105-095705
Matou:sandcastle/rescue-20261105-091351
Matou:sandcastle/rescue-20261105-092126
Matou:sandcastle/rescue-20261105-093755
Matou:sandcastle/rescue-20261105-095339
Matou:sandcastle/rescue-20261105-101509
Matou:sandcastle/worker/20261105-033507-997386
Matou:sandcastle/worker/20261105-072852-43a339
Matou:sandcastle/rescue-20261105-085215
Matou:sandcastle/rescue-20261105-090546
Matou:sandcastle/rescue-20261105-090731
Matou:sandcastle/rescue-20261105-091600
Matou:sandcastle/worker/20261105-073544-9e3e7b
Matou:sandcastle/rescue-20261105-085541
Matou:sandcastle/worker/20261105-030149-b06fe6
Matou:sandcastle/rescue-20261105-075223
Matou:sandcastle/rescue-20261105-080157
Matou:sandcastle/rescue-20261105-081231
Matou:sandcastle/rescue-20261105-081252
Matou:sandcastle/rescue-20261105-081916
Matou:sandcastle/rescue-20261105-082029
Matou:sandcastle/rescue-20261105-082600
Matou:sandcastle/rescue-20261105-082859
Matou:sandcastle/rescue-20261105-083557
Matou:sandcastle/rescue-20261105-084327
Matou:sandcastle/rescue-20261105-090802
Matou:sandcastle/rescue-20261105-092213
Matou:sandcastle/worker/20261105-004228-d59980
Matou:sandcastle/worker/20261104-200255-c897e8
Matou:sandcastle/rescue-20261105-021604
Matou:sandcastle/rescue-20261105-062428
Matou:sandcastle/rescue-20261105-064420
Matou:sandcastle/worker/20261104-185608-12e745
Matou:sandcastle/rescue-20261105-011719
Matou:sandcastle/rescue-20261104-221030
Matou:sandcastle/rescue-20261105-003304
Matou:sandcastle/rescue-20261105-005511
Matou:sandcastle/rescue-20261105-013351
Matou:sandcastle/rescue-20261105-015246
Matou:sandcastle/worker/20261104-204335-4df59d
Matou:sandcastle/worker/20261104-144451-39719f
Matou:sandcastle/rescue-20261104-210849
Matou:sandcastle/rescue-20261104-211127
Matou:sandcastle/rescue-20261104-212722
Matou:sandcastle/worker/20261104-194113-a58f71
Matou:sandcastle/rescue-20261104-193329
Matou:sandcastle/rescue-20261104-200835
Matou:sandcastle/rescue-20261104-201057
Matou:sandcastle/rescue-20261104-202237
Matou:sandcastle/rescue-20261104-204239
Matou:sandcastle/rescue-20261104-185105
Matou:sandcastle/rescue-20261104-185510
Matou:sandcastle/rescue-20261104-192703
Matou:sandcastle/rescue-20261104-184907
Matou:sandcastle/rescue-20261104-183301
Matou:sandcastle/rescue-20261104-183354
Matou:backport/idss-2161
Matou:backport/idss-2155
Matou:fp/idss-2147
Matou:backport/idss-2145
Matou:backport/idss-2134
Matou:backport/idss-2119
Matou:sandcastle/worker/20261030-141035-c3d689
Matou:sandcastle/worker/20261030-125730-11b08b
Matou:sandcastle/worker/20261030-172321-20db0e
Matou:backport/idss-2114
Matou:backport/idss-2112
Matou:forward-port/idss-2111
Matou:forward-port/idss-2068
Matou:backport/idss-2111
Matou:backport/idss-2110
Matou:backport/idss-2106
Matou:backport/idss-2068
Matou:backport/idss-2104
Matou:sandcastle/rescue-20261030-110900
Matou:sandcastle/worker/20261029-055633-763b74
Matou:sandcastle/worker/20261029-000831-e4c652
Matou:sandcastle/worker/20261028-162655-0e8071
Matou:sandcastle/rescue-20261030-110112
Matou:sandcastle/rescue-20261030-110131
Matou:sandcastle/rescue-20261030-110135
Matou:sandcastle/rescue-20261030-110153
Matou:sandcastle/rescue-20261030-110156
Matou:sandcastle/rescue-20261030-110200
Matou:sandcastle/rescue-20261030-110220
Matou:backport/idss-1913
Matou:agent/issue-306
Matou:runner-busy-not-stalled
Matou:sandcastle/worker/20261024-045639-da1b9a
Matou:sandcastle/worker/20261023-060833-778cbe
Matou:fleet-queue-watcher-301-proposal
Matou:floor-vue
Matou:sandcastle/worker/20261021-191646-b93327
Matou:sandcastle/worker/20261021-233637-f21837
Matou:sandcastle/worker/20261021-233255-c766f7
Matou:sandcastle/worker/20261021-040000-b7a28d
Matou:backport/idss-2050
Matou:backport/idss-2050-session-pr-landing
Matou:sandcastle/worker/20261020-221737-cc96f3
Matou:backport/idss-2052
Matou:agent/issue-289
Matou:backstop-waiting-runs
Matou:sandcastle/worker/20261017-204619-942ae4
Matou:sandcastle/worker/20261017-204620-aa17c2
Matou:sandcastle/worker/20261017-144914-3ec608
Matou:sandcastle/worker/20261017-063336-7f5d31
Matou:sandcastle/rescue-20261017-062529
Matou:sandcastle/worker/20261017-010124-c49097
Matou:sandcastle/worker/20261017-003840-0c4ab1
Matou:sandcastle/rescue-20261017-054742
Matou:sandcastle/worker/20261017-053155-61c4c7
Matou:sandcastle/worker/20261017-050606-f20d66
Matou:sandcastle/rescue-20261017-052443
Matou:sandcastle/worker/20261017-050839-ec5b54
Matou:sandcastle/rescue-20261017-052212
Matou:sandcastle/worker/20261017-050442-495e4b
Matou:sandcastle/rescue-20261017-051857
Matou:sandcastle/worker/20261017-000426-34fa18
Matou:agent/issue-272
Matou:agent/issue-273
Matou:agent/issue-244
Matou:agent/issue-269
Matou:sandcastle/rescue-20261016-184726
Matou:sandcastle/rescue-20261016-184906
Matou:sandcastle/rescue-20261016-185533
Matou:sandcastle/rescue-20261016-191907
Matou:sandcastle/rescue-20261016-192219
Matou:sandcastle/worker/20261016-155725-c51ed1
Matou:agent/issue-195
Matou:agent/issue-196
Matou:agent/issue-197
Matou:agent/issue-198
Matou:agent/issue-200
Matou:agent/issue-203
Matou:agent/issue-205
Matou:agent/issue-206
Matou:agent/issue-207
Matou:agent/issue-209
Matou:agent/issue-213
Matou:agent/issue-216
Matou:agent/issue-217
Matou:agent/issue-218
Matou:agent/issue-222
Matou:agent/issue-238
Matou:agent/issue-208
Matou:sandcastle/worker/20261016-155833-1b8f77
Matou:agent/issue-241
Matou:agent/issue-230
Matou:agent/issue-239
Matou:land/issue-193
Matou:forward-port/idss-2048
Matou:backport/idss-2048
Matou:agent/issue-237
Matou:agent/issue-225
Matou:agent/issue-176
Matou:backport/1717-unclaimed-commit-gate
Matou:backport/1733-drive-yield-runlog
Matou:fix/159-rehearsal-report-token-leak
Matou:fix/157-ready-list-standdown
Matou:fix/154-verdict-no-match-trap
Matou:factory-floor-visual-rework
Matou:landing-shell-guard
No reviewers
Labels
Clear labels
agent-blocked
Sandcastle hit a blocker — human resolves it, then re-adds ready-for-agent
agent-working
Claimed by a live swarm run — other hosts skip it
bug
Something is broken
deferred
Ruled defer-with-criteria: parked until a revisit criterion in the issue body fires
enhancement
New feature or improvement
landing-pr
Additive: this ticket lands ONLY by a PR with screenshots (or a waiver) that a human merges — ADR 0265. Only a human removes it.
model-haiku
Per-ticket model override (additive): run this ticket on the cheap/fast model
model-opus
Per-ticket model override (additive): run this ticket on the top-tier model
model-sonnet
Per-ticket model override (additive): run this ticket on the mid-tier model
needs-info
Waiting on reporter for more information
needs-triage
Maintainer needs to evaluate this issue
no-triage
Escape hatch: triage automation must skip this issue
priority
Additive urgency marker — the swarm queue works these first
ready-for-agent
Fully specified, ready for an AFK agent
ready-for-human
Needs the human's hands, eyes, or a one-way-door ruling (ADR 0174)
ready-for-session
Needs an interactive agent session (host creds/protected paths/live doors), not the human (ADR 0174)
wontfix
Will not be actioned
No labels
agent-blocked
agent-working
bug
deferred
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
ready-for-agent
ready-for-human
ready-for-session
wontfix
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
Matou/dev-factory!229
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/issue-193"
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?
closes #193
#193 — push mode: the worker never pushes
main; the HOST lands after verifyIn
LANDING=push, the worker prompt told the agent togit push origin HEAD:refs/heads/mainfrom INSIDE the sandbox, before the host's post-run gatesran — so
verify_protected_paths/landing_stageran AFTER the commit wasalready on origin/main and the protected-path rollback was cosmetic. This moves
the push-to-main OFF the sandbox: the worker pushes its per-run worker branch and
the HOST promotes it to
mainonly after the verify gates, so the gatesgenuinely gate (the "human-or-host gate AFTER the agent" shape).
Changes
policy-lib.sh— the"landing": "push"branch ofpolicy_landing_guidancenow pushes
HEAD:refs/heads/$(git rev-parse --abbrev-ref HEAD)(thesandcastle/worker/<run>branch), nevermain; the in-sandbox rebase + the#217 re-test ladder are removed (the host owns the rescue ladder #207).
verify-lib.sh—PP_ENFORCEdefaults ON (the rollback is no longercosmetic);
verify_protected_pathsraisesVERIFY_PP_VIOLATION.landing-lib.sh— newlanding_pp_breach_guard: the land seam neverpushes a flagged protected-path breach to
main(parks a rescue, reds the run).close-report.sh— push-mode gate 1 verifies reachability from theworker-branch head pre-land; a commit on neither the worker branch nor
mainis a safe refusal.
.sandcastle/*prompt.md+ the idss cutover fixture),byte-identical cutover re-proven.
Acceptance
main(worker branch instead). (policy-lib.sh, re-rendered prompts,tests/policy-lib-test.sh,tests/prompt-render-lib-test.sh,tests/worker-conflict-retest-prompt-test.sh)tests/landing-lib-test.sh: worker branch present, protected path touched → NOT landed, rescue parked, run red.tests/run-swarm-landing-test.sh: verify runs before any push tomain(static ordering + behavioural).onboarding/tests/onboard-lib-test.sh)..sandcastle/swarm-policy.sh=LANDING=pr(already set by #220; stays until the coordinated re-vendor — see below).PP_ENFORCE=1flipped (pairs with #208).Notes for review
re-vendors
.sandcastle+ bumpsFACTORY_REF(GOTCHAS 4). dev-factory staysLANDING=pruntil then — reverting topushsooner would restore the oldworker-pushes-main behaviour the vendored copy still carries. The revert rides
the coordinated re-vendor (#205/#218/#228).
main"assertion; a pinned-host-test land gate (
LANDING_TEST_CMDis unset acrossconsumers and
landing_run_pinned_testsfails CLOSED, so gating every land onit would park every run).
push path #203.
Screenshots: none — a harness/prompt/test change (shell libs + rendered prompt text + offline tests); no visible UI surface. Evidence is the offline suite (green) cited above.
The push-mode landing guidance (policy_landing_guidance, rendered into every consumer's prompt via {{LANDING_RULES}}) no longer tells the worker to `git push origin HEAD:refs/heads/main` from the sandbox. The worker pushes its per-run worker branch (HEAD:refs/heads/$(git rev-parse --abbrev-ref HEAD), the sandcastle/worker/<run> branch it is on); the HOST promotes it to main only after the post-run verify gates (worker-birth + the protected-path boundary). The gates that were cosmetic while the worker pushed main itself now genuinely gate. The in-sandbox rebase + the #217 re-test ladder are gone (a worker branch has no main conflict; the host owns the rebase-rescue ladder #207). Key decisions / files: - policy-lib.sh: rewrite the "landing": "push" branch (worker branch, never main). - verify-lib.sh: PP_ENFORCE defaults ON (rollback now keeps a breach off main); verify_protected_paths raises VERIFY_PP_VIOLATION. - landing-lib.sh: new landing_pp_breach_guard — the land seam never pushes a flagged protected-path breach to main (parks a rescue, reds the run). - close-report.sh: push-mode gate 1 verifies reachability from the worker-branch head pre-land (origin/<wb>); a commit on neither the worker branch nor main is a safe refusal, never a false close. - Prompts re-rendered: .sandcastle/*prompt.md (per-repo layer) + onboarding/tests/fixtures/idss-prompts/prompt.md; cutover re-proven byte-identical. - Tests: policy-lib, prompt-render, worker-conflict-retest (re-anchored), verify-lib (PP default-on + VERIFY_PP_VIOLATION), landing-lib (breach->rescue), run-swarm-landing (verify-before-push ordering), close-report (WB worker-branch gate 1). Full offline suite green. Deferred (not formal ACs): explicit HOST post-land "reachable from main" check; a pinned-host-test land gate (LANDING_TEST_CMD unset across consumers -> would fail-closed-park every run). dev-factory STAYS LANDING=pr until the coordinated re-vendor carries this into the running .sandcastle copy (reverting sooner would restore the old worker-pushes-main behaviour the vendored copy still has). Out of scope: reviewer agent #197, server-side branch protection #194, healer push path #203. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Superseded by PR #245 (the same commit rebased onto main after #232; merged fast-forward as
0d638e1). Closed without merge — #193 is closed by #245.Pull request closed