Skip to content

fix(runbooks): teach a user's own batch workflow in merge-gated waves - #156

Merged
gregpriday merged 4 commits into
developfrom
runbook/explore-staged-orchestration
Oct 16, 2026
Merged

gregpriday merged 4 commits into
developfrom
runbook/explore-staged-orchestration

Conversation

@gregpriday

Copy link
Copy Markdown
Contributor

Summary

A help-assistant session ran my own batch workflow for three rounds: pick a batch of issues, give each one a worktree and an agent, merge every round's PRs, delete the worktrees, pick again until nothing's left. It went well, and the transcript showed what the runbooks should teach anyone with their own version of that workflow.

work-in-waves now starts from the user's contract and handles drains as well as listed waves. Their commands go out exactly as typed, without handback: Daintree appends the handback instruction to the prompt, so a slash command ends up with it as part of its arguments. fan-out-work taught that mistake too, and now doesn't.

Changes

  • daintree.orchestration.work-in-waves: restate the contract first (listed waves or a drain, the cap, overlap policy, each command, who fixes failing CI, teardown scope). A drain picks one wave at a time, re-checks every pick on the forge, and ends on an empty pick. Commands are looked up with slashCommands.list and sent with notify only, and terminal.notifyWhenIdle is re-armed after an interim stop, since nothing else wakes the run. The merge step learns what the command lands before it starts, gates the checkout it moves, and counts a documented marker or the finished screen as done. Teardown follows the user's scope, and keeps any worktree with a dirty tree or a pane the run didn't open (background ones included).
  • daintree.orchestration.fan-out-work: handback only on a brief in your own words, plus the same recheck and re-arm rule after an interim stop.
  • daintree.agents.check-usage-limits: fence "which issues or tasks are still left to do" to daintree.workflow.find-issue-work. Mid-run, "which 2 issues will be remaining by the time you're done with this batch?" selected the usage runbook at 0.9975.
  • Cases: five tx- cases in 19-from-transcripts.yaml for batch rounds, the drain request, the issues-left question (mid-run and cold), and a request for the assistant's own transcript.
  • Training: 99 rows in run transcript-2026-10-16-batch-workflows. These are drain positives and follow-ups, boundaries both ways between work-in-waves and six neighbours, and rows separating work left from allowance left. A second model labelled them blind and agreed on all of them. Rows that paraphrased the new cases were removed. selection.jsonl, corpus-lock.json and the catalog digest are recompiled.

A retrain is owed. The cold form of the issues-left question still routes to the usage runbook (rank_miss), and the fence alone doesn't move it. These rows are what will.

Testing

On a02ece67, before merging develop:

  • pytest tests/unit: 778 passed
  • ruff check .: clean
  • bench coverage: every runbook has a required case
  • bench local: gate passes, recall-pass 1804/1890 → 1808/1895, candidate_miss 0, nothing broken. One loaded set moved: perf-hosts-reverse-check-usage-limits picks up agents.check-usage-limits beside hosts.check-usage-limits, with the same verdict.

After the merge, training.compile_corpus --check passes (22,702 rows). CI covers the merged tree. Codex reviewed the runbook bodies against the app source, and the cases and rows; the fixes from that review are in.

- work-in-waves: restate the user's contract first (listed waves or a
  drain, cap, overlap policy, their commands, who fixes failing CI,
  teardown scope); pick a drain's waves one at a time, re-check picks on
  the forge, end on an empty pick, report a stuck drain as stuck
- Send a user's command as typed, with notify and no handback: Daintree
  appends its handback instruction to the prompt, where it becomes the
  command's arguments; re-arm notifyWhenIdle after an interim stop,
  since without handback no follow-up notice comes
- Merge: know what it lands first, gate the checkout it moves, treat a
  stop without its finish as normal, accept the documented marker or
  finished screen; teardown as the user asked, keeping dirty trees and
  worktrees holding a pane the run did not open (background too)
- fan-out-work: handback only on a brief in the caller's own words, and
  the same recheck/re-arm rule after an interim stop
- check-usage-limits: fence "which issues or tasks are still left to do"
  to find-issue-work (0.9975 mis-route on "remaining"; measured net 0)
- tx-batch-rounds-agent-query: merge-gated batches route to
  work-in-waves (the served build predated it and returned fan-out-work)
- tx-batch-drain-user-words: a drain request after one landed round,
  where workspace-cleanup ranked first verbatim on "delete worktrees"
- tx-issues-left-mid-run (continuation) and
  tx-issues-left-after-batch-not-usage: a question about issues left
  stays with the run or goes to find-issue-work, never usage limits; the
  bare form is an honest rank_miss until a retrain
- tx-own-chat-history-file: locating the assistant's own transcript
  selects nothing
…left

- 99 rows in run transcript-2026-10-16-batch-workflows: work-in-waves
  positives and follow-ups for drains and user-named picker, implement
  and merge commands
- Boundaries both ways between work-in-waves and fan-out-work,
  workspace-cleanup, find-issue-work, integrate-agent-branches,
  land-pull-request and execute-durable-workflow
- Rows separating issues or work left (find-issue-work,
  status-and-resume, supervise-fleet) from allowance left
  (check-usage-limits), in both directions
- Labelled blind by a second model with full agreement; rows that
  paraphrased the new benchmark cases were removed; recompiled
  selection.jsonl and corpus-lock.json (nothing dropped)
…aged-orchestration

# Conflicts:
#	training/data/corpus-lock.json
@gregpriday
gregpriday merged commit b5fb971 into develop Oct 16, 2026
1 check failed
@gregpriday
gregpriday deleted the runbook/explore-staged-orchestration branch October 16, 2026 10:13
gregpriday added a commit that referenced this pull request Oct 16, 2026
Add 401 independently checked examples, repair 160 labels/contexts and
106 further existing state-control examples, and exclude ambiguous or
evaluation-overlapping inputs. Preserve all 99 concurrent PR #156 additions
in the final 22,495-row corpus covering all 153 selectable runbooks.

Protect every evaluation suite, screen query/history near matches, group
context variants in one synthetic split, and tighten the active-state docs
guard. Archive raw proposals, blind labels and curation decisions.

Validation: full suite 938 passed, 96.28% coverage before the final rebase;
313 affected tests pass on the combined tree. Ruff, strict mypy, corpus
reproducibility, exact/near leakage screening, routing coverage and the
shipped-selector quality gate pass. Model weights are unchanged.
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