Skip to content

feat(playbooks): require human approval at checkpoints - #1090

Open
BastiHu wants to merge 14 commits into
feat/playbooks-789-331968a7from
feat/playbooks-790-integrated-331968a7
Open

BastiHu wants to merge 14 commits into
feat/playbooks-789-331968a7from
feat/playbooks-790-integrated-331968a7

Conversation

@BastiHu

@BastiHu BastiHu commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

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.

Before After
Checkpoint requirement in step preview new Checkpoint requirement in step preview, after

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
  • UI evidence: live approval-card interaction capture remains unavailable without the real-agent flow
  • 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.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 20, 2026 3:39pm UTC

Request Review

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 17, 2026
BastiHu added a commit that referenced this pull request Nov 17, 2026
@github-actions github-actions Bot added the size:XL 500-999 effective changed lines (test files excluded in mixed PRs). label Nov 17, 2026
codex and others added 7 commits November 18, 2026 13:09
# Conflicts:
#	apps/server/src/j5/a2a/Migrations.test.ts
#	apps/server/src/j5/a2a/Migrations.ts
#	apps/server/src/j5/playbooks/PlaybookStore.ts
…int-perf into fixed-1090

# Conflicts:
#	apps/server/src/j5/a2a/Migrations.test.ts
#	apps/server/src/j5/a2a/Migrations.ts
#	apps/server/src/j5/playbooks/CheckpointNotifications.ts
@Jacksondr5

Copy link
Copy Markdown
Owner

Direction for the whole stack, before the full review, is in this comment on #1086. We'll review once the stack is rebased onto j5/main after #1205.

This branch was successfully deployed

1 active deployment
Preview — 2e509e12 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants