You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(playbooks): require human approval at checkpoints - #1090
Checkpoints use one existing Inbox Exchange in chat and Inbox, including Answered history. Migration 071 stores only its pointer and the submitted summary. The dedicated checkpoint table, RPCs and 30-second retry are gone. Revisiting work requires approval again.
The Inbox, migration and gate verification passed 105 tests plus 11 browser tests. The final checkpoint port passed 50 store tests, including skipped checkpoints and late answers. Earlier tested head · Earlier stack verification.
The recording follows the open “Pear Lantern second review visit” checkpoint from the owner conversation into Inbox. Expanding the request there shows the same summary and the Approve and Decline controls. The request remained open during this recording at 05b8a3f359.
Additional live recording on a4e77e840b before the final rebase.
./1090-checkpoint-approval.mp4
Historical submission and tests on earlier commits
The following records the original submission. The December re-review section above tracks current evidence.
Problem
A playbook could advance past work that needed a person's approval. Closes#790.
What changed
Steps may declare approval: required. Attempting to leave such a step with a work summary creates one durable request and keeps the pointer in place. The same request appears in Inbox and the owner's chat; Owners and Collaborators can answer once, while Viewers can only read it. Changed work and revisits require fresh approval. Assignment of unchanged work preserves it.
Answers survive restart and notify the owner with stable delivery IDs. Explicit cancellation and owner archive/delete close pending requests. Scoped client reads reach the existing server authorization filters. Migration 063 follows cancellation migration 062. This PR is stacked on #1089 (cancellation), following #1088. Progress follows in #1091.
UI changes
One shared approval card serves Inbox and owner chat. Library step previews mark approval requirements. Captain browser smoke verified the new approval-required label in the library preview; the screenshot is included below. Live approval-card interaction captures remain outstanding.
See the screenshot pair above.
Live testing
Focused tests cover request reuse, stale answers, permission refusals, notification restart/retry, final-step completion, and cancellation closure. Browser tests cover decline reasons and Viewer/offline refusal. Captain review added failing-first owner-lifecycle closure coverage and a scoped-client read regression.
Combined validation at bc432f7c64040976df0400625870a4b235a8e81b: check:changed passed: 568 tests across 43 files, all 36 affected package typechecks, 17 React compiler cases across 12 selected files, format, lint, Knip, and GraphQL. Captain browser smoke verified the approval-required library preview, Inbox loading, a completed free Replay turn, and restoration of that transcript after an at-rest server restart. Replay exercises provider rendering; it does not verify the Playbook approval flow. Detailed report: artifacts/test-reports/feat-playbooks-next-integrated-331968a7/bc432f7c6.md. Real-model checkpoint flow and multi-device live answers remain unrun while the earlier paid-model authorization request is pending. No live deployment was performed.
Upstream impact
Only the measured agent context budget changes outside J5-owned code; FORK.md cases 2 and 110 record it. Existing sharing guards, command permissions, and read revisions are reused.
Checklist
One concern: human approval checkpoints
Behavioral tests cover gating, permissions, persistence, and lifecycle closure
Live testing: exercised and unexercised paths stated above
Upstream-owned files recorded in FORK.md
Upstream product: existing mechanisms reused; no new divergence
Surfaces: web/desktop card, shared permissions, MCP recovery, library previews; mobile progress is in the next layer
Product and user docs updated
Implemented with GPT-6 Astra in the Codex harness and a J5 Crew.
@Jacksondr5, Checkpoints use one existing Inbox Exchange in chat and Inbox, including Answered history. Migration 064 stores only its pointer and the submitted summary. The dedicated checkpoint table, RPCs and 30-second retry are gone. Revisiting work requires approval again. The Inbox, migration and gate verification passed 105 tests plus 11 browser tests. The final checkpoint port passed 50 store tests, including skipped checkpoints and late answers. Commit · Stack-wide response and outstanding evidence.
Blocking: a reworded summary replaces the approval request.PlaybookStore.ts:1226-1244. The checkpoint is an ordinary Inbox Exchange, but a retry with different wording closes that Exchange and opens a new one: while pending, a person answering the first card is refused; after approval, the approval is thrown away and a new request opens. Live, Haiku reworded its summary after a Collaborator approved, and the run needed a second approval. Playbooks: approval checkpoints #790 says neither should happen. Fix: keep one Exchange per visit to the step and ignore the summary once it exists. Approved → the move proceeds; pending → approval_pending; no request, or declined → a summary is required and opens one. An agent that wants to update its summary can add a follow-up to the open ask (regarding), as with any ask. Also drop "Submitting a different summary opens a fresh request" from the user guide.
Product decision on revisions: a checkpoint blocks moves only. Please drop both revision refusals (PlaybookStore.ts:1139-1149 and :1159-1177) and the doc line "Revisions must keep each required checkpoint". A revision already needs the person's ask or approval.
Viewers: AC19 says a Viewer sees the request. Live, a Viewer doesn't, which is the Inbox's existing rule for ordinary asks too. Please drop that clause rather than special-casing checkpoints.
Nit: any human reply other than exactly "approve" closes the request as declined (PlaybookRequests.ts:42). Reject an unrecognized reply instead.
Nit: every open thread's chat now subscribes to the environment's open-Inbox list, where only Captain chats did before (AdjudicationDock.tsx). Answering also bumps both the playbook and Inbox revisions. Please keep the Captain condition (or enable it from run progress), and let request changes follow the Inbox revision only.
Evidence: before/after, and a short video of the approval flow in chat and the Inbox.
The recording follows the open “Pear Lantern second review visit” checkpoint from the owner conversation into Inbox. Expanding the request there shows the same summary and the Approve and Decline controls. The request remained open during this recording at 05b8a3f359.
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
size:XL500-999 effective changed lines (test files excluded in mixed PRs).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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.
Closes #790.
Checkpoints use one existing Inbox Exchange in chat and Inbox, including Answered history. Migration 071 stores only its pointer and the submitted summary. The dedicated checkpoint table, RPCs and 30-second retry are gone. Revisiting work requires approval again.
The Inbox, migration and gate verification passed 105 tests plus 11 browser tests. The final checkpoint port passed 50 store tests, including skipped checkpoints and late answers. Earlier tested head · Earlier stack verification.
Before and after
December re-review
Current layer commit.
One approval request in chat and Inbox
The recording follows the open “Pear Lantern second review visit” checkpoint from the owner conversation into Inbox. Expanding the request there shows the same summary and the Approve and Decline controls. The request remained open during this recording at
05b8a3f359.1090-chat-inbox.mp4
Original evidence comment.
Additional live recording on
a4e77e840bbefore the final rebase../1090-checkpoint-approval.mp4
Historical submission and tests on earlier commits
The following records the original submission. The December re-review section above tracks current evidence.
Problem
A playbook could advance past work that needed a person's approval. Closes #790.
What changed
Steps may declare
approval: required. Attempting to leave such a step with a work summary creates one durable request and keeps the pointer in place. The same request appears in Inbox and the owner's chat; Owners and Collaborators can answer once, while Viewers can only read it. Changed work and revisits require fresh approval. Assignment of unchanged work preserves it.Answers survive restart and notify the owner with stable delivery IDs. Explicit cancellation and owner archive/delete close pending requests. Scoped client reads reach the existing server authorization filters. Migration 063 follows cancellation migration 062. This PR is stacked on #1089 (cancellation), following #1088. Progress follows in #1091.
UI changes
One shared approval card serves Inbox and owner chat. Library step previews mark approval requirements. Captain browser smoke verified the new approval-required label in the library preview; the screenshot is included below. Live approval-card interaction captures remain outstanding.
See the screenshot pair above.
Live testing
Focused tests cover request reuse, stale answers, permission refusals, notification restart/retry, final-step completion, and cancellation closure. Browser tests cover decline reasons and Viewer/offline refusal. Captain review added failing-first owner-lifecycle closure coverage and a scoped-client read regression.
Combined validation at
bc432f7c64040976df0400625870a4b235a8e81b:check:changedpassed: 568 tests across 43 files, all 36 affected package typechecks, 17 React compiler cases across 12 selected files, format, lint, Knip, and GraphQL. Captain browser smoke verified the approval-required library preview, Inbox loading, a completed free Replay turn, and restoration of that transcript after an at-rest server restart. Replay exercises provider rendering; it does not verify the Playbook approval flow. Detailed report:artifacts/test-reports/feat-playbooks-next-integrated-331968a7/bc432f7c6.md. Real-model checkpoint flow and multi-device live answers remain unrun while the earlier paid-model authorization request is pending. No live deployment was performed.Upstream impact
Only the measured agent context budget changes outside J5-owned code; FORK.md cases 2 and 110 record it. Existing sharing guards, command permissions, and read revisions are reused.
Checklist
Implemented with GPT-6 Astra in the Codex harness and a J5 Crew.
1090-checkpoint-approval.mp4