Skip to content

feat(workboard): project board targets, fresh-origin tickets, draft PRs on accept - #21

Merged
tomorrowflow merged 1 commit into
mainfrom
feat/workboard-project-board
Oct 9, 2026
Merged

tomorrowflow merged 1 commit into
mainfrom
feat/workboard-project-board

Conversation

@tomorrowflow

Copy link
Copy Markdown
Owner

Problem

The dev loop's first live ticket (voice-diary #41) worked only through voice-diary-specific manual setup:

  • Every card repeated the full node-claude target, and dev could not create node tickets itself.
  • Node tickets branched from the node clone's stale HEAD, and the host clone was never refreshed. After the first merged PR, tickets start from an old base and the bundle import fails on missing prerequisites.
  • Accepted tickets had no path to GitHub (D43).

Solution

  • Board target default (D45). orchestration.defaultTarget on a board is copied into new cards on that board, including cards dev creates with workboard_create/workboard_decompose. Cards with their own target, target: null, a non-scratch workspace, or a linked session keep theirs. It is set only through workboard.boards.upsert; the agent board tool's schema excludes it. It is stored in orchestration_json, so there is no SQL migration.
  • Fresh origin (D46). The dispatcher runs git fetch origin in the node clone and creates the ticket branch at the commit baseRef resolves to (default origin/HEAD), with no upstream tracking. The import fetches origin in the host clone when it lacks the base commit.
  • Draft PR on accept (D47/D48).
    • Moving an imported node ticket from review to done pushes the imported commit from the host clone and opens a draft PR through the GitHub REST API, or reuses an open PR for the branch.
    • The PR URL is recorded as proof, and the handoff phase becomes published.
    • The token comes from plugins.entries.workboard.config.github.repos."<owner>/<repo>".token, a SecretRef (manifest secret input). The lookup is keyed by the host clone's origin, so board or card data cannot redirect the token. The token reaches git only as an environment-only auth header.
    • Failures block the card with the reason; moving it to done again retries.
    • Card changes and the lifecycle sweep both schedule the handoff work through the service scheduler, so it runs in the plugin's own scope.
  • stats() moved from store-core.ts to store-boards.ts (it reads the same per-board aggregates as listBoards) to keep store-core.ts within its line-cap ratchet. config/assertion-safety-baseline.txt shrinks by one for store-core.ts.
  • Docs: a new "Node tickets" section and the GitHub config in docs/plugins/workboard.md.

Impact

  • New plugin config surface: github.repos.*.token (7 config paths; approved by the user).
  • New handoff phase published in @openclaw/workboard-contract.
  • Existing done cards with an imported handoff would be published on the next sweep. Only card 0e028045 (still in review) has one.

Evidence

  • pnpm test extensions/workboard: 29 files, 410 tests pass. New tests:
    • a ticket based on a fresh origin with both clones stale (fails without the node and host fetch);
    • board target inheritance and the operator-only schema;
    • draft PR push and open with the repo token, single POST on resume;
    • missing token → blocked → retry reusing an open PR.
  • pnpm test extensions/workboard/src/node-ticket-handoff.test.ts --maxWorkers=1: about 50s wall time, mostly worker compile; the tests themselves take about 0.5s each.
  • pnpm tsgo:extensions and pnpm tsgo:extensions:test pass. oxlint on the changed files, check:import-cycles, check:bundled-channel-config-metadata, format:docs:check, and docs:check-links pass.
  • Codex autoreview (--max-priority P1, gpt-6-sol): scoped-clean.
  • Inherited reds, also failing on main: check:test-mock-exports (unrelated agent and CLI tests), config:docs:check (fork config budget drift already 4547 > 4524 on main; this PR adds 7 paths), and plugins:inventory:check.
  • Not yet proven live: reading the token through the prepared secret input in scheduled runs. The first live push (card 0e028045, tomorrowflow/voice-diary) is the proof.

🤖 Generated with Claude Code

…Rs on accept

- Boards carry an operator-only orchestration.defaultTarget; new cards on
  the board copy it unless they bring a target, a workspace, or a session.
- Node tickets fetch origin and branch from origin/HEAD (or baseRef); the
  host import fetches origin when it lacks the base commit.
- Moving an imported node ticket from review to done pushes the commit and
  opens (or reuses) a draft PR, with the token from
  plugins.entries.workboard.config.github.repos keyed by the host clone's
  origin. Failures block the card; moving it to done again retries.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant