Cold branch publication
A coding child of Ship can begin on a branch that the coordinator already created. The runner binds publication to that branch's fetched head before model work, advances the lease only from a durable accepted write, and keeps an uncertain effect unresolved.
- Code:
src/execution/factory.ts,src/core/dispatcher.ts,src/core/dispatch/runLoop.ts,src/core/publicationEffect.ts,src/core/codingPrPostStep.ts - Tests:
src/execution/factory.test.ts,src/core/dispatcher.test.ts,src/core/dispatch/runLoop.test.ts,src/core/publicationEffect.test.ts,src/core/codingPrPostStep.test.ts,src/core/publicationSettlement.test.ts,src/channels/githubDoorIntegration.test.ts
| Criterion | Proof |
|---|---|
| A cold registration's prepared checkout remains the source through fresh Ship admission and its durable workspace binding. Rechecking the selected path must not replace it with a retained predecessor, even when that predecessor has the same branch and remote head with private changes. The selected path, fetched head and explicit expected head remain strict checks. | [unit] src/core/dispatcher.test.ts::coding PR post-step (docs/reference/specs/pr-description.md)::keeps the prepared cold Ship checkout when its predecessor has %s; src/execution/factory.test.ts::the workspace binding on the row::rechecks the prepared cold checkout with strict publication identity: %s |
| A seeded sandbox retains the fetched branch head separately from the resident snapshot source. An unseeded cold Ship child clones its branch, verifies its fetched head and checkout before model work, and records both; a resumed workspace retains that initial head even if its local head moved. An older row without the initial binding cannot invent it from the current checkout. | [unit] src/execution/factory.test.ts::the workspace binding on the row::keeps the fetched branch head apart from the resident snapshot source; ::clones a fresh precreated branch, verifies the remote tip and records its actual checkout; ::rejects an unverified or moved cold branch without creating an initial lease; ::reattaches an unseeded cold clone without inventing a missing initial lease (recorded: %s); ::rechecks a recorded cold checkout without cloning or leasing its later local tip; ::retains the first fetched head when a resumed resident now reports a later local head; src/core/dispatcher.test.ts::coding PR post-step (docs/reference/specs/pr-description.md)::claims a verified unseeded Ship clone and its fetched lease before the model turn |
| A precreated Ship branch's first runner-owned publication leases its trusted fetched head. Later writes use the last durable accepted branch receipt and require a new receipt for the current effect; a matching old receipt is insufficient. The Git Door accepts a bound update on a precreated ref and the next bound update. A genuinely absent branch retains its creation path. | [unit] src/core/dispatch/runLoop.test.ts::binds a precreated Ship branch publication to the fetched workspace head; ::leases the fetched head and selected path of an unseeded cold Ship clone; ::verifies a cold cloned checkout against a precreated PR before granting publication; src/core/publicationEffect.test.ts::publish_branch — a runner-owned Git Door effect::leases a precreated Ship branch at its trusted fetched head; ::does not reuse an earlier matching head as proof of this publication; ::publishes a new owned branch with a separate credential and a durable branch intent; src/channels/githubDoorIntegration.test.ts::GitHub door against a real Git smart HTTP peer::accepts a large precreated Ship push after an empty probe without spending its one-use authority |
| A child checkpoint uses the runner's structured publication transport and the same bound old head. It records acceptance only after the Door's durable result and an exact remote readback. A missing transport or unverifiable result leaves publication unresolved, with no model-shell push. | [unit] src/core/codingPrPostStep.test.ts::salvageBudgetPush — a ship coding child pushes what it has at the budget (push-before-abort, agent-ship.md item 8)::binds a runner-owned checkpoint to its checked-out source commit before Git can push; src/core/publicationSettlement.test.ts::publication settlement::pins the transport when HEAD moves after admission: %s |
| A clean completed child whose owned branch already equals the exact remote head has no unpublished checkpoint, even when the sandbox's remote-tracking ref lags. The Door origin must still name the bound repository; dirty or different-head work keeps its checkpoint and publication gate. | [unit] src/core/codingPrPostStep.test.ts::observeCodingWorkspace::uses an exact remote branch head when a clean sandbox has a stale tracking ref; src/core/codingPrPostStep.test.ts::salvageBudgetPush — a ship coding child pushes what it has at the budget (push-before-abort, agent-ship.md item 8)::leaves an accepted remote head clean when the sandbox tracking ref lags; ::a completed child pushes an unpushed commit as a WIP head without adding an empty marker |
| The phase of an earlier unknown cold publication requires the original Door effect and Worker trace to reconcile; a remote base tip alone does not settle it. | [gap] Original run-level Door effect and Worker phase readback are unavailable. |