Skip to content

Fix first-use nested history fallbacks - #26

Merged
SandroMaglione merged 1 commit into
mainfrom
codex/fix-nested-history-fallbacks
Aug 7, 2026
Merged

Fix first-use nested history fallbacks#26
SandroMaglione merged 1 commit into
mainfrom
codex/fix-nested-history-fallbacks

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

Summary

  • require every history default to build a complete, schema-valid root configuration whose selected branch contains the declared history owner
  • resolve first-use nested fallbacks through inactive compound and parallel ancestors while retaining already-active unaffected parallel regions
  • preserve recorded shallow/deep restoration and history target/resolved-target trace identity
  • extend compiler, runtime, generated reference-model, documentation, and platformer example coverage

The root cause was that the public fallback contract only allowed a direct-owner snapshot and the planner required that exact path. A globally targetable nested history state therefore had no way to supply inactive ancestor values on first use. The new owner-constrained builder/result types make unsafe partial defaults unrepresentable, while runtime validation produces a deterministic diagnostic for forged values.

Changeset

  • Added or updated for a library or package-metadata change
  • Not required because this PR does not change src/ or package.json

Added .changeset/calm-histories-resume.md as a patch correctness fix.

Validation

  • pnpm check
  • Relevant example checks, when examples changed
  • Reviewed the automated type-performance report, when the public TypeScript API or inference changed

Additional validation:

  • pnpm --dir examples/platformer check
  • pnpm perf:types
  • 337 runtime tests and 586 TSTyche assertions pass

@SandroMaglione
SandroMaglione merged commit 5656f41 into main Aug 7, 2026
8 checks passed
@SandroMaglione
SandroMaglione deleted the codex/fix-nested-history-fallbacks branch August 7, 2026 09:40
@SandroMaglione SandroMaglione mentioned this pull request Aug 7, 2026
6 tasks
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