Skip to content

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

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

BastiHu wants to merge 1 commit into
feat/playbooks-795-331968a7from
feat/playbooks-787-integrated-331968a7

Conversation

@BastiHu

@BastiHu BastiHu commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #787.

Migration 068 supports owner-requested revisions to the active run’s saved steps. Earlier History entries remain in place.

The layer verification passed 120 server and contract tests and 65 client and browser tests. Earlier tested head · Earlier stack verification.

Before and after

Before After
Revision before Revision after

December re-review

Current layer commit.

Desktop test evidence

Exercised in J5 Code (Dev) on December 1, 2026 with the full Playbook stack at 05b8a3f (#1095).

Adding Fact-check, removing Draft, and revising the pending Review advanced the revision count to three. A fresh run still had the saved three steps.

Run 045d8e04-91b1-421b-99f5-1b2af96cc140 recorded three revisions. Removing Draft made Review current. The third revision removed the pending Review approval without requiring another edit approval.

Screenshot captured after the test by reopening the saved conversation.

Revised run in the reopened Pear Lantern thread

Original evidence comment.

Historical submission and tests on earlier commits

The following records the original submission. The December re-review section above tracks current evidence.

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
  • 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 Dec 1, 2026 7:21pm UTC

Request Review

@github-actions github-actions Bot added the vouch:trusted 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
@BastiHu
BastiHu requested a review from Jacksondr5 November 23, 2026 16:15
@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.

@BastiHu
BastiHu force-pushed the feat/playbooks-795-331968a7 branch from c5e6fa1 to 8cb11db Compare November 24, 2026 11:00
@BastiHu
BastiHu force-pushed the feat/playbooks-787-integrated-331968a7 branch from 427fb17 to 80e9374 Compare November 24, 2026 11:00
@BastiHu

BastiHu commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

@Jacksondr5, Migration 061 supports owner-requested revisions to the active run’s saved steps. Earlier History entries remain in place. The layer verification passed 120 server and contract tests and 65 client and browser tests. Commit · Stack-wide response and outstanding evidence.

@Jacksondr5

Copy link
Copy Markdown
Owner
  • Evidence: please add a before/after of the run history with the "Revised N times" line.

@BastiHu
BastiHu force-pushed the feat/playbooks-795-331968a7 branch from 0372ca1 to dab7b1c Compare November 30, 2026 13:48
@BastiHu
BastiHu force-pushed the feat/playbooks-787-integrated-331968a7 branch from 12f7ff8 to 16b4ca1 Compare November 30, 2026 13:48
@BastiHu
BastiHu force-pushed the feat/playbooks-795-331968a7 branch from dab7b1c to e436cc2 Compare November 30, 2026 13:50
@BastiHu
BastiHu force-pushed the feat/playbooks-787-integrated-331968a7 branch from 16b4ca1 to e7c5eea Compare November 30, 2026 13:50
@github-actions github-actions Bot added size:XL 500-999 effective changed lines (test files excluded in mixed PRs). size:L 100-499 effective changed lines (test files excluded in mixed PRs). and removed size:L 100-499 effective changed lines (test files excluded in mixed PRs). size:XL 500-999 effective changed lines (test files excluded in mixed PRs). labels Nov 30, 2026
@BastiHu

BastiHu commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Desktop test evidence

Exercised in J5 Code (Dev) on December 1, 2026 with the full Playbook stack at 05b8a3f (#1095).

Adding Fact-check, removing Draft, and revising the pending Review advanced the revision count to three. A fresh run still had the saved three steps.

Run 045d8e04-91b1-421b-99f5-1b2af96cc140 recorded three revisions. Removing Draft made Review current. The third revision removed the pending Review approval without requiring another edit approval.

Screenshot captured after the test by reopening the saved conversation.

Revised run in the reopened Pear Lantern thread

@BastiHu
BastiHu force-pushed the feat/playbooks-787-integrated-331968a7 branch from e7c5eea to ee69046 Compare December 1, 2026 19:20

This branch was successfully deployed

1 active deployment
Preview — ee69046b Deployed Dec 1, 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 Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants