Repository navigation
feat(core)!: change sets carry strategy state; publish/update events, one source per change set, stale proposals, change-set scheduling (4b) - #29
Merged
Conversation
🦋 Changeset detectedLatest commit: 1241dde The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 58 minutes. View limit details
TanStack is on CodeRabbit Free, which includes PR summaries. Ask your admin to upgrade for code reviews.
|
This was referenced Nov 6, 2026
cursor
Bot
force-pushed
the
cursor/phase-4b-change-sets-02f8
branch
from
November 6, 2026 14:50
4547327 to
730fd75
Compare
cursor
Bot
changed the base branch from
cursor/phase-4a-strategy-interface-02f8
to
main
November 6, 2026 14:54
jherr
force-pushed
the
cursor/phase-4b-change-sets-02f8
branch
from
November 6, 2026 15:07
730fd75 to
1241dde
Compare
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 cms-refactor-plan.md § Phase 4 (4b) and § 7 (document state strategy):
migrate;Merge chain: step 12 of 24. Base:
main. Merge it right after #27. The branch ismain3b4a112, then one commit for each PR before this one in the merge order, then this PR's own commit730fd75(tree227646c).What
stateis stored on the document's one coalesced change set and handed back asChangeSetView.workflowon the next decision.migrate.migrate, ormigratefails. Core then refuses every decision on it exceptdiscardandemit. The newlistStrandedChangeSets()lists them.changeSet,from/tostate,effectsandreason. There's a newtransitioneddecision for a change set that moves to a new state or gets a publish time.document.*names:document.created,document.updated,document.published,document.unpublishedanddocument.deleted.publish,unpublish,delete,change,update) still match in subscriptions and webhookeventslists as deprecated aliases until phase 6.document.*name.document.publishedfires only on the unpublished → published transition. Saving a document that stays live firesdocument.updated, which theupdatealias matches.CONFLICT, naming the open change set. Same-source re-saves merge onto it.stale, and the proposer getsreview.discarded.publishaction as actorscheduler.downmigration.transitioneddecisions as "advanced".Breaking changes
The changeset,
document-state-change-sets.md, is minor for core, api and store-postgres and a patch for client and ui-react.document.*names. Code that switches on the delivered name must use them. Filters that use the short names keep matching until phase 6.eventslist, must adddocument.updated(orupdate). The upgrade guide has a recipe.CONFLICTinstead of absorbing the change set.NOT_FOUND.BAD_REQUEST.PendingRecord.workflowandpublishAt, and the new audit fields.Assumptions (tasks 8–12 defaults)
document.updatedon a document that stays live, with the aliasupdate.discardwithreason: 'stale'.publishaction withinput.changeSet.transitionedcovers state-only and change-set-schedule decisions.schedule({ publishAt })likepublish.Divergence from plan
from,to,effectsandreasonstay in therecordJSONB.How verified
migrateacross versions, stranded detection, overlapping and non-overlapping commits, and conformance round-trips.pnpm test:pr: passes except thecms-apioxlint error thatmainalready has.test:dts,test:dialects,test:scripts, knip, sherif,test:docsandtest:startersare clean.Merge chain (local verification, CI down)
This PR's commits are squashed into one commit on the linear merge chain. That commit holds this PR's own changes, resolved against every PR before it, with the integration rehearsal's fixes for this PR applied. Three conflicts:
cms-core.md, now in the definition/runtime form withdocument.published;plugins.test.ts.The chain tip's tree is exactly the integration rehearsal plus #46 (
c4e6d7c), and the tip passes the full local suite. I simulated merging every PR in order, with a merge commit or a fast-forward at each step, and every step is clean. A plain squash of the next PR would conflict, because the squash commit isn't an ancestor of the next branch. To squash instead, first rebase the branch's one commit onto the newmain; that rebase is always clean.