Repository navigation
Merge only what was reviewed, and only with permission (7.5.0) - #15
Merged
Merged
Conversation
- Through an API key or OAuth connection, a merge needs "Can merge its
own forks" on that credential, an owner whose role can merge, and a
fork the same credential created. People merging in the admin UI are
unaffected. The audit entry marks a self-merge.
- ForkService.Review compares every field a merge writes, in full (a
change past 2,000 bytes used to be invisible), lists what a new page
sets, and returns a digest of the fork and live pages. Merge requires
the digest and refuses with ErrForkChanged if anything changed.
get_fork_diff returns it and merge_fork requires it.
- Ending a sandbox with "submit" freezes its fork for keys and
connections; a person can still edit it.
- /cm/forks/{id} shows the review field by field and its merge form
carries the digest of what was shown.
- Merges write a version for every live page they create or change, and
session rollback undoes a session's merge. A merged page's static file
is rendered from the whole merged page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README, MCP.md and CLAUDE.md describe connections that act as a person, Sandbox and Full access, the merge permission and the review digest. build.json and manifest.json move to 7.5.0, and the changelog has the upgrade notes for the series. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A submitted fork is frozen for keys and connections on every route that changes it: deleting, restoring or reverting a copy, and archiving or deleting the fork, as well as editing. - A key or connection can't self-merge a fork it submitted for review. - Merge claims the fork (status "merging", expiring after 10 minutes), so a second merge of the same fork is refused instead of applying twice, and takes its digest from exactly the pages it applies. - The digest covers publish state and schedule. A schedule set on a fork copy is dropped when the merge creates the page, and fork copies can't be scheduled. - Versions record noindex and the author, so reverting a merge restores them; versions saved before 7.5 leave those fields alone. - Rollback reports a fork copy that merging removed as gone, not failed. - The review page's "Show all" preview is valid HTML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Independent review (a different model) confirmed:
Its findings are fixed in b5860f4:
Not changed: the diff returns complete values with no size cap. The page clamps the display, but an MCP client receives everything. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #14, which is stacked on #13. Third of three changes; merge #13 and #14 first. This one also carries the 7.5.0 docs and changelog for the whole series.
Why
An agent that ended its own sandbox could then merge its own fork. Merging your own work is a normal way to add content to a site, so it should stay possible, but only as a permission an admin grants on purpose and that is off by default. Merges also weren't tied to what a person reviewed:
What changes
Merging through a key or connection is a granted permission
POST /api/v1/forks/{id}/mergethrough an API key or OAuth connection needs:/cm/forks/{id}. People merging in the admin UI are unaffected.Merges are bound to the review
ForkService.Reviewcompares every field a merge writes, using complete values, and lists what a new page sets.Mergerequires the digest and returnsErrForkChangedif anything changed since.get_fork_diffreturns the digest, andmerge_forkrequires it. The admin merge form carries the digest of the page the reviewer saw.submitfreezes its fork: no API key or connection can change it afterwards. A person can still edit it, which changes the digest.The review is on the fork page
/cm/forks/{id}shows every change field by field, "live now" against "after merge". Long values are cut on a character boundary with "Show all" to expand.Merges can be undone
created_ids/updated_idsfrom the merge's audit entry, sorollback_agent_sessionundoes a session's merge.Docs and release
/mcpdesign.build.jsonandmanifest.jsonare bumped to 7.5.0, with a changelog entry and upgrade notes for the series.Upgrade notes
merge_forkthrough an existing key stops working until an admin grants the merge permission for that key.Tests
/mcp:go test -p 1 ./...passes.🤖 Generated with Claude Code