Skip to content

feat(playbooks): revise active run procedures - #1087

Open
BastiHu wants to merge 3 commits into
feat/playbooks-795-331968a7from
feat/playbooks-787-integrated-331968a7
Open

BastiHu wants to merge 3 commits into
feat/playbooks-795-331968a7from
feat/playbooks-787-integrated-331968a7

Conversation

@BastiHu

@BastiHu BastiHu commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

An owner cannot adjust the procedure of an active playbook run without editing a reusable definition or restarting. Closes #787.

Stack 2 of 3; depends on #1086. Base: feat/playbooks-795-331968a7. Merge after the snapshot foundation; runtime holders follow in #1088.

What changed

j5_playbook_revise replaces the active run's steps on an explicit requested/approved basis. It validates the whole procedure, preserves the current stable step ID when possible, and requires an explicit replacement if that step is removed. Owner, active-state, expected-step, and retry checks protect the atomic update.

Migration 060 records every revision's basis, time, owner, step transition, and content digest. Current/progress responses expose bounded count/latest metadata; web/desktop and mobile history show the count and latest basis. The reusable definition and other runs stay unchanged. Same-step edits keep the holder; changed-step revisions use the existing delivery path, behind its pending-delivery gate.

UI changes

Run history shows revision count and the latest requested/approved basis. Before/after captures of a real revised run remain outstanding.

Live testing

The original revision implementation (42015fa717) passed check:changed with 327 tests and 36 package typechecks, plus 112 focused tests. This rebased layer (e5c4dfd5d) includes the foundation's terminal-history/punctuation follow-up and measured context-budget adjustment; its combined Store/Relay/context batch passed 66 tests.

The complete stack at 3d9d3079c passed check:changed: 439 tests across 31 files, 36 package typechecks, format/lint/Knip/GraphQL, and 12 React compiler cases. The top layer integrates revision with runtime assignees and covers same-ID retention, changed-ID delivery, retries, and rollback.

Primary-agent live smoke at that stack head covered isolated startup/restart, free Replay rendering, Fleet loading, playbook discovery/step previews, and Prepare chat. It did not exercise a real agent revising a run. Bounded Haiku/Luna verification awaits authorization; paid evals and a live upgrade were not run. Native mobile, packaged Electron, remote/tunnel clients, full CI suites, release builds, and release smoke remain unverified locally.

Upstream impact

apps/server/src/provider/agentContextBudget.json is updated to the measured MCP tool-list size and documented in FORK.md case 2, under the budget mechanism in case 110. Registration, handler logic, and client changes are J5-owned. Upstream product behavior is unchanged.

Checklist

  • One concern: revise an active run's procedure
  • Tests cover validation, isolation, persistence, attribution, delivery, and retries
  • UI changes: before/after screenshots and interaction video remain outstanding
  • Live testing: coverage and gaps are stated above
  • Upstream-owned files: recorded in FORK.md
  • Upstream product: no product divergence introduced
  • Surfaces: web/desktop, mobile, MCP/preapproval, contracts, reverse states, and connection limits considered
  • Docs: product and user guidance updated

Implemented with GPT-6 Astra through the Codex harness.

@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
@github-actions github-actions Bot added the size:L 100-499 effective changed lines (test files excluded in mixed PRs). label Nov 17, 2026
@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 — 427fb172 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:L 100-499 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.

3 participants