Repository navigation
Emit sequencer block-instance state_change items on target state mutations - #11
Merged
jhoffner merged 1 commit intoMar 1, 2026
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jhoffner
deleted the
codex/linear-mention-fix-65-sequencer-stateschema-state-change
branch
March 1, 2026 19:24
This branch was successfully deployed
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.
Motivation
ctx.sequencer/getTarget(name)state ops.state_changeitems.Description
blockInstanceId?: stringto the coreStateChangeItemtype so block-instance events carry explicit instance routing metadata.emitStateChangeItemandcreateTargetStateOpsin the server execution context and wrap sequencerTargetHandlestate ops (patchState,setState,incState,pushState,setStateRecord,deleteStateRecord,atomicState) to emitstate_changeitems withscope: "block_instance",operation,delta/path, and monotonicversionfrom the instance state container.getTarget(name)/ctx.sequencerto provide the wrapped ops (includingblockInstanceIdin item provenance) so emissions include the sequencer's runtime identity.flow.persistStateChanges === true, and persisted by default outside production (used to support devtools timeline).Testing
pnpm --filter @flow-state-dev/core build(succeeds) andpnpm --filter @flow-state-dev/server typecheck(succeeds).pnpm --filter @flow-state-dev/server test -- execution.test.tsand the full@flow-state-dev/servertest suite; all server tests passed.pnpm typecheck(succeeds).pnpm test; most packages passed, but the workspace run failed due to an existing package-resolution issue inexamples/hello-chatresolving@flow-state-dev/testingthat is unrelated to these changes.Codex Task