Skip to content

refactor(core): flatten state transformations - #43934

Closed
kitlangton wants to merge 1 commit into
v2from
flatten-state-transforms
Closed

refactor(core): flatten state transformations#43934
kitlangton wants to merge 1 commit into
v2from
flatten-state-transforms

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Flatten three state workflows so synchronous transforms, required lookups, and no-op guards are visible at their call sites. The refactor preserves State finalization order, Form errors, and Session projection behavior.

How

  • Inline the single-use State transform wrapper and return the interface directly.
  • Rename Form's required cache lookup and implement it with Effect.fromOption.
  • Use early guards for missing assistant state and absent retry state.

Scope

Behavior-preserving Core cleanup only; no state lifecycle, form settlement, or Session projection changes.

Testing

  • bun run test test/state.test.ts test/form.test.ts test/session-projector.test.ts (28 passed)
  • bun typecheck from packages/core
  • Push hook: bun turbo typecheck --concurrency=3 (40-package workspace)

@kitlangton

Copy link
Copy Markdown
Contributor Author

Consolidated into #43933 so the Session execution and state-workflow cleanup can be reviewed together.

@kitlangton kitlangton closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant