Skip to content

[codex] align state-protocol conformance and prep 0.1.5 release#6

Merged
sorenbs merged 1 commit intomainfrom
codex/fix-prisma-wal-old-value
Apr 20, 2026
Merged

[codex] align state-protocol conformance and prep 0.1.5 release#6
sorenbs merged 1 commit intomainfrom
codex/fix-prisma-wal-old-value

Conversation

@sorenbs
Copy link
Copy Markdown
Member

@sorenbs sorenbs commented Apr 20, 2026

Summary

This PR finishes the state-protocol conformance work that started with the oldValue vs old_value fix and prepares the next Streams release.

What changed

  • enforce append-time validation for state-protocol streams so only valid change or control messages are accepted
  • require old_value as the previous-value field and stop relying on legacy oldValue
  • accept snapshot-start, snapshot-end, and reset control messages while ensuring they do not generate touch invalidations
  • add runtime tests for malformed protocol payloads, control-message handling, and the old_value regression
  • add a compile-time conformance check against @durable-streams/state@0.2.5
  • update fixtures, demos, and docs to use the published snake_case wire format
  • switch package smoke tests and release docs from npm pack to bun pm pack so release validation works with the repo's Bun package-manager pin
  • bump the repo version to 0.1.5

Root cause

state-protocol streams were only loosely validated and Prisma WAL fixtures still used a camelCase oldValue field. That left the runtime short of the published Durable Streams State Protocol and forced downstream consumers to special-case Prisma WAL payloads.

Validation

  • bun run typecheck
  • bun run check:result-policy
  • bun test
  • bun test test/conformance.test.ts
  • bun run test:conformance
  • bun run test:conformance:local
  • bun run build:npm-packages
  • bun run test:node-local-package
  • bun run test:bun-local-package
  • bun run test:bun-server-package

@sorenbs sorenbs requested a review from wmadden April 20, 2026 11:52
@sorenbs sorenbs marked this pull request as ready for review April 20, 2026 11:55
@sorenbs sorenbs merged commit 1f3aeb5 into main Apr 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant