Repository navigation
feat(workboard): import finished node ticket branches into the host clone - #19
Merged
Merged
Conversation
…lone A done report from a node ticket now records a pending handoff instead of moving the card to review. A lifecycle-scheduled handoff bundles factory/<card> on the node, fetches it with file.fetch, verifies it on the host (single ref, ancestry from the recorded base, worktree on the branch), creates the host branch without moving an existing one, cleans the node, and only then moves the card to review. Failures block the card with the reason. Also keeps the recorded base commit when a re-run reuses the node worktree, and makes node session labels unique per card. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
M1 slice 2 (D40): a finished node ticket's branch now comes back to the host. A
donereport no longer moves the card toreview. It records a pending handoff, and the import is the only step that moves a node ticket toreview.WorkboardExecutionTarget.hostRepoPath(required, absolute) andWorkboardNodeWorktree.handoff(pending|imported).pendingreruns the idempotent import, andimportedwith the card stillrunningonly finishes cleanup and the move toreview. The sweep resumes both after a restart.Real-flow fixes to slice 1 code:
createNodeTicketWorktreerecorded the reused worktree's HEAD asbaseCommit, so a re-run after a blocked import bundled an empty range. It now keeps the recorded base.Workboard: <title>, and labels must be unique, so a second card with the same title failed to start ("label already in use"). The label now includes the card id prefix.Out of scope: the
devpush / draft-PR Workboard action (decided: a Workboard action with per-repo token; next slice), trust KPIs, per-owner concurrency.Evidence
Real flow: isolated Gateway from this branch (profile
m1) plus Docker node host, real Claude Code (Haiku 5.5) turns, realfile.fetchthrough File Transfer policy.b76f746. The import blocked:file.fetchwas refused because the node's command surface upgrade was still pending approval (a test-kit gap). The card was blocked with the reason, and the worktree was kept.bfcf02e..b76f746(original base kept). Hostfactory/<card>=b76f746, card inreview. Node cleanup failed with "Gateway requester authority changed", because the handoff ran inside theagent_endrequester scope.7e32bd2, importedbfcf02e..7e32bd2, card inreview. Node worktree, branch, and bundle were removed, with no cleanup comment.Tests:
node-ticket-handoff.test.ts(6 tests). It uses a local-node fake that runs the node'ssystem.run/file.fetchagainst real temp git repos, with the real SQLite store.expected 'blocked' to be 'review'.pnpm test extensions/workboard/src/node-ticket-handoff.test.ts --maxWorkers=1: 14.2 s wall, about 2 s of test time, no timers. The fullextensions/workboard+packages/workboard-contractsuite passes: 406 + 15 tests.Checks:
tsgo:extensions,tsgo:extensions:test,lint:extensions,check:import-cycles,check:coercion-helpers,lint:plugins:no-extension-test-core-imports, the test temp-creation report, and the production dead-export scan pass. The inheritedscripts/unused exports are unchanged.Review:
autoreview(Codex, P1) found two issues, both fixed: (1) a clean worktree on a detached HEAD would bundle only the branch tip and then delete later commits; the import now requires HEAD onfactory/<card>and the bundle head to equal it (test: "blocks instead of dropping commits made on a detached HEAD"). (2) the pre-write recheck now compares the whole target (node, repo, host clone, branch, base), not just the worktree path.Merge Danger
Door: two-way
Not deployed. Node tickets exist only on test profiles, and
hostRepoPathbecomes required fornode-claudetargets. Main is not a shipped contract, so no migration is needed.Blast Radius: Workboard
Only cards with a
node-claudetarget change behavior. Other cards still move toreviewonagent_endas before. To live-deploy, the node'sfile.fetchcommand surface must be approved, and itsallowReadPathsmust cover<worktreesRoot>/*.bundle.🤖 Generated with Claude Code