Per-ticket landing override: the landing-pr label (idss ADR 0265) #164

Closed
opened 2026-09-21 19:45:16 +00:00 by ben · 1 comment
Owner

What

Widen the policy layer (ADR 0002) from "per-repo" to "per-repo default, per-ticket
override": a ticket carrying the landing-pr label lands as LANDING=pr +
MERGE_AUTHORITY=human whatever the repo default, with a screenshots-or-waiver
evidence gate. Ruling: Matou/idss ADR 0265.

Plan

Matou/idss → docs/superpowers/plans/2026-09-21-per-ticket-landing-policy.md,
Tasks 5–12 (they are written against this repo's main, file by file, with
the test code). Work them in order; each ends green on bash tests/<name>-test.sh.
The sibling plan 2026-09-21-app-report-triage-safeguard.md Tasks 1–3 (the
fence-aware body-marker reader) land in this repo in the same window; idss then
takes ONE FACTORY_REF bump for both.

Why a session, not the swarm

Every file is factory machinery that judges worker output (landing-lib.sh,
policy-lib.sh, list-ready-tasks.sh, close-report.sh, run-swarm.sh).

Held with no-triage: Ben's interactive session of 2026-09-21 is working this
inline. Do not re-label it ready-for-session while that session is live — the
session runner would land it a second time.

Acceptance

  • Given a LANDING=push repo and a ready ticket carrying landing-pr at the head
    of the queue, when a run starts, then the sandbox lister shows that ticket only,
    the worker lands it with land-pr.sh on agent/issue-<N>, close-report leaves
    the issue OPEN awaiting a human merge, and landing_stage never pushes main.
  • Given the same repo and a head ticket WITHOUT the label, when a run starts, then
    no landing-pr ticket is visible to any of its iterations.
  • Given a ready ticket carrying landing-squash, when a run starts, then it aborts
    before a worker spawns with exit reason unknown-landing, naming the ticket.
  • Given a landing-pr PR with no image asset and no **Screenshots:** none — <reason>
    line, when close-report runs, then it refuses the close naming the missing evidence.
  • Given MERGE_AUTHORITY=agent-after-green and a green PR for a landing-pr ticket,
    when the merge reconcile runs, then the PR is NOT merged.
  • Given a repo with no landing-* labels anywhere, then every existing test passes
    unchanged and push mode makes no extra API call per ticket at list time.

out_of_scope

session-runner.sh and heal.sh (separate follow-up); branch protection.

## What Widen the policy layer (ADR 0002) from "per-repo" to "per-repo default, per-ticket override": a ticket carrying the `landing-pr` label lands as `LANDING=pr` + `MERGE_AUTHORITY=human` whatever the repo default, with a screenshots-or-waiver evidence gate. Ruling: `Matou/idss` ADR 0265. ## Plan `Matou/idss` → `docs/superpowers/plans/2026-09-21-per-ticket-landing-policy.md`, **Tasks 5–12** (they are written against this repo's `main`, file by file, with the test code). Work them in order; each ends green on `bash tests/<name>-test.sh`. The sibling plan `2026-09-21-app-report-triage-safeguard.md` Tasks 1–3 (the fence-aware body-marker reader) land in this repo in the same window; idss then takes ONE `FACTORY_REF` bump for both. ## Why a session, not the swarm Every file is factory machinery that judges worker output (`landing-lib.sh`, `policy-lib.sh`, `list-ready-tasks.sh`, `close-report.sh`, `run-swarm.sh`). **Held with `no-triage`: Ben's interactive session of 2026-09-21 is working this inline. Do not re-label it `ready-for-session` while that session is live — the session runner would land it a second time.** ## Acceptance - Given a `LANDING=push` repo and a ready ticket carrying `landing-pr` at the head of the queue, when a run starts, then the sandbox lister shows that ticket only, the worker lands it with `land-pr.sh` on `agent/issue-<N>`, close-report leaves the issue OPEN awaiting a human merge, and `landing_stage` never pushes `main`. - Given the same repo and a head ticket WITHOUT the label, when a run starts, then no `landing-pr` ticket is visible to any of its iterations. - Given a ready ticket carrying `landing-squash`, when a run starts, then it aborts before a worker spawns with exit reason `unknown-landing`, naming the ticket. - Given a `landing-pr` PR with no image asset and no `**Screenshots:** none — <reason>` line, when close-report runs, then it refuses the close naming the missing evidence. - Given `MERGE_AUTHORITY=agent-after-green` and a green PR for a `landing-pr` ticket, when the merge reconcile runs, then the PR is NOT merged. - Given a repo with no `landing-*` labels anywhere, then every existing test passes unchanged and push mode makes no extra API call per ticket at list time. ## out_of_scope `session-runner.sh` and `heal.sh` (separate follow-up); branch protection.
Author
Owner

Landed on main at 0829339.

Plan 1 Tasks 5–12 and the sibling plan's Tasks 1–3 are all in, each test-first; the whole offline suite is green (87 suites). The idss ruling is ADR 0267 (0265 and 0266 went to other sessions in the same window) and every citation here names 0267.

Two things the plan did not foresee, both fixed here:

  • land-pr.sh, body-marker-lib.sh and body-marker.jq had to join onboarding/vendor-manifest — vendor-manifest-coverage-test.sh caught it. Without that a consumer would re-vendor and still not have the worker's landing command.
  • prompts/prompt.md gaining {{LANDING_RULES}} changes two byte-pinned rendered prompts (.sandcastle/prompt.md and onboarding/tests/fixtures/idss-prompts/prompt.md); both are re-rendered, each diff exactly the new Landing section.

Still open, as filed: #165 (session-runner.sh / heal.sh still push main). Consumers adopt this by bumping FACTORY_REF and minting landing-pr; idss does that next.

Landed on `main` at `0829339`. Plan 1 Tasks 5–12 and the sibling plan's Tasks 1–3 are all in, each test-first; the whole offline suite is green (87 suites). The idss ruling is **ADR 0267** (0265 and 0266 went to other sessions in the same window) and every citation here names 0267. Two things the plan did not foresee, both fixed here: - `land-pr.sh`, `body-marker-lib.sh` and `body-marker.jq` had to join `onboarding/vendor-manifest` — `vendor-manifest-coverage-test.sh` caught it. Without that a consumer would re-vendor and still not have the worker's landing command. - `prompts/prompt.md` gaining `{{LANDING_RULES}}` changes two byte-pinned rendered prompts (`.sandcastle/prompt.md` and `onboarding/tests/fixtures/idss-prompts/prompt.md`); both are re-rendered, each diff exactly the new Landing section. Still open, as filed: #165 (`session-runner.sh` / `heal.sh` still push `main`). Consumers adopt this by bumping `FACTORY_REF` and minting `landing-pr`; idss does that next.
ben closed this issue 2026-09-22 20:02:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#164
No description provided.