Summary
verify_shipped_work requires the closing commit to have been pushed upstream. A workspace created with plain git init has no upstream, so the gate returns Fail on every closure regardless of the work produced. needle doctor reports no problem.
Environment: Ubuntu 22.04.5 LTS (WSL2, Windows 11), x86_64 · needle 0.6.0 · bead 0.2.4 · Claude Code 2.1.197
Mechanism
// src/validation/shipped_work.rs:244
let pushed = git_output(workspace, &["merge-base", "--is-ancestor", &head, "@{u}"]).await.is_ok();
With no remote, @{u} does not resolve, the command fails, pushed is false, and the gate fails — independent of what the agent produced.
Reproduction
Workspace: git init, one commit, no remote. Bead: "Add a hello world Python script called hello.py".
The agent did the work correctly and committed three times across dispatches:
309d4f4 Add module-level docstring to hello.py
37e5b0a Add hello.py with main() function and entry point guard
615bcee Add hello world Python script
hello.py was present, correct, and ran. Every closure failed the gate, so the parent bead reopened and mitosis split it. One bead became seven in roughly seventy seconds:
ndl-84b879a2 Add a hello world Python script called hello.py InProgress rev 216
ndl-d02e0c6c Create hello.py file with basic Python structure Closed
ndl-1296492b Add hello world print statement to hello.py Closed
ndl-b3061487 Verify hello.py runs correctly and commit it Closed
ndl-b88252df Create hello.py file with basic structure Open
ndl-bd5ab66f Add print hello world statement to hello.py Open
ndl-45a09339 Add main() function and entry point guard Open
ndl-b3061487 — "Verify hello.py runs correctly and commit it" — was created and closed while the underlying condition remained unmet.
Adding a remote (gh repo create --source=. --push) resolved it immediately; the next run completed one bead cleanly and every run since has been clean.
Why this may warrant a code change rather than a docs note
needle doctor passes 17/17 on a workspace where the gate cannot succeed. It verifies disk space, heartbeat directories, lock files and adapter template executables, but not whether the completion condition is satisfiable.
- The quickstart creates exactly such a workspace and does not mention a remote.
- The failure presents as the agent repeatedly failing rather than as a configuration problem, so it is slow to diagnose.
- Quarantine did not engage before mitosis multiplied the work, despite
splice.claim_churn_threshold: 20.
Suggested
- A
doctor check: when worker.enforce_shipped_work is true and git rev-parse @{u} fails, report FAIL with the remedy (git remote add / git push -u). This would turn a silent dead end into an immediate, self-explanatory failure.
- A more specific gate failure message naming the missing upstream, distinct from "no commit since dispatch".
- A quickstart note stating that the workspace needs an upstream, or that
worker.enforce_shipped_work: false is required for local-only repositories.
Happy to test a fix on WSL2 if that helps.
Summary
verify_shipped_workrequires the closing commit to have been pushed upstream. A workspace created with plaingit inithas no upstream, so the gate returns Fail on every closure regardless of the work produced.needle doctorreports no problem.Environment: Ubuntu 22.04.5 LTS (WSL2, Windows 11), x86_64 · needle 0.6.0 · bead 0.2.4 · Claude Code 2.1.197
Mechanism
With no remote,
@{u}does not resolve, the command fails,pushedis false, and the gate fails — independent of what the agent produced.Reproduction
Workspace:
git init, one commit, no remote. Bead: "Add a hello world Python script called hello.py".The agent did the work correctly and committed three times across dispatches:
hello.pywas present, correct, and ran. Every closure failed the gate, so the parent bead reopened and mitosis split it. One bead became seven in roughly seventy seconds:ndl-b3061487— "Verify hello.py runs correctly and commit it" — was created and closed while the underlying condition remained unmet.Adding a remote (
gh repo create --source=. --push) resolved it immediately; the next run completed one bead cleanly and every run since has been clean.Why this may warrant a code change rather than a docs note
needle doctorpasses 17/17 on a workspace where the gate cannot succeed. It verifies disk space, heartbeat directories, lock files and adapter template executables, but not whether the completion condition is satisfiable.splice.claim_churn_threshold: 20.Suggested
doctorcheck: whenworker.enforce_shipped_workis true andgit rev-parse @{u}fails, report FAIL with the remedy (git remote add/git push -u). This would turn a silent dead end into an immediate, self-explanatory failure.worker.enforce_shipped_work: falseis required for local-only repositories.Happy to test a fix on WSL2 if that helps.