Skip to content

feat: add safe state construction - #10

Merged
SandroMaglione merged 1 commit into
mainfrom
codex/add-safe-state-from
Aug 1, 2026
Merged

feat: add safe state construction#10
SandroMaglione merged 1 commit into
mainfrom
codex/add-safe-state-from

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

Summary

  • add .from(...) to initial, full, local, branch, compound, parallel, final, and local.with state builders
  • accept each selected schema's exact constructor input and resolve it through schema.makeEffect during planning
  • keep construction results opaque until planning succeeds, preserving defaults and TaggedClass identity while reporting validation failures as MachineSchemaDecodeError
  • document the decoded-value and constructor-input forms and add runtime plus negative type coverage

Release

Includes a minor Changesets entry. After this PR merges into main, the existing Changesets release PR #6 will incorporate this API together with the changes already queued for that release.

Validation

  • pnpm check
  • 203 runtime tests
  • 91 type tests / 360 assertions
  • strict packed-consumer validation
  • package verification

@SandroMaglione
SandroMaglione marked this pull request as ready for review August 1, 2026 15:24
@SandroMaglione
SandroMaglione merged commit 001201b into main Aug 1, 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