Status: procedure and history reference. The surface-agnostic contract lives in AGENTS.md §17 and stays always-on. This file holds the guard implementations, the BI trail, and the full §7 decision text. Single source of truth for the decisions themselves remains the unified-delivery-surfaces spec. Relocated from §17 by BI-0020D511 Phase 1; no rule was dropped.
→ Spec (single source of truth): docs/superpowers/specs/2026-06-05-unified-delivery-surfaces-execution-alignment-design.md. This section is the operational pointer; the §7 decisions are WWMD-ratified and final.
- Four peer surfaces, one process. DPF delivers through Claude Code, Codex CLI, Grok, and the embedded Build Studio — peers, not a hierarchy. None is privileged; work never depends on any one being healthy. All four advance the one common evidence-gated lifecycle (
ideate → plan → build → review → ship), right-sized by(type × size); each transition runs the gate check and nothing is rubber-stamped. (Grok joined as a first-class external coding surface per2026-05-31-grok-first-class-support-design.md; the three external CLIs — Claude Code, Codex, Grok — are the host-worktree surfaces, Build Studio is the embedded surface.) → kernel principle - No surface is mandatory — choose by fit; “Build Studio for all development” is retired. Any earlier guidance that all development must go through the embedded Build Studio (it predated this section) is retired by founder directive (2026-06-26). The peer principle above is operational, not aspirational: pick the surface that fits the work and the available tooling. An external Claude Code / Codex / Grok build — implement in a host-worktree, claim a workroom, record evidence, ship the PR — is fully equal to an embedded Build Studio build and must never be force-routed through the embedded pipeline. Embedded BS is the right tool when its in-portal codegen/review fits; it is not a gate every change must pass, and delivery must never block on it being healthy (e.g. when the embedded pipeline is degraded or its reviewer is the bottleneck, do the work as an external build). → kernel principle
- Large/complex work may run externally even when centrally tracked. The desire for central tracking is satisfied by the MCP/capsule/evidence plane, not by forcing work into the embedded BS executor. Build Studio is intentionally narrower than the host CLI surfaces today; when a task is too large, subtle, cross-cutting, tool-sensitive, or long-running for BS to handle well, choose an external host-worktree surface and keep it centrally visible through a Workroom, backlog links, evidence records, and PR health. Do not tell the operator “this must go to Build Studio” merely because it is feature work.
- MCP is the coordination plane. Work tracking, claims, and gate evidence live in the DPF MCP substrate (backlog/
FeatureBuild/WorkCapsule, workroom + lease claims, evidence tools), regardless of Build Studio. If it isn’t in the MCP plane, it didn’t happen — a surface that works without claiming a workroom and recording evidence is invisible to coordination and cannot advance a gate. → kernel principle - Claim a workroom before you work — every surface, including the external CLIs. Because the MCP plane is the coordination substrate, an external agent (Claude Code, Codex, Grok) opens a Workroom at the start of an effort —
create_work_capsulefor new work, oradopt_worktreeto attach an existing branch/worktree — then records evidence at phase boundaries (record_external_development_evidence,record_capsule_evidence) and releases on exit, so the work shows up in the same progress/evidence/document tracking as an in-portal build. Build Studio auto-attaches its workroom; external surfaces must claim theirs. As of 2026-08-28 that claim is automatic and enforced. both worktree-creation paths claim before they hand the tree over — the Claude Code hook (worktree-create.mjs) and the shell script the rest of this runbook uses (scripts/new-dev-worktree.sh) — and since BI-D1FB8C4D both runscripts/lib/worktree-provision.mjs, which admits and binds the Workroom before the worktree exists and creates nothing on a refusal or an outage — so a worktree is born bound whichever way it was made, andpackages/dpf-skill-pack/hooks/workroom-claim-guard.mjsrefuses an edit or a commit on a feature branch that no live claim covers, including a commit made from another folder withgit -C <worktree>, on every surface (Grok gets the deny in its own envelope, BI-6145A168) (DPF_WORKROOM_CLAIM_ENFORCE=0downgrades it to advisory for an install where binding genuinely cannot run;DPF_ALLOW_UNCLAIMED_WORK=1is the recorded per-command bypass). Until then the rule was prose and behaved like it: 31 of 91 live branches carried no binding at all, a 35% miss rate unchanged since the rule was written. Runnode scripts/reconcile-workroom-bindings.mjs(dry run;--applyto bind) to reconcile branches created before this, or after any period where MCP was unreachable — bind-at-birth only ever governs the future. Both paths are named deliberately: binding shipped on the hook path alone first, and coverage measured 95% right after reconciliation then fell back to 82% within a day as new branches arrived through the shell path. Automating one of two entry points relocates the leak rather than closing it. Ifadopt_worktreerefuses withbranch_occupiedagainst a complete capsule, that branch’s work is finished and the worktree is a leftover: reap it or start a new branch rather than reopening closed work. Degrade explicitly: if the MCP plane is unreachable, worktree creation refuses; an operator who authorizes recovery setsDPF_WORKTREE_BREAK_GLASS=<reason>for that one command, which creates the tree unbound with a pending marker to reconcile once the platform is back (docs/architecture/branch-and-worktree-runbook.md). The break-glass never overrides a refusal. Resuming another agent’s in-flight effort — start-by-one/finish-by-another — is the workroom-handoff path being built under EP-UNIFIED-TRACKING (BI-51787ECD); until it lands,adopt_worktreethe in-flight branch and continue from the workroom’s recorded evidence. → spec2026-06-19-unified-build-studio-tracking-all-surfaces-design.md - Central WIP via the workroom plane — the unit of WIP is the Workroom, not the Build Studio build (founder-directed 2026-06-26). Sandboxes and shared singleton leases are finite, so the platform must see total WIP across all four surfaces. Every surface registers its workroom centrally (Build Studio auto-attaches; the external CLIs
create_work_capsule/adopt_worktree), and the WIP count and any capacity limit derive from active workrooms across all surfaces, gated by the real scarce resources — the shared Build Studio sandbox and the shared:3001/singleton leases — not a Build-Studio-only build count. The BS cap (apps/web/lib/build/wip-cap.ts) gates only BS-sandbox contention; external Claude Code / Codex / Grok work runs in its own host worktree, is never blocked by the BS cap, yet its active workrooms still COUNT in the unified WIP (apps/web/lib/build/unified-wip.ts). Funneling work through Build Studio to gain central tracking is retired and futile — external code work is first-class, made visible by workroom registration, not by funneling. → kernel principle - Governance approves evidence, not provenance — the keystone. A gate reads only its required evidence fields and never branches on which surface produced them; that is exactly what makes the surfaces interchangeable. → kernel principle
- Thin adapters behind a stable contract. Claude Code, Codex, and Grok ship updates frequently; the surfaces are swappable adapters behind the gate/evidence + MCP + lease/worktree/sidecar contract. No surface-version-specific mechanics in the doctrine — if a rule would break when Claude, Codex, or Grok bumps next week, it belongs in a thin adapter, not the contract.
- Hide complexity from layman users. The coordination plane is backstage. Non-technical users see work + status + outcomes (progressive disclosure via the AI Coworker panel, §7 Q3), never worktree names, container ids, evidence JSON, or gate predicates; operator-grade plumbing stays admin-only.
§7 decisions — hard rules (WWMD-ratified 2026-06-05):
- Worktree canonical location = dedicated sibling
D:/DPF-worktrees/<topic>⟦runtime: install-local path — Windows shape; §4 gives the macOS/Linux equivalent⟧ for all three host CLI surfaces (Claude Code, Codex, Grok). The tool-native.claude/worktrees/<name>nesting inside the root clone is not the convention — treat it as a hard error to migrate. Every worktree is born governed (topic branch offorigin/main, MCP + toolchain seeded,COMPOSE_PROJECT_NAMEisolated, workroom claimed) and is reaped whenidle/done(janitor BI-DBF3F426). → kernel principle - Tooling-upgrade = operator-triggered quiesce-reap-upgrade. Session = claimed workroom; session end reaps its sidecars (
app-server,node_repl, npx MCP children). Upgrading Claude Code / Codex (incl. the WindowsApps Store package) runs a first-class operator-triggered quiesce → reap → upgrade → resume routine; orphaned sidecars must never pin a tool against update. → kernel principle :3001and every shared singleton are lease-gated. Runtime-bound gates run only throughclaim_nonprod_environment_lease(environmentKey="local-integration-ci"); the:3001Contributor preview folds into that lease (§7 Q5). ⟦runtime: install-local port — the lease rule is doctrine, the number is not⟧ No per-branch CI images, no silent re-bind of a held shared singleton, no ad-hocdocker run/compose upfrom a surface, and never reachable from outside the host — no tunnel, public URL, or non-loopback bind. The contributor preview uses its sanitized development clone; holding the lease permits use, never exposure. Deterministic preview claim keys preserve the queue position while active or queued (the order itself is the overseer’s policy, BI-218A4555). Released, cancelled, or expired claims stop; a new explicitly wanted attempt may supply a new key, never scan or rotate historical keys automatically. → kernel principle- Admission reserves the work the claimant declares. Exact gates request the canonical slot-manifest capability and therefore reserve the builder and host-stage envelopes before admission. Contributor previews request no runner slot, so they remain in the same overseer-ordered provider-exclusion pool but use the ordinary host-safety floor; reserving an unused build stage can deadlock the preview that owns stale-runtime cleanup.
- Contributor preview authority is live, not ceremonial.
scripts/dev-portal-lease.sh refreshsamples host pressure through the samelocal-ci-host-pressureprimitive as the gate before admission, then remains in the foreground as the preview’s lease keeper. Keep that process running for the whole UX exercise. It renews below the registry heartbeat cap; a renewal refusal or an owning foreground interrupt uses the keeper’s scoped writer cleanup. Finalization stops renewal and reports the exact reservation separately; missing admission remains unknown. A detached container with no keeper is not a governed preview, even if an earlier command printed a lease id. - Ending a preview retains its actual control boundary. An owning foreground terminal may interrupt its keeper through that existing handle. Detached queued consumers gain no stop/cancel handle from the finalization repair; explicit generic lease release remains governed. Never kill a detached PID or treat reservation expiry as proof its writers stopped.
- A keeper renews only while its preview is live. Startup, meaning dependency install, migration, clone and first health, has a budget of 20 minutes, which an operator can change with
DPF_DEV_PORTAL_STARTUP_BUDGET_MINUTES. Whiledev-initruns, each renewal also requires the init container to be running. When either check fails, renewal refuses and the keeper fences its owned preview, then reports reservation settlement separately. After the preview is serving, the owneddev-portalcontainer is checked instead. A fresh heartbeat proves the keeper process is alive, not the preview (BI-E95458DE). - Enforced, not just documented. A
PreToolUseguard (lease-guard.mjs, in the pluginhooks/hooks.json) refuses ungoverned dev-server launches (pnpm/npm/yarn dev,next dev,turbo dev,dev-portal-start). Governed path:claim_nonprod_environment_lease→ run on the leased runtime, heartbeat withrenew_nonprod_environment_lease, release on exit (theSessionEndreaper also releases). Emergency bypass: prefixDPF_ALLOW_UNGATED_SERVER=1. Codex and Grok inherit the same guard (BI-CA0ED781); functional confirmation there is pending, so comply by construction (claim before you launch). Leases are TTL-capped (MAX_LEASE_TTL_MS) and reaped if heartbeating stops. - Root-clone protection — enforced. A
PreToolUseBash guard (root-clone-guard.mjs) refuses a recursive-force delete (rm -rf,Remove-Item -Recurse,git clean -fdx) that would follow a junction into — or target — the shared root clone, and raw root-clone git state movement (git switch/checkout/reset/pull/merge/rebase) that strands new sessions on a dirty tree. Junction-safe removals stay allowed (non-recursivermdir,git worktree removewithout--force).git worktree remove --forceis NOT junction-safe on Windows — it follows anode_modulesjunction into the root (see below, BI-F6AC1A56). Emergency bypass: prefixDPF_ALLOW_ROOT_CLONE_MUTATION=1. Structural fix: the canonical sibling baseD:/DPF-worktrees/<topic>via aWorktreeCreatehook (BI-6B02FEE5) + the worktree janitor (BI-DBF3F426). - Root-project data-volume protection — enforced. A
PreToolUseBash guard (compose-guard.mjs) refuses a rawdocker compose up/create/restart/runthat would (re)create PostgreSQL on the rootdpfproject, plusdown --volumeson it — the path that once silently swapped the live DB onto a stale volume. Governed update path:/ops/self-upgrade;scripts/redeploy-portal.*andpromote.shuse--no-deps portaland stay allowed, as do any isolated project (COMPOSE_PROJECT_NAME=dpf-<topic>/-p),build, and plaindown.scripts/lib/compose-safety.mjscarries the same rule for harness callers. Bypass:DPF_ALLOW_ROOT_COMPOSE_UP=1orDPF_ALLOW_DESTRUCTIVE_COMPOSE=1. Backstop: a boot-time DB-continuity check (apps/web/lib/operate/db-continuity.ts) fails loud on a reverted volume. - Auto-worktree placement — enforced for Claude Code (BI-6B02FEE5). A
WorktreeCreatehook (packages/dpf-skill-pack/hooks/worktree-create.mjs, same pluginhooks/hooks.json) replaces Claude Code’s defaultgit worktree addso an auto-created worktree (the--worktreeflag / subagentisolation: "worktree") lands at the canonical sibling base<dirname(root)>/<basename(root)>-worktrees/<name>(e.g.D:/DPF-worktrees/<name>,~/dpf-worktrees/<name>) offorigin/main— never nested inside the root clone at.claude/worktrees/. This is the full-enforcement, auto-create form of the contractscripts/new-dev-worktree.shalready applies to the MANUAL path. It fails closed (BI-D1FB8C4D): in a DPF source repository it admits and binds the Workroom before creating, and a refusal or an unreachable platform creates nothing. The old fallback to the nested location is gone; it was how an unbound tree was always created. A room on the read-onlysource-inquiryshape is refused worktree provisioning altogether. Codex/Grok have noWorktreeCreateevent — they get the canonical base viascripts/new-dev-worktree.sh(adpf worktreeCLI wrapper is the follow-up). Live-tested on this host; functional confirmation of Claude’s consumption of the hook output is pending, like the lease-guard. - Worktree removal is junction-safe (BI-F6AC1A56). ⟦runtime: Windows-only hazard — junction-follow does not occur on macOS/Linux; still route removals through the janitor⟧ Never
git worktree remove --forceby hand on Windows (junctions follow into the root clone). Route removals through the governed janitor. It retires the checkout before purging it without following dependency links. Hygiene: portal janitor is primary; provider lifecycle events cannot reap; dry runs are non-destructive; manual live Tier-A requires operator go — skilldpf-worktree-hygiene(BI-413FD81C).
- The live install advances only via the self-upgrade pipeline, and a built image carries the identity of its bytes — stamp == built HEAD == target, asserted pre-swap,
DEPLOYED_SHApopulated, fail loud on divergence (BI-5B6C1C35). No surface hand-advances the root clone HEAD or rebuilds the portal to “update”; never trust a version label over the bytes. → kernel principle - A Workroom for delivery work is born owned, with its exact source (BI-36FC2981).
claim_backlog_item_for_workandadopt_worktreewith abacklogItemIdmake the person the work is for the room’s Process Overseer and admit the assistant acting for them as a contributor, in the same transaction as the claim. An existing owner and an earlier removal always stand. PassbaseShaandheadSha(full SHAs, or 7+ character prefixes of pushed commits that the server expands, BI-DF34D948): without both no reviewer can be routed to the room’s source, so an adoption missing them returnsdata.identityRepair, a packet you can replay as given with the missing SHAs added. The claim’s readback refuses a room that does not end with exactly one owner, or whose recorded head differs from the one requested. Rooms created before this rule get their owner from the workroom drive (delivery-room-ownership.ts): the requester, lease holder or creator who is a person, otherwise the user who first recorded on the room. The drive also runs a room’s tasks for its requester, not its creating assistant. An account whose work was handed over (User.workHandedOverAt) is never made a room’s owner, at birth or by the drive’s repair (BI-C66B6076). The room goes to its accountable person by the rule the handover used (resolveWorkOwner: the room’s portfolio, Foundational, the organization). When nobody is recorded the room is left unowned and the trail says why. - A replacement assistant takes over its person’s room with one approved call (BI-821EEB18). When a session ends, the person’s next assistant is a different agent that has never been in the room. Every call naming the room then returns
workroom_assistant_not_admitted, not a dead-end “ask its owner”, with the exactreassign_workroom_executorcall indata.handover. That call is let through only if the person owns the room (an active Process Overseer or accountable participant, or the creator, requester or holder of a room nobody oversees) and nobody has admitted, narrowed or removed that assistant. Case policy and clearance still apply. The tool changes authority, so the person approves the handover and the approval carries it out; an assistant an operator has graduated for authority changes is not asked (seen live 2026-09-24 forexternal-claude-code). The executor change and the assistant’s admission as a contributor to that one room are written in one transaction, and the room records acoworker-joinedactivity with sourcehandover. From then onget_workroomgives the assistant the recovery packet and next action, with no chat history needed. Another person’s assistant, and one removed from the room, are still refused. - A Workroom for a backlog item must be BOUND to it, not merely anchored at it.
Workroom.backlogItemIdis the column every subject lookup keys on — reviewer recovery ingoverned-work-claim.ts, andsubjectWhereinbacklog/initiative-readiness/repository-artifact.ts, which sits behind plan coverage and canonical-design resolution. AnoutcomeAnchornaming the item is invisible to all of them.create_workroom,adopt_worktreeandclaim_backlog_item_for_workall resolve a suppliedbacklogItemId— or abacklog-itemoutcome anchor — onto that column, refuse an id that does not resolve rather than creating an unbound room, and verify the stored row carries the binding before reporting success (a report of the request is not a report of the result). Historic rooms created before this may be anchor-only and therefore unreachable from the completion gate’s “no live Workroom is bound to this item” recovery;node scripts/reconcile-workroom-bindings.mjsis the reconciliation path. Fixed for adoption and for the argument name in earlier passes (see the comments inadopt-backlog-binding.ts), and for creation in a later pass.
Task-specific operating rules
- Four peer surfaces, one process. Claude Code, Codex CLI, Grok and the embedded Build Studio are peers running the same process — no surface is mandatory, choose by fit. “Build Studio for all development” is retired. → kernel principle
- MCP is the coordination plane. Work tracking, claims and gate evidence live in the DPF MCP substrate — not in a surface’s local state. Large/complex work may run externally and still be centrally tracked. A session scratchpad (anything under
/tmpor/private/tmp) is ephemeral: macOS cleared one twice in October 2026, taking a coordinator’s brief, ship queue, shipper script and to-do notes, so keep coordination state in backlog items, workrooms and PRs and a branch’s own state in its worktree and commits. A client-side background loop such as a shell “shipper” is client-dependent coordination; each agent takes its own branch through the gate instead. → kernel principle - Claim a workroom before you work — every surface, including the external CLIs. The unit of WIP is the Workroom (founder-directed 2026-06-26, renamed 2026-08-15), not the Build Studio build. → kernel principle
- Governance must earn its cost. Reuse relevant evidence and authorization; a phase change alone needs no fresh consent. Gates serve a decision or protection, not ceremony or client identity. See evidence doctrine.
- One resilient pipeline, enforced by gates not client rigor. Compile-ready worktree, fast local gate, evidence contract at workroom transition, cloud heavy-build safety net, liveness reaping — every surface applies it because each stage is a platform gate. → process spec · EP-056D2A5E
- Thin adapters behind a stable contract. The CLIs ship updates frequently; keep surface-specific code at the adapter edge so an upstream release never reaches the process.
- Hide complexity from layman users. The coordination plane is backstage; non-technical users see work, status and outcomes.
- Worktree canonical location = the dedicated sibling base ⟦runtime: install-local path — Windows shape; §3 gives the macOS/Linux equivalent⟧ for all three CLI surfaces, not the tool-native nesting. Every worktree is born governed and reaped when idle. → kernel principle
- Tooling upgrade = operator-triggered quiesce → reap → upgrade → resume. Orphaned sidecars must never pin a tool against update. → kernel principle
:3001and every shared singleton are lease-gated ⟦runtime: install-local port — the lease rule is doctrine, the number is not⟧ viaclaim_nonprod_environment_lease. No per-branch CI images, no silent re-bind, no ad-hocdocker run/compose upfrom a surface. Hook-refused, so §1’s refusal rule governs what to do when one fires.- A built image carries the identity of its bytes — stamp == built HEAD == target, asserted pre-swap.
Taking over another executor’s work
An executor often reaches its capacity limit before its PR merges, and the operator asks another assistant to finish. The operator usually names only PR numbers. Design: executor takeover (BI-E2871BDE).
- Find each room from the PR.
- Call
list_workroomswithpullRequestNumberorheadBranch. For your person, this matches rooms another assistant created too. - Rooms you have not joined come back with
admission: "handover-required"and the exactreassign_workroom_executorcall. - Do not probe
adopt_worktreeforbranch_occupied.
- Call
- Read the previous executor’s checkpoint before taking anything over. The
workroom_assistant_not_admittedresult shows:- the latest heartbeat
checkpoint: next action, the checks being addressed, uncommitted paths, head SHA and whether it was pushed, open risks; - the bound PR and
leaseExpiresAt.
A checkpoint is the previous executor’s claim, not evidence. Check it against git and CI.
- the latest heartbeat
- Take over the whole set with one approval.
- Call
reassign_workroom_executorwithcapsuleIdsas a dry run. - Then apply with the returned
planDigest. The person approves once for exactly that set. - A room whose lease holder changed in between is skipped and reported, never overwritten.
- Call
- Reconcile the worktree before editing. Account for every uncommitted path against the checkpoint. Commit, discard or ask; never let a stray file ride along.
- Merge current main and re-run the exact-head gate. Merging moves HEAD, so earlier gate evidence no longer applies. Update the PR body’s
Local-CI-Evidence:and add a short handover note. - Close out through the merge. A merged room is archived, not completed. Its stage tasks stop with it (BI-1DDCE164).
While you work, send a checkpoint with heartbeat_workroom at each stage boundary, so the next executor can start from step 2.
Same owner, same scope: no approval (BI-F1FC0B62, BI-1986D3C1, BI-53BED66C). Use reassign_workroom_executor with phase: "request", then the receiving session acknowledges with phase: "acknowledge". Between the two steps either party can raise issues on the room. Neither step reaches the owner when all of these hold:
- the receiver is already admitted;
- the room’s lease is the owner’s, or it has lapsed;
- a lapsed lease is held by the owner or by a platform coworker, such as the Software Engineer a room’s drive dispatched.
A step the handler refuses comes back as a refusal with its next action, never as an approval. Approving it could not make it run. A lease held by another person, a live coworker lease, an unadmitted receiver, or a build-linked, restricted or archived room keeps the owner’s decision, through the one-call path.
When your plan runs out. Before you stop on a usage limit, send heartbeat_workroom with checkpoint.capacity (provider and the resetAt it gave). The room then reads “expected back by …” in Central time. It is not reaped before that time, and it lists the executors that can take it now. The platform also reads the provider’s own capacity record, so this works if you could not send it. A stated reset is an upper bound: providers reset early, periodically and at random. Any later heartbeat clears the wait. To move the work, use the same two-step handover; it needs no approval.
Running in T3 Code
T3 Code orchestrates a native client (Codex or Claude) in its own thread. Trial record: T3 runtime trial. Design: T3 as a first-class executor.
- Claim first, never adopt first. Call
claim_backlog_item_for_workwith:providerset to the client T3 drives (codexorclaude);harness: "t3-code";sessionRefset to the client thread id:CODEX_THREAD_IDfor Codex,CLAUDE_CODE_SESSION_IDfor Claude;harnessRef: { threadId }set to T3’s own thread id, which T3 exports asT3CODE_THREAD_ID. AddprojectId,environmentIdandproviderInstanceIdwhen you know them (BI-75AB446B).
The room then shows which T3 thread works in it, and
list_workroomswithharnessThreadIdfinds the room from the thread. The reference describes;sessionRefis still the id the gate records.provider: "t3"is refused withprovider_harness_only. - Create the worktree under the canonical sibling base, not T3’s default
~/.t3/worktrees. - Gate in the same thread with
pnpm gate:wait. The gate records the same thread id. If it cannot, the platform still binds a passing result to your own single live room on that branch at exactly the gated commit. - Land with
pnpm land. If the client may not rungh pr merge(an unattended Codex refuses it under the owner’s rules), callqueue_workroom_pull_requestwith the room’scapsuleIdthrough the dpf connector. It queues only when the PR head is the room head and the gate passed there, and the merge queue still runs every required check. - If the plan runs out mid-task, record
checkpoint.capacityas above. Hand the room to the Claude (or Codex) side with the two-step handover. T3 can drive either client from the same project.
Contributor preview binding and cleanup
Preview startup resolves the canonical install settings and overlays, then binds
/workspace to the clean admitted worktree. The controller generates development
password/signing material in memory, validates Compose config before runtime
mutation, and uses explicit preview services with --no-deps. Initialization must
succeed before dev-portal starts. Docker mount/commit labels and the served health
identity must agree. No hand-built live image is an acceptable substitute.
The canonical image must contain the bounded-clone and initialization-diagnostic entry files before runtime mutation. Initialization keeps the same install, client-generation, migration and sanitization commands. Its controller retains only bounded, validated step/state/category/exit records in the existing log as they arrive, so container removal cannot erase the failed step. Command arguments, environment values and raw child stdout/stderr are never diagnostic output. Missing or invalid records establish no inner cause. Failure still prevents portal startup and invokes owned cleanup. Even exit zero requires complete, ordered success records for all four steps. Use a qualified delivered helper for both the initial claim and durable child; a frozen feature checkout or stale install-root checkout is not assumed updated. A fresh diagnostic attempt requires the reviewed remedy’s canonical containment and ordinary lease admission.
The keeper handles failed child launches before reading optional process streams, reports controlled error categories, and attempts owned container cleanup even when child termination is unverified. Failed cleanup remains unverified. Client loss also has an independent native safety net: the existing five-minute lease-wait reconciliation, capacity events and hourly expiry owner fence only proven ended previews, behind their normal quiescence gate. They reuse the durable Task owner pins, admitted source Workroom, actual development environment, mount and full container ID. Unknown bindings and live data services are held. Renewal shares the admission/release/expiry environment lock; a stale read cannot revive a committed terminal reservation. Gate claims are excluded because their separate settlement contract can revive them.
The native fence uses a fixed bounded Docker socket stop, never a subprocess or stored cleanup command. A timeout is followed by exact-ID readback; stopped or absent state must be confirmed. Pending cleanup is retained as pending for normal reconciliation. Expiry alone is never proof of process termination, and periodic reconciliation does not promise an instantaneous stop. Each pass checks at most four unique container IDs. Sorted IDs rotate through bounded windows using the existing five-minute cadence, so held containers do not permanently hide later candidates in a stable inventory. Capacity events reuse the current window. A changing inventory supplies no fixed cleanup deadline.
A queued claim stops its shell caller: the returned durable TaskRun resumes the
wait. A terminal claim stops too; never scan historical :rerun-N keys. A new
explicitly wanted attempt may supply a new DPF_DEV_PORTAL_CLAIM_KEY. Durable
resume supplies its original lease and task through DPF_DEV_PORTAL_RESUME_LEASE_ID
and DPF_DEV_PORTAL_TASK_RUN_ID.
The caller sends the existing relative lease timing contract: the resource TTL
uses the heartbeat lifetime (two minutes by default, at most twenty), while
--expires-minutes bounds admission waiting to at most two hours. Durable resume
preserves the original DPF_DEV_PORTAL_WAIT_DEADLINE; it neither substitutes the
short returned lease expiry nor extends the admission deadline on each resume.
WWMD DI-E1203C00715D supports ordinary cleanup for a verified owner and exact
session. The current routineLeaseRelease predicate uses the canonical durable
Task provenance to release a proven own process-free reservation; already-ended
or lapsed reservations are also routine (BI-1986D3C1, BI-88D51B8F). Unproven or
foreign live reservations retain authority approval. Use the returned native
classification, surface the exact lease/session/action and any approval link,
and never suppress a justified request or infer ownership from a session string.
The existing obsolete-release reconciliation settles only proven obsolete
requests; Concierge envelope expiry settles lapsed proposed/approved requests
through the state machine. Neither silently approves or replays them. Restricted
connections never receive grants from the client.
Native preview fencing consumes the database-owned admission-history witness without ordering it against application admission, terminal or observer clocks. A finite first witness and history version1 prove admission; the committed, irreversible terminal state and exact owner/source/full-ID recheck authorize cleanup. Only retain timestamp ordering guaranteed by the writer: expiry selects its deadline against a supplied now and records that same now as releasedAt. Clock offsets or rollback never substitute for a terminal decision, and unknown history, gate reservations and mismatched owners/containers remain held.
Preview browser authentication uses issue_ux_verification_sign_in with the
admitted preview lease and active verification Workroom session. The source
Workroom may remain paused under its original session: WWMD DI-FBEC4720D1DA
requires the same authenticated principal and repository for both rooms, an
active verifier lease, and the source room’s exact recorded SHA. The platform
checks those identities again before returning the session and issues in the
preview database with its
own signing key. The sweep consumes that one-time link and saves its own browser
storage state. Production cookies and operator passwords are not preview inputs.
Next development declarations use one controller-owned file bind at
/workspace/apps/web/next-env.d.ts, outside the admitted worktree. Config and
actual mount inspection verify that file; full source cleanliness remains
mandatory, including after initialization. Seed bytes are read through one
regular file descriptor whose identity and metadata match the source pathname
before and after reading. The read-only descriptor is opened before pathname
checks; its first stat anchors the identity, and the pathname must match it
before any bytes are read. Replacement or concurrent writes refuse before
backing storage is created, and the descriptor closes before that creation.
The keeper removes verified owned
writers before deleting backing storage. Foreign file references, writable
ancestor binds or uncertain cleanup retain storage and fail closed. Existing
readonly directory mounts of canonical state remain untouched.
For shared-header changes, record the complete touched-route inventory first.
Use desktop (1280×900), mobile (390×844), normal and Simple (worker) navigation,
light/dark themes and representative persona/account states. The local 40-route
feedback cap is not coverage: --exhaustive --fixture-map <file> selects all
touched static and dynamic routes. A fixture map must name the admitted source
SHA, lease, base URL and every dynamic concrete route. Missing fixture paths,
redirects, failed routes or incomplete accounting block the sweep.