Skip to content

state_object::getState: route through bound app context - #31

Merged
transfix merged 1 commit into
masterfrom
cvc-singleton/state-object-getstate-ctx
May 3, 2026
Merged

transfix merged 1 commit into
masterfrom
cvc-singleton/state-object-getstate-ctx

Conversation

@transfix

@transfix transfix commented May 3, 2026

Copy link
Copy Markdown
Owner

Builds on #30. state_object::getState() now resolves via state::instance(_ctx) instead of the global cvcstate macro, so each state_object reads/writes the state graph of the app it was constructed against.

Also migrates state::traverse() to use state::instance(_ctx).

Two tests that crossed the boundary (read via global cvcstate while writing via the fixture's local ctx) updated to use the per-app root.

Local: 590/590.

state_object now resolves getState() via state::instance(_ctx) rather
than the global cvcstate macro. Also migrates state::traverse() to use
its own _ctx via state::instance(_ctx). Updates two tests that read
state externally to use the per-app root they share with the bound
state_object.

Each state_object has held an app& since #28; this PR finally makes
it use that reference for state lookup, so per-app state graphs are
now properly isolated. 590/590 tests pass.
@transfix
transfix merged commit 33c0adc into master May 3, 2026
19 checks passed
@transfix
transfix deleted the cvc-singleton/state-object-getstate-ctx branch May 3, 2026 22:48
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