Skip to content

fix(workflow): prevent context shadowing via typed state schema#40

Merged
alxsuv merged 1 commit into
mainfrom
bug/39-fix-stale-context-shadowing
Mar 8, 2026
Merged

fix(workflow): prevent context shadowing via typed state schema#40
alxsuv merged 1 commit into
mainfrom
bug/39-fix-stale-context-shadowing

Conversation

@alxsuv

@alxsuv alxsuv commented Mar 8, 2026

Copy link
Copy Markdown
Member
  • Replace implicit node-ID-keyed context with a typed WorkflowStateSchema to ensure prompt variables always resolve to the latest mutated state, fixing stale evaluations.
  • Update OutputExtractionPostProcessor and nodes to explicitly declare writes, mapping outputs to semantic state variables rather than node IDs.
  • Introduce WorkflowValidator to provide strict compile-time validation of state variable declarations, writes mappings, and {variable} prompt bindings.
  • Expand DSL capabilities with StateSchemaBuilder, ApprovalTransition, and onApproval/onRejection routing extensions.
  • Migrate all existing JSON workflow fixtures, architectural documentation, and developer guides to reflect the new explicit state model.

Resolve: #39

- Replace implicit node-ID-keyed context with a typed WorkflowStateSchema to ensure prompt variables always resolve to the latest mutated state, fixing stale evaluations.
- Update OutputExtractionPostProcessor and nodes to explicitly declare writes, mapping outputs to semantic state variables rather than node IDs.
- Introduce WorkflowValidator to provide strict compile-time validation of state variable declarations, writes mappings, and {variable} prompt bindings.
- Expand DSL capabilities with StateSchemaBuilder, ApprovalTransition, and onApproval/onRejection routing extensions.
- Migrate all existing JSON workflow fixtures, architectural documentation, and developer guides to reflect the new explicit state model.

Resolve: #39
Signed-off-by: Aleksandr Suvorov <asuvorov@hensu.io>
@alxsuv alxsuv merged commit 7bda993 into main Mar 8, 2026
7 checks passed
@alxsuv alxsuv deleted the bug/39-fix-stale-context-shadowing branch March 9, 2026 18:10
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.

[Bug] {draft} resolves to original content instead of latest improved version

1 participant