Skip to content

feat(playbooks): restrict shared saves to Owners and support team overrides - #1093

Open
BastiHu wants to merge 16 commits into
feat/playbooks-next-integrated-331968a7from
feat/playbooks-794-sol-331968a7
Open

BastiHu wants to merge 16 commits into
feat/playbooks-next-integrated-331968a7from
feat/playbooks-794-sol-331968a7

Conversation

@BastiHu

@BastiHu BastiHu commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

An agent could save a shared playbook without establishing that the person behind the turn had permission to change the environment library. Teams also could not keep a local library override of a playbook supplied by a configured folder. Closes #794.

What changed

The save tool checks the initiating message against authenticated command admission and the person's current Owner grant. Collaborators can draft playbooks for an Owner. The authoring guidance asks for the full draft and destination to be approved before saving.

An Owner can create a same-name library override after seeing how it affects future team updates. Deleting that copy restores the folder version. Workspace definitions retain priority. Existing library edits still use a digest to catch concurrent changes.

Verification

In an isolated web Settings session, copying a team-folder playbook showed the override warning and then the “Overrides team folder” label. Deleting the copy restored “From source folder.” Focused tests exercised save authorization through MCP and RPC, command admission and thread launch, source precedence, and Playbook Author migration. Native mobile interaction and paid model authoring remain unverified.

At commit 6b6f456, check:changed against the #1091 base passed all 190 tests in 9 files, all 36 affected package typechecks, and the format, lint, Knip, GraphQL, context-budget and React compiler checks.

Stacked on #1091. Implemented by a J5 Crew using GPT-6.2 Sol through Codex.

Before After
Copy a team playbook into the library Copy a team playbook into the library, before Copy a team playbook into the library, after
Confirm the team-folder override new Confirm the team-folder override, after

@vercel

vercel Bot commented Nov 18, 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 18, 2026
@github-actions github-actions Bot added the size:L 100-499 effective changed lines (test files excluded in mixed PRs). label Nov 18, 2026
BastiHu pushed a commit that referenced this pull request Nov 18, 2026
codex and others added 9 commits November 18, 2026 15:14
A collaborator or an agent could edit an Owner's queued message, or answer
the agent's question during an Owner's turn, and the turn still passed the
Owner check for j5_playbook_save.

The check now requires that a settings-write Owner's command wrote the
current text, attachments and context of every message in the turn, that no
other person's accepted command wrote to those messages, and that every
answer or approval feedback given since the turn was requested is an
Owner's. Queued edits and runtime answers are claimed at admission in the
existing j5_human_message_command table; no schema change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An answer or approval feedback now counts against a library save only for
the turn its request belongs to, through the request's node. A request
whose node names no run still counts from when the turn was asked for, so
unknown provenance stays refused.

Adds regressions for an earlier turn's collaborator feedback, a request of
no known turn, and attachment-only edits of a queued message.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An Owner's words-only edit of a queued message keeps the attachments and
context already there. When an agent had replaced those through its own
tools, the Owner's edit matched the current content and the retained
fields passed as Owner-authorized.

A message that any accepted queued-run.edit without a settings-write
Owner's claim has written is now refused, as a non-Owner person's edit
already was. A message the Owner sends afresh still authorizes a save.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The fixture ended the first turn with a plain interrupt and then sent the
queued message itself. A plain interrupt leaves the queue free to start
that message on its own, so the explicit send could find it already
running. The fixture now sends Stop (interrupt with holdQueue), which holds
the queue in the same command, and asserts the stored run status at each
step.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dae65e9f-d4d1-4362-8c55-5b7957b086db

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Warning

.coderabbit.config.ts has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

Parsing errors: 1

Error while evaluating .coderabbit.config.ts
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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 — 79386a8c 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.

4 participants