# Press.zone auto-lander enrollment — plan

Status: DONE (enrolled + proven 2026-08-13)
Source request (owner, 2026-08-13): "overdeck now owns its own git cycle, and auto lands and auto deploys. i want to use this primitive now to enroll ~/Projects/Press.zone/wordpress/wp-content/plugins/international-press-zone and start auto-lander there as well. help me do it right … no pain. currently already i have many sessions just stuck for hours and days unable to land."

## Facts established

- Enrollment primitive = generated `<root>/.claude/scripts/ship.sh` (frozen facts) delegating to the shared brain `~/.claude/workflows/lib/finish-branch.sh`; the auto-lander is the brain's stage-a land queue, opt-in per repo via `git config harness.landQueue stage-a`.
- The plugin lives inside the monorepo whose git root is `/home/user/Projects/Press.zone/wordpress/wp-content` (trunk `master`, origin github avi-ezra/Press.Zone-Works). That root is already half-enrolled: generated `ship.sh` + `test-ship.sh` exist (BASE=master, MODE=merge-to-main, TESTCMD=backend api build+test), `.worktrees/` isolation active. `harness.landQueue` is NOT set.
- Blocker: the stage-a queue machinery hard-codes `refs/heads/main` / `refs/remotes/origin/main` (10 sites in finish-branch.sh + the candidate land-guard hook). Any master-based ticket would be rejected (`unsupported job base`).
- Live site: podman `devzone-wordpress` bind-mounts `~/Projects/Press.zone/wordpress` → `/var/www/html`, i.e. the shared main checkout working tree IS the served site. Deploy redesign is OUT OF SCOPE here; enrollment covers auto-LAND only (owner asked for the auto-lander).

## Acceptance criteria

1. finish-branch.sh stage-a machinery parameterized on the project's frozen base branch; `bash test-finish-branch.sh` fully green including a new master-base stage-a end-to-end test.
2. Change landed to overdeck main via its own ship.sh (stage-a queue) and deployed (`packaging/deploy-local.sh`) so the live install at `~/.claude/workflows/lib/finish-branch.sh` carries it.
3. Press.zone wp-content: `harness.landQueue=stage-a` set; generated `test-ship.sh` smoke green (drift ok).
4. End-to-end proof: one real branch landed through the Press.zone queue to origin/master with ticket served, gated candidate, cleanup done.

## Execution steps + receipt

- [x] Locate primitive (ship-init.sh / finish-branch.sh / stage-a queue), Press.zone repo state, container serving model.
- [x] Generalize base branch through stage-a functions (base threaded enqueue→serve→core; serve validates job base via check-ref-format), guard trunk ref moved to `harness.landGuardRef` git config (candidate hook sets it; install-land-guard.sh sniffs origin/HEAD or takes --trunk, fail-closed on ambiguity); master-trunk stage-a test added (green on first full run).
- [x] Suite green: 116 pass; 1 pre-existing environmental fail (`docs lane ts escape`: remote-runner refuses lockless temp fixtures — reproduced byte-identically on unmodified HEAD brain, unrelated to this change).
- [x] Landed `0b458e168` via overdeck stage-a queue (ticket 95bb23b5, served behind another session's ticket); deploy-local sha `6c6657b0`; live brain + hooks in deploy clone verified generalized.
- [x] Enrolled Press.zone: `harness.landQueue=stage-a`; guard installed at `.dev-config/hooks/pre-push` with `harness.landGuardRef=refs/heads/master` (sniffed from origin/HEAD); ship.sh regenerated with working depcmd (`cd press-zone-backend/api && FT_FROM_HOOK=1 FT_HINTS=1 ft npm ci` — old root `npm install` could never work: root package.json is untracked); test-ship.sh 4/4.
- [x] End-to-end proof: `wt/auto-lander-proof` landed through the queue to `origin/master` (`f16f37ba5` merge of `3f6d4fdaa`), full gate ran (typecheck + backend build/jest), worktree removed, branch deleted. First attempt correctly fail-closed on the broken frozen depcmd (candidate-deps-failed) — gate honesty confirmed.

Noted defect (benign to this delivery): `od-live-report-refresh` fails (module path assumes overdeck cwd) when a land finishes in a foreign repo — report refresh only, landing unaffected.

Follow-up registered: [land-enroll onboarding script](2026-08-13-land-enroll-onboarding-script.md) (IDLE, blocked on this plan's proof).

Next executable action: read suite result; if green, commit worktree and run overdeck `.claude/scripts/ship.sh land wt/landq-any-base .worktrees/landq-any-base` from outside the worktree.

## Constraints / notes

- Never weaken the guard: base validated with `git check-ref-format`; serve side stays fail-closed on malformed base.
- Overdeck repo behavior unchanged (base main threads through identically).
- Press.zone deploy model (serving checkout = dirty main checkout on a feature branch) is a real risk recorded for a FOLLOW-UP plan: landing to master does not update the served site; site currently serves branch `fix/content-generate-all` + uncommitted edits.
- Stuck Press.zone sessions (~60 worktrees/branches) are unblocked by the queue after enrollment; triage of existing branches stays with `/wip-triage`, not this plan.
