feat: package-scoped commit history & rollback for AI authoring (ADR-0067) - #2256
Merged
Conversation
Foundation for ADR-0067: turn each authoring apply into a revertible commit. - sys_metadata_commit object: groups a turn's metadata changes (by event_seq range) into one unit on top of sys_metadata_history; registered alongside it. - protocol.publishPackageDrafts now records each publish as ONE commit (best-effort, never blocks publish), capturing a per-artifact revert plan: created -> soft-remove; edited -> restoreVersion(prevVersion). - protocol.listCommits / revertCommit / rollbackToPackageCommit, reusing the existing restoreVersion + delete primitives. A revert is itself an append-only commit (operation='revert'). - docs/adr/0067 + protocol-commit-history unit tests. Deferred (per ADR): cross-item DB atomicity (ambient-tx), REST routes, cloud turn-wiring, objectui timeline, browser E2E. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Expose the ADR-0067 commit primitives over HTTP, mirroring the
publish-drafts wiring:
- GET /packages/:id/commits -> listCommits (timeline)
- POST /packages/:id/commits/:commitId/revert -> revertCommit
- POST /packages/:id/rollback {commitId} -> rollbackToPackageCommit
Best-effort (501 when a custom protocol lacks the method); 400 when
rollback is called without a commitId. +5 http-dispatcher route tests
(131 green).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eDrafts (ADR-0067) publishPackageDrafts now accepts optional message + aiModel and stamps them on the recorded commit, so an AI turn's commit carries the user's instruction (and the authoring model) for the timeline. +1 end-to-end test (19 green). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 3 package(s): 25 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
added a commit
that referenced
this pull request
Jul 5, 2026
feat(app-shell,plugin-view,plugin-form): record task flows as derived overlays + return invariants (framework#2604 Step 2) (#2256) objectui@6c1ad9e206249735e8ebf7b77fca75313da28070 Co-authored-by: Claude <noreply@anthropic.com>
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.
Implements the ADR-0067 v1 foundation: turn each AI authoring apply into a revertible commit on a package-scoped timeline, so the model becomes "ship, review the history, revert if wrong" instead of "confirm every publish".
What lands
sys_metadata_commitobject (metadata-core) + registration — groups a turn's metadata changes (byevent_seqrange) into one unit on top ofsys_metadata_history.publishPackageDraftsnow records each publish as ONE commit (best-effort, never blocks the publish), capturing a per-artifact revert plan (created → soft-remove; edited →restoreVersion(prevVersion)) + threads an optionalmessage/aiModel.listCommits/revertCommit/rollbackToPackageCommiton the protocol, reusing the existingrestoreVersion+ delete primitives. A revert is itself an append-only commit.GET /packages/:id/commits,POST /packages/:id/commits/:cid/revert,POST /packages/:id/rollback.Verification
tsup/DTS typecheck clean.Deferred (per ADR)
Cross-item DB atomicity (ambient-tx) —
publishPackageDraftsstays per-item best-effort and records the commit from what landed.Pairs with cloud (pin + apply_blueprint message) and objectui (Build-history timeline UI) PRs.
🤖 Generated with Claude Code