Push mode: workers must never push main from the sandbox — the HOST lands after verify #193

Closed
opened 2026-10-15 02:58:51 +00:00 by ben · 8 comments
Owner

Filed from the 2026-10-14 infrastructure review (Claude Code session on Ben's workstation; four parallel read-only review passes over the root harness). Line anchors are against main at 3e50274.

Symptom

In LANDING=push (the default, and what dev-factory itself runs — no .sandcastle/swarm-policy.sh), the worker prompt step 6 (.sandcastle/prompt.md:163-172) has the agent git push origin HEAD:refs/heads/main from INSIDE the sandbox, before the close-report gate (step 7). verify_protected_paths (run-swarm.sh:401) and landing_stage (run-swarm.sh:404) run after the commit is already on origin/main, so the protected-path rollback (verify-lib.sh:184-186) is cosmetic. Nothing human and nothing independent touches the diff. The only mechanical check on that push is the in-sandbox pre-push hook (lint for TS, Go seam for Go, nothing for bash/python/docs).

This is the "dark factory" shape the Sept/Oct 2026 practitioner reports warn about (HumanLayer shut theirs down after a corrupted codebase; the consensus pattern is human-or-host gates AFTER the agent, not before). For the factory core — vendored byte-identical into six consumers — a bad harness commit on main reaches every consumer at its next pin bump.

Proposed change

  1. Prompt skeleton step 6: push to sandcastle/worker/<run>-<issue> (never main). land-pr.sh already does the branch dance for pr mode; reuse its push path.
  2. landing_stage (host side) lands the worker branch onto main ONLY after verify_workers + verify_protected_paths (with PP_ENFORCE=1, see #208) + the repo's pinned test command pass on the host checkout.
  3. close-report gate 1 verifies reachability from the worker branch head, then from main after the host lands.
  4. Flip dev-factory's own policy to LANDING=pr (.sandcastle/swarm-policy.sh) until 1-3 land, so harness changes get a human merge.

Acceptance

  • A worker that runs git push origin HEAD:refs/heads/main in the sandbox is refused (see #194 for the server-side half) and the prompt no longer instructs it.
  • tests/landing-lib-test.sh gains a scenario: worker branch present, protected path touched → NOT landed, rescue branch parked, run red.
  • tests/run-swarm-landing-test.sh proves ordering: verify runs before any push to main.
  • Prompt skeleton change re-proven byte-identical in onboarding/tests/onboard-lib-test.sh fixtures (deliberately updated, wording explained).

out_of_scope

Reviewer agent (#197), branch protection (#194), healer push path (#203).

needs_human_decision

Whether dev-factory itself moves to LANDING=pr immediately (proposed default: yes — two-way door, one policy file).

_Filed from the 2026-10-14 infrastructure review (Claude Code session on Ben's workstation; four parallel read-only review passes over the root harness). Line anchors are against `main` at 3e50274._ ## Symptom In `LANDING=push` (the default, and what dev-factory itself runs — no `.sandcastle/swarm-policy.sh`), the worker prompt step 6 (`.sandcastle/prompt.md:163-172`) has the agent `git push origin HEAD:refs/heads/main` from INSIDE the sandbox, before the close-report gate (step 7). `verify_protected_paths` (`run-swarm.sh:401`) and `landing_stage` (`run-swarm.sh:404`) run after the commit is already on origin/main, so the protected-path rollback (`verify-lib.sh:184-186`) is cosmetic. Nothing human and nothing independent touches the diff. The only mechanical check on that push is the in-sandbox pre-push hook (lint for TS, Go seam for Go, nothing for bash/python/docs). This is the "dark factory" shape the Sept/Oct 2026 practitioner reports warn about (HumanLayer shut theirs down after a corrupted codebase; the consensus pattern is human-or-host gates AFTER the agent, not before). For the factory core — vendored byte-identical into six consumers — a bad harness commit on main reaches every consumer at its next pin bump. ## Proposed change 1. Prompt skeleton step 6: push to `sandcastle/worker/<run>-<issue>` (never main). `land-pr.sh` already does the branch dance for pr mode; reuse its push path. 2. `landing_stage` (host side) lands the worker branch onto main ONLY after `verify_workers` + `verify_protected_paths` (with `PP_ENFORCE=1`, see #208) + the repo's pinned test command pass on the host checkout. 3. close-report gate 1 verifies reachability from the worker branch head, then from main after the host lands. 4. Flip dev-factory's own policy to `LANDING=pr` (`.sandcastle/swarm-policy.sh`) until 1-3 land, so harness changes get a human merge. ## Acceptance - A worker that runs `git push origin HEAD:refs/heads/main` in the sandbox is refused (see #194 for the server-side half) and the prompt no longer instructs it. - `tests/landing-lib-test.sh` gains a scenario: worker branch present, protected path touched → NOT landed, rescue branch parked, run red. - `tests/run-swarm-landing-test.sh` proves ordering: verify runs before any push to main. - Prompt skeleton change re-proven byte-identical in `onboarding/tests/onboard-lib-test.sh` fixtures (deliberately updated, wording explained). ## out_of_scope Reviewer agent (#197), branch protection (#194), healer push path (#203). ## needs_human_decision Whether dev-factory itself moves to `LANDING=pr` immediately (proposed default: yes — two-way door, one policy file).

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

  • Ruling: ready-for-agent.
  • Why this is a two-way door: a security tightening — it moves the main push behind the host's post-agent verify so the existing protected-path/verify gates actually gate (today they are cosmetic in push mode); revertible via the prompt-skeleton + landing-lib edits. The reporter's one self-posed needs_human_decision (flip dev-factory to LANDING=pr) he answered himself as a two-way door (one policy file), so no one-way residue remains.
  • What proves it: tests/landing-lib-test.sh (worker branch + protected-path touch → not landed, rescue parked, run red), tests/run-swarm-landing-test.sh (verify runs before any push to main), and the byte-identical cutover fixtures for the skeleton change.

Agent Brief

Category: enhancement (security tightening)

Summary: In LANDING=push, move the push-to-main out of the sandbox. The worker pushes a worker branch; the HOST promotes it to main only after the post-agent verify gates and the pinned test command pass.

Current behavior: The push-mode landing block tells the worker to push HEAD:refs/heads/main from inside the sandbox before close-report, so verify_workers / verify_protected_paths and the land stage run after the commit is already on origin/main — the rollback is cosmetic.

Desired behavior: The worker pushes to a per-run worker branch, never main. Host-side landing promotes that branch to main only after worker verification, protected-path enforcement (with enforcement ON, pairing with #208), and the repo's pinned test command all pass on the host checkout. close-report gate 1 verifies reachability from the worker-branch head pre-land and from main post-land. The generated push-mode landing rules no longer instruct a direct push to main.

Key interfaces (contracts only):

  • Worker push target in push mode = a per-run worker branch; a direct HEAD:refs/heads/main from the sandbox is refused (server-side half is #194).
  • Host landing promotes the worker branch to main only after verify + protected-path enforcement + pinned tests pass; a protected-path touch means NOT landed, work parked on a rescue branch, run red.
  • close-report gate 1 checks reachability from the worker-branch head before land and from main after.
  • The policy-generated landing-rules block reflects the branch-then-host-land flow.

Acceptance criteria:

  • The prompt no longer instructs a worker to push to main; a worker that attempts git push origin HEAD:refs/heads/main in the sandbox is refused.
  • tests/landing-lib-test.sh scenario: worker branch present, protected path touched → NOT landed, rescue branch parked, run red.
  • tests/run-swarm-landing-test.sh proves verify runs before any push to main.
  • Prompt-skeleton change re-proven byte-identical (deliberately updated, wording explained) in the onboarding cutover fixtures.
  • dev-factory's own .sandcastle/swarm-policy.sh set to LANDING=pr as the interim rail until the above lands (two-way door, one policy file).
  • Full offline suite green.

Out of scope: Reviewer agent (#197), server-side branch protection (#194), healer push path (#203). PP_ENFORCE default (#208) is a tightly-coupled companion — land it in step so the AC's enforcement is real, not cosmetic.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** - **Ruling:** `ready-for-agent`. - **Why this is a two-way door:** a security *tightening* — it moves the main push behind the host's post-agent verify so the existing protected-path/verify gates actually gate (today they are cosmetic in push mode); revertible via the prompt-skeleton + landing-lib edits. The reporter's one self-posed `needs_human_decision` (flip dev-factory to `LANDING=pr`) he answered himself as a two-way door (one policy file), so no one-way residue remains. - **What proves it:** `tests/landing-lib-test.sh` (worker branch + protected-path touch → not landed, rescue parked, run red), `tests/run-swarm-landing-test.sh` (verify runs before any push to main), and the byte-identical cutover fixtures for the skeleton change. ## Agent Brief **Category:** enhancement (security tightening) **Summary:** In `LANDING=push`, move the push-to-main out of the sandbox. The worker pushes a worker branch; the HOST promotes it to main only after the post-agent verify gates and the pinned test command pass. **Current behavior:** The push-mode landing block tells the worker to push `HEAD:refs/heads/main` from inside the sandbox before close-report, so `verify_workers` / `verify_protected_paths` and the land stage run after the commit is already on origin/main — the rollback is cosmetic. **Desired behavior:** The worker pushes to a per-run worker branch, never main. Host-side landing promotes that branch to main only after worker verification, protected-path enforcement (with enforcement ON, pairing with #208), and the repo's pinned test command all pass on the host checkout. close-report gate 1 verifies reachability from the worker-branch head pre-land and from main post-land. The generated push-mode landing rules no longer instruct a direct push to main. **Key interfaces (contracts only):** - Worker push target in push mode = a per-run worker branch; a direct `HEAD:refs/heads/main` from the sandbox is refused (server-side half is #194). - Host landing promotes the worker branch to main only after verify + protected-path enforcement + pinned tests pass; a protected-path touch means NOT landed, work parked on a rescue branch, run red. - close-report gate 1 checks reachability from the worker-branch head before land and from main after. - The policy-generated landing-rules block reflects the branch-then-host-land flow. **Acceptance criteria:** - [ ] The prompt no longer instructs a worker to push to main; a worker that attempts `git push origin HEAD:refs/heads/main` in the sandbox is refused. - [ ] `tests/landing-lib-test.sh` scenario: worker branch present, protected path touched → NOT landed, rescue branch parked, run red. - [ ] `tests/run-swarm-landing-test.sh` proves verify runs before any push to main. - [ ] Prompt-skeleton change re-proven byte-identical (deliberately updated, wording explained) in the onboarding cutover fixtures. - [ ] dev-factory's own `.sandcastle/swarm-policy.sh` set to `LANDING=pr` as the interim rail until the above lands (two-way door, one policy file). - [ ] Full offline suite green. **Out of scope:** Reviewer agent (#197), server-side branch protection (#194), healer push path (#203). PP_ENFORCE default (#208) is a tightly-coupled companion — land it in step so the AC's enforcement is real, not cosmetic.

Blocked — depends on a protected-path + prompt-redesign change, now filed as #220 (ready-for-session).

Worked this under run=21817. The core cannot land as an agent iteration because three of six acceptance clauses require editing protected paths (protected-paths-lib.sh fingerprints all of .sandcastle/ and rolls back any create/change/delete, redding the run), and the prompt change has factory-wide blast radius:

  • AC#1 ("the prompt no longer instructs a worker to push to main"): the git push origin HEAD:refs/heads/main instruction is step 6 of the per-consumer workflow-verify enrichment (.sandcastle/prompt-enrichments/workflow-verify.md), not the prompts/prompt.md skeleton. policy_landing_guidance (push mode) merely defers to it ("land exactly as the workflow above says"). No root-file edit removes it; rewriting only policy-lib.sh would make the rendered prompt contradict the still-present step 6, and that text reaches every consumer at the next pin bump.
  • AC#4 (skeleton change re-proven byte-identical in cutover fixtures): same — the change is enrichment-resident, not in the skeleton.
  • AC#5 (create .sandcastle/swarm-policy.sh = LANDING=pr): a protected-path creation, rolled back on sight.

AC#2/AC#3 (host-side landing_land_worker_branch + ordering tests) describe a flow that only coheres after the worker stops pushing main, so pre-building them would be untriggerable dead code in a byte-identical-vendored core against an unsettled design (coordinated with #194/#197/#208). I did not ship that.

What a human/session must do to re-arm: land #220 (relocate the push-mode landing instruction into harness {{LANDING_RULES}}, remove it from the workflow-verify enrichment, re-render + re-vendor dev-factory's .sandcastle/, create .sandcastle/swarm-policy.sh = LANDING=pr, sequence #208 PP_ENFORCE=1). Once #220 lands, #193's remaining purely-harness mechanics (landing-lib.sh host-land, run-swarm.sh ordering, close-report two-phase gate 1, with tests/landing-lib-test.sh + tests/run-swarm-landing-test.sh) become an ordinary agent iteration; re-add ready-for-agent then.

No code was pushed for #193 this run.

**Blocked — depends on a protected-path + prompt-redesign change, now filed as #220 (`ready-for-session`).** Worked this under run=21817. The core cannot land as an agent iteration because three of six acceptance clauses require editing **protected paths** (`protected-paths-lib.sh` fingerprints all of `.sandcastle/` and rolls back any create/change/delete, redding the run), and the prompt change has factory-wide blast radius: - **AC#1** ("the prompt no longer instructs a worker to push to main"): the `git push origin HEAD:refs/heads/main` instruction is step 6 of the **per-consumer `workflow-verify` enrichment** (`.sandcastle/prompt-enrichments/workflow-verify.md`), not the `prompts/prompt.md` skeleton. `policy_landing_guidance` (push mode) merely defers to it ("land exactly as the workflow above says"). No root-file edit removes it; rewriting only `policy-lib.sh` would make the rendered prompt contradict the still-present step 6, and that text reaches every consumer at the next pin bump. - **AC#4** (skeleton change re-proven byte-identical in cutover fixtures): same — the change is enrichment-resident, not in the skeleton. - **AC#5** (create `.sandcastle/swarm-policy.sh` = `LANDING=pr`): a protected-path creation, rolled back on sight. AC#2/AC#3 (host-side `landing_land_worker_branch` + ordering tests) describe a flow that only coheres **after** the worker stops pushing main, so pre-building them would be untriggerable dead code in a byte-identical-vendored core against an unsettled design (coordinated with #194/#197/#208). I did not ship that. **What a human/session must do to re-arm:** land #220 (relocate the push-mode landing instruction into harness `{{LANDING_RULES}}`, remove it from the `workflow-verify` enrichment, re-render + re-vendor dev-factory's `.sandcastle/`, create `.sandcastle/swarm-policy.sh` = `LANDING=pr`, sequence #208 `PP_ENFORCE=1`). Once #220 lands, #193's remaining purely-harness mechanics (`landing-lib.sh` host-land, `run-swarm.sh` ordering, close-report two-phase gate 1, with `tests/landing-lib-test.sh` + `tests/run-swarm-landing-test.sh`) become an ordinary agent iteration; re-add `ready-for-agent` then. No code was pushed for #193 this run.

Re-armed: #220 landed, so #193's remaining mechanics are now an ordinary agent iteration. (Done by the standing session that worked #220, under ADR 0174.)

#220 (closed) relocated the push-mode landing instruction out of the protected workflow-verify enrichment into the harness {{LANDING_RULES}} (policy_landing_guidance in policy-lib.sh) — so AC#1 is now editable from root files, not a protected path. It also set dev-factory's .sandcastle/swarm-policy.sh = LANDING=pr (the interim rail — live now) and ruled PP_ENFORCE stays OFF until THIS ticket lands the host-land mechanics (enabling it before the worker-branch flow exists would roll back legitimate direct-to-main machinery work).

What remains here, all root-file edits an agent iteration can make + test offline:

  • Prompt (AC#1 behaviour): change the push branch of policy_landing_guidance (policy-lib.sh) from "push to origin/main" to "push to a per-run worker branch sandcastle/worker/<run>-<issue>, never main". Re-prove the cutover fixtures + re-anchor tests/worker-conflict-retest-prompt-test.sh (the #217 ladder shifts to the host-land path). NB: #220 preserved today's direct-push behaviour deliberately — only the location moved — so this is the behavioural half.
  • landing-lib.sh host-land: promote the worker branch to main ONLY after verify_workers + verify_protected_paths (PP_ENFORCE=1) + the pinned host tests; a protected-path touch → NOT landed, rescue parked, run red (tests/landing-lib-test.sh).
  • run-swarm.sh ordering: verify before any push to main (tests/run-swarm-landing-test.sh).
  • close-report gate 1: reachability from the worker-branch head pre-land, from main post-land.
  • Flip PP_ENFORCE=1 (verify-lib.sh) in the same change (pairs with #208) so the enforcement is real, not cosmetic.

Still out of scope (as before): reviewer agent #197, server-side branch protection #194, healer push path #203.

Note: dev-factory is now LANDING=pr, so this ticket's own work will land via a human-merged PR (the rail), not a direct push.

Swapping agent-blocked → ready-for-agent.

**Re-armed: #220 landed, so #193's remaining mechanics are now an ordinary agent iteration.** (Done by the standing session that worked #220, under ADR 0174.) #220 (closed) relocated the push-mode landing instruction out of the protected `workflow-verify` enrichment into the harness `{{LANDING_RULES}}` (`policy_landing_guidance` in `policy-lib.sh`) — so **AC#1 is now editable from root files**, not a protected path. It also set dev-factory's `.sandcastle/swarm-policy.sh` = `LANDING=pr` (the interim rail — live now) and ruled `PP_ENFORCE` stays OFF until THIS ticket lands the host-land mechanics (enabling it before the worker-branch flow exists would roll back legitimate direct-to-main machinery work). What remains here, all root-file edits an agent iteration can make + test offline: - **Prompt (AC#1 behaviour):** change the `push` branch of `policy_landing_guidance` (`policy-lib.sh`) from "push to origin/main" to "push to a per-run worker branch `sandcastle/worker/<run>-<issue>`, never main". Re-prove the cutover fixtures + re-anchor `tests/worker-conflict-retest-prompt-test.sh` (the #217 ladder shifts to the host-land path). NB: #220 preserved today's direct-push behaviour deliberately — only the location moved — so this is the behavioural half. - **`landing-lib.sh`** host-land: promote the worker branch to main ONLY after `verify_workers` + `verify_protected_paths` (`PP_ENFORCE=1`) + the pinned host tests; a protected-path touch → NOT landed, rescue parked, run red (`tests/landing-lib-test.sh`). - **`run-swarm.sh`** ordering: verify before any push to main (`tests/run-swarm-landing-test.sh`). - **close-report gate 1:** reachability from the worker-branch head pre-land, from main post-land. - **Flip `PP_ENFORCE=1`** (`verify-lib.sh`) in the same change (pairs with #208) so the enforcement is real, not cosmetic. Still out of scope (as before): reviewer agent #197, server-side branch protection #194, healer push path #203. Note: dev-factory is now `LANDING=pr`, so this ticket's own work will land via a human-merged PR (the rail), not a direct push. Swapping `agent-blocked` → `ready-for-agent`.

close-report for #193 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • changed_files: the claimed commits touch 'tests/worker-conflict-retest-prompt-test.sh', which changed_files does not list — claim every file you changed (#206)
envelope
{
  "issue": 193,
  "status": "success",
  "commits": [
    "979d55f1c0b805ad2915753e327fe64cea01263d"
  ],
  "changed_files": [
    ".sandcastle/prompt.md",
    "STATUS.md",
    "close-report.sh",
    "docs/journal/2026-10-15-193.md",
    "landing-lib.sh",
    "onboarding/tests/fixtures/idss-prompts/prompt.md",
    "policy-lib.sh",
    "tests/close-report-test.sh",
    "tests/landing-lib-test.sh",
    "tests/policy-lib-test.sh",
    "tests/prompt-render-lib-test.sh",
    "tests/run-swarm-landing-test.sh",
    "tests/verify-lib-test.sh",
    "verify-lib.sh"
  ],
  "tests": [
    {
      "command": "bash tests/policy-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/prompt-render-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/worker-conflict-retest-prompt-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/verify-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/landing-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/run-swarm-landing-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/close-report-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/onboard-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "full offline suite loop (tests/*.sh onboarding/tests/*.sh)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The prompt no longer instructs a worker to push to main; it pushes a per-run worker branch": "policy-lib.sh policy_landing_guidance push branch rewritten (pushes HEAD:refs/heads/$(git rev-parse --abbrev-ref HEAD), never main); re-rendered into .sandcastle/prompt.md + idss fixture; tests/policy-lib-test.sh, tests/prompt-render-lib-test.sh, tests/worker-conflict-retest-prompt-test.sh",
    "tests/landing-lib-test.sh scenario: worker branch present, protected path touched -> NOT landed, rescue parked, run red": "landing-lib.sh landing_pp_breach_guard + landing_stage push-mode guard; tests/landing-lib-test.sh #193 breach scenario (rc 1, rescue parked, no HEAD:main, reason protected-path-violation)",
    "tests/run-swarm-landing-test.sh proves verify runs before any push to main": "tests/run-swarm-landing-test.sh scenario 9 (static: verify_protected_paths before landing_stage + || exit 1; behavioural: a flagged breach never reaches a push to main)",
    "Prompt-skeleton change re-proven byte-identical in the onboarding cutover fixtures": "onboarding/tests/fixtures/idss-prompts/prompt.md updated + .sandcastle/prompt.md re-rendered; onboarding/tests/onboard-lib-test.sh green (idss + dev-factory cutover byte-identical)",
    "dev-factory's .sandcastle/swarm-policy.sh set to LANDING=pr": "already set by #220 (unchanged); stays as the rail until the coordinated re-vendor carries this change into the running copy (documented in STATUS.md + journal)",
    "Full offline suite green": "full suite loop run; all tests/*.sh + onboarding/tests/*.sh pass",
    "PP_ENFORCE=1 flipped (pairs with #208)": "verify-lib.sh PP_ENFORCE defaults 1 (verify_pp_snapshot + verify_protected_paths); tests/verify-lib-test.sh default-on + VERIFY_PP_VIOLATION checks"
  },
  "summary": "Push mode: the worker pushes its per-run worker branch (never main) and the HOST lands main only after the verify gates; PP_ENFORCE now defaults on, the land seam refuses a flagged breach, and close-report gate 1 verifies the worker-branch head pre-land.",
  "blockers": []
}
**close-report** for #193 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - changed_files: the claimed commits touch 'tests/worker-conflict-retest-prompt-test.sh', which changed_files does not list — claim every file you changed (#206) <details><summary>envelope</summary> ```json { "issue": 193, "status": "success", "commits": [ "979d55f1c0b805ad2915753e327fe64cea01263d" ], "changed_files": [ ".sandcastle/prompt.md", "STATUS.md", "close-report.sh", "docs/journal/2026-10-15-193.md", "landing-lib.sh", "onboarding/tests/fixtures/idss-prompts/prompt.md", "policy-lib.sh", "tests/close-report-test.sh", "tests/landing-lib-test.sh", "tests/policy-lib-test.sh", "tests/prompt-render-lib-test.sh", "tests/run-swarm-landing-test.sh", "tests/verify-lib-test.sh", "verify-lib.sh" ], "tests": [ { "command": "bash tests/policy-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/prompt-render-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/worker-conflict-retest-prompt-test.sh", "exit_code": 0 }, { "command": "bash tests/verify-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/landing-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/run-swarm-landing-test.sh", "exit_code": 0 }, { "command": "bash tests/close-report-test.sh", "exit_code": 0 }, { "command": "bash onboarding/tests/onboard-lib-test.sh", "exit_code": 0 }, { "command": "full offline suite loop (tests/*.sh onboarding/tests/*.sh)", "exit_code": 0 } ], "criteria": { "The prompt no longer instructs a worker to push to main; it pushes a per-run worker branch": "policy-lib.sh policy_landing_guidance push branch rewritten (pushes HEAD:refs/heads/$(git rev-parse --abbrev-ref HEAD), never main); re-rendered into .sandcastle/prompt.md + idss fixture; tests/policy-lib-test.sh, tests/prompt-render-lib-test.sh, tests/worker-conflict-retest-prompt-test.sh", "tests/landing-lib-test.sh scenario: worker branch present, protected path touched -> NOT landed, rescue parked, run red": "landing-lib.sh landing_pp_breach_guard + landing_stage push-mode guard; tests/landing-lib-test.sh #193 breach scenario (rc 1, rescue parked, no HEAD:main, reason protected-path-violation)", "tests/run-swarm-landing-test.sh proves verify runs before any push to main": "tests/run-swarm-landing-test.sh scenario 9 (static: verify_protected_paths before landing_stage + || exit 1; behavioural: a flagged breach never reaches a push to main)", "Prompt-skeleton change re-proven byte-identical in the onboarding cutover fixtures": "onboarding/tests/fixtures/idss-prompts/prompt.md updated + .sandcastle/prompt.md re-rendered; onboarding/tests/onboard-lib-test.sh green (idss + dev-factory cutover byte-identical)", "dev-factory's .sandcastle/swarm-policy.sh set to LANDING=pr": "already set by #220 (unchanged); stays as the rail until the coordinated re-vendor carries this change into the running copy (documented in STATUS.md + journal)", "Full offline suite green": "full suite loop run; all tests/*.sh + onboarding/tests/*.sh pass", "PP_ENFORCE=1 flipped (pairs with #208)": "verify-lib.sh PP_ENFORCE defaults 1 (verify_pp_snapshot + verify_protected_paths); tests/verify-lib-test.sh default-on + VERIFY_PP_VIOLATION checks" }, "summary": "Push mode: the worker pushes its per-run worker branch (never main) and the HOST lands main only after the verify gates; PP_ENFORCE now defaults on, the land seam refuses a flagged breach, and close-report gate 1 verifies the worker-branch head pre-land.", "blockers": [] } ``` </details>

⏩ independent reviewer for #193 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #193 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #193 — status success

✅ close-report gates passed — every claim verified against the PR head. PR #229 (#229) is open and green; a human merges it and the merge closes this issue via closes #193 (MERGE_AUTHORITY=human).

envelope
{
  "issue": 193,
  "status": "success",
  "commits": [
    "979d55f1c0b805ad2915753e327fe64cea01263d"
  ],
  "changed_files": [
    ".sandcastle/prompt.md",
    "STATUS.md",
    "close-report.sh",
    "docs/journal/2026-10-15-193.md",
    "landing-lib.sh",
    "onboarding/tests/fixtures/idss-prompts/prompt.md",
    "policy-lib.sh",
    "tests/close-report-test.sh",
    "tests/landing-lib-test.sh",
    "tests/policy-lib-test.sh",
    "tests/prompt-render-lib-test.sh",
    "tests/run-swarm-landing-test.sh",
    "tests/verify-lib-test.sh",
    "tests/worker-conflict-retest-prompt-test.sh",
    "verify-lib.sh"
  ],
  "tests": [
    {
      "command": "bash tests/policy-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/prompt-render-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/worker-conflict-retest-prompt-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/verify-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/landing-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/run-swarm-landing-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/close-report-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/onboard-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "full offline suite loop (tests/*.sh onboarding/tests/*.sh)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The prompt no longer instructs a worker to push to main; it pushes a per-run worker branch": "policy-lib.sh policy_landing_guidance push branch rewritten (pushes HEAD:refs/heads/$(git rev-parse --abbrev-ref HEAD), never main); re-rendered into .sandcastle/prompt.md + idss fixture; tests/policy-lib-test.sh, tests/prompt-render-lib-test.sh, tests/worker-conflict-retest-prompt-test.sh",
    "tests/landing-lib-test.sh scenario: worker branch present, protected path touched -> NOT landed, rescue parked, run red": "landing-lib.sh landing_pp_breach_guard + landing_stage push-mode guard; tests/landing-lib-test.sh #193 breach scenario (rc 1, rescue parked, no HEAD:main, reason protected-path-violation)",
    "tests/run-swarm-landing-test.sh proves verify runs before any push to main": "tests/run-swarm-landing-test.sh scenario 9 (static: verify_protected_paths before landing_stage + || exit 1; behavioural: a flagged breach never reaches a push to main)",
    "Prompt-skeleton change re-proven byte-identical in the onboarding cutover fixtures": "onboarding/tests/fixtures/idss-prompts/prompt.md updated + .sandcastle/prompt.md re-rendered; onboarding/tests/onboard-lib-test.sh green (idss + dev-factory cutover byte-identical)",
    "dev-factory's .sandcastle/swarm-policy.sh set to LANDING=pr": "already set by #220 (unchanged); stays as the rail until the coordinated re-vendor carries this change into the running copy (documented in STATUS.md + journal)",
    "Full offline suite green": "full suite loop run; all tests/*.sh + onboarding/tests/*.sh pass",
    "PP_ENFORCE=1 flipped (pairs with #208)": "verify-lib.sh PP_ENFORCE defaults 1 (verify_pp_snapshot + verify_protected_paths); tests/verify-lib-test.sh default-on + VERIFY_PP_VIOLATION checks"
  },
  "summary": "Push mode: the worker pushes its per-run worker branch (never main) and the HOST lands main only after the verify gates; PP_ENFORCE now defaults on, the land seam refuses a flagged breach, and close-report gate 1 verifies the worker-branch head pre-land.",
  "blockers": []
}
**close-report** for #193 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the PR head. PR #229 (https://git.matou.nz/Matou/dev-factory/pulls/229) is open and green; a human merges it and the merge closes this issue via `closes #193` (MERGE_AUTHORITY=human). <details><summary>envelope</summary> ```json { "issue": 193, "status": "success", "commits": [ "979d55f1c0b805ad2915753e327fe64cea01263d" ], "changed_files": [ ".sandcastle/prompt.md", "STATUS.md", "close-report.sh", "docs/journal/2026-10-15-193.md", "landing-lib.sh", "onboarding/tests/fixtures/idss-prompts/prompt.md", "policy-lib.sh", "tests/close-report-test.sh", "tests/landing-lib-test.sh", "tests/policy-lib-test.sh", "tests/prompt-render-lib-test.sh", "tests/run-swarm-landing-test.sh", "tests/verify-lib-test.sh", "tests/worker-conflict-retest-prompt-test.sh", "verify-lib.sh" ], "tests": [ { "command": "bash tests/policy-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/prompt-render-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/worker-conflict-retest-prompt-test.sh", "exit_code": 0 }, { "command": "bash tests/verify-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/landing-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/run-swarm-landing-test.sh", "exit_code": 0 }, { "command": "bash tests/close-report-test.sh", "exit_code": 0 }, { "command": "bash onboarding/tests/onboard-lib-test.sh", "exit_code": 0 }, { "command": "full offline suite loop (tests/*.sh onboarding/tests/*.sh)", "exit_code": 0 } ], "criteria": { "The prompt no longer instructs a worker to push to main; it pushes a per-run worker branch": "policy-lib.sh policy_landing_guidance push branch rewritten (pushes HEAD:refs/heads/$(git rev-parse --abbrev-ref HEAD), never main); re-rendered into .sandcastle/prompt.md + idss fixture; tests/policy-lib-test.sh, tests/prompt-render-lib-test.sh, tests/worker-conflict-retest-prompt-test.sh", "tests/landing-lib-test.sh scenario: worker branch present, protected path touched -> NOT landed, rescue parked, run red": "landing-lib.sh landing_pp_breach_guard + landing_stage push-mode guard; tests/landing-lib-test.sh #193 breach scenario (rc 1, rescue parked, no HEAD:main, reason protected-path-violation)", "tests/run-swarm-landing-test.sh proves verify runs before any push to main": "tests/run-swarm-landing-test.sh scenario 9 (static: verify_protected_paths before landing_stage + || exit 1; behavioural: a flagged breach never reaches a push to main)", "Prompt-skeleton change re-proven byte-identical in the onboarding cutover fixtures": "onboarding/tests/fixtures/idss-prompts/prompt.md updated + .sandcastle/prompt.md re-rendered; onboarding/tests/onboard-lib-test.sh green (idss + dev-factory cutover byte-identical)", "dev-factory's .sandcastle/swarm-policy.sh set to LANDING=pr": "already set by #220 (unchanged); stays as the rail until the coordinated re-vendor carries this change into the running copy (documented in STATUS.md + journal)", "Full offline suite green": "full suite loop run; all tests/*.sh + onboarding/tests/*.sh pass", "PP_ENFORCE=1 flipped (pairs with #208)": "verify-lib.sh PP_ENFORCE defaults 1 (verify_pp_snapshot + verify_protected_paths); tests/verify-lib-test.sh default-on + VERIFY_PP_VIOLATION checks" }, "summary": "Push mode: the worker pushes its per-run worker branch (never main) and the HOST lands main only after the verify gates; PP_ENFORCE now defaults on, the land seam refuses a flagged breach, and close-report gate 1 verifies the worker-branch head pre-land.", "blockers": [] } ``` </details>
Author
Owner

Interactive claim (Ben's Claude Code session, 2026-10-16T15:37:18Z): rebasing the PR onto current main, re-running the offline suite, then merging as MERGE_AUTHORITY=human. agent-working set so the swarm skips this ticket meanwhile.

Interactive claim (Ben's Claude Code session, 2026-10-16T15:37:18Z): rebasing the PR onto current `main`, re-running the offline suite, then merging as MERGE_AUTHORITY=human. `agent-working` set so the swarm skips this ticket meanwhile.
Author
Owner

Rebased onto main + the rebased #230 branch (cf02cae) by Ben's Claude Code session, 2026-10-16, and pushed as land/issue-193 (0d638e1) — a force-update of agent/issue-193 was not permitted from this session, so PR #229 still points at the stale head until that branch is updated or a PR is opened from land/issue-193.

Conflicts resolved (5 files, all one hunk): policy-lib.sh keeps #222's credential-free parenthetical (this PR's swarm:$token@ fallback is exactly what #222 removed) on top of #193's worker-branch push target; tests/policy-lib-test.sh merges both assertion sets (per-run-branch push, no push to main, HOST lands, nothing unverified, AND no token URL / credential-helper named) and drops the now-moot $FORGEJO_API token-remote assert; .sandcastle/prompt.md + the idss cutover fixture were RE-RENDERED from the resolved policy-lib.sh (not hand-merged); STATUS.md keeps the #230 single-header shape. Proof: the PR's 8 named tests + onboard-lib-test.sh (cutover byte-identical) green, full offline suite 0 failures. Merging this after #232 also unblocks #208 (dependency).

Rebased onto `main` + the rebased #230 branch (`cf02cae`) by Ben's Claude Code session, 2026-10-16, and pushed as `land/issue-193` (`0d638e1`) — a force-update of `agent/issue-193` was not permitted from this session, so PR #229 still points at the stale head until that branch is updated or a PR is opened from `land/issue-193`. Conflicts resolved (5 files, all one hunk): `policy-lib.sh` keeps #222's credential-free parenthetical (this PR's `swarm:$token@` fallback is exactly what #222 removed) on top of #193's worker-branch push target; `tests/policy-lib-test.sh` merges both assertion sets (per-run-branch push, no push to main, HOST lands, nothing unverified, AND no token URL / credential-helper named) and drops the now-moot `$FORGEJO_API` token-remote assert; `.sandcastle/prompt.md` + the idss cutover fixture were RE-RENDERED from the resolved `policy-lib.sh` (not hand-merged); `STATUS.md` keeps the #230 single-header shape. Proof: the PR's 8 named tests + `onboard-lib-test.sh` (cutover byte-identical) green, full offline suite 0 failures. Merging this after #232 also unblocks #208 (dependency).
ben closed this issue 2026-10-16 15:57:53 +00:00
Sign in to join this conversation.
No milestone
No project
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.

Reference
Matou/dev-factory#193
No description provided.