Skip to content

test(signals): posture matrix over the store oracle's states; runner freezes the served value before probing - #3489

Merged
ryansolid merged 1 commit into
nextfrom
oracle/store-postures
Sep 16, 2026
Merged

ryansolid merged 1 commit into
nextfrom
oracle/store-postures

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Tests and spec only — no runtime change.

What

Runs the store oracle's eight states (plain / optimistic / derived store leaves) through the same postures as the signal states. The store's read sites (nodeValue / serveDataKey / optimisticView) are separate implementations of the same rules, so every store cell beside its signal twin is a parity check. Store states move to visibility-oracle-store.states.ts; the store runner is unchanged (72 cells, same results). Matrix is now 621 cells.

Runner fix — and a retraction

The closure readers (untracked / latest / isPending) assign served inside the posture's own compute — boundary content — which re-runs after the entanglement probe resolves the state's flight. The second pass overwrote the first. Three readings I reported from the earlier passes were that artifact, not the runtime:

  • "isPending(x) is false behind a showing fallback"
  • "boundary content under a live override reads the committed value"
  • "the projection's seed is served as a value inside boundary content"

All three vanish with served frozen before probing. Nothing had been pinned or written to the spec from them.

Findings — tests/posture-store-parity.test.ts

  • S1 — violation on the signal side, it.fails (spec O4): adopted, unflushed. Same-tick adoption is by design (O1), but A28 still says nothing is visible before the flush. Inside the adopting action's body the store leaf answers latest 0 / isPending false; the signal answers 1 / true. Adoption stamps the signal with the transaction, and unflushedValue reads a stamped node with no _flushedStaged stash as "flushed, held". The store's selection doesn't take that path. One rule, two implementations; the store is right.
  • S2 — observed, both sides agree (spec O2, in-flush form): a memo + render effect created inside loading-boundary content over a held value publishes it, for signals and store leaves alike — the content pass entered the hold, the creation direct-committed. Consistent with "creation escapes".

Everything else in the store rows matches the signal rows under the same posture (adoption entanglement by O1; latest entangles by A15; disposed readers hold nothing).

signals 2,713 + 2 expected fails (S1 here; the same-flush P1 form from #3488).

@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2537d77

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ryansolid
ryansolid force-pushed the oracle/store-postures branch from 6952121 to 9f24401 Compare September 16, 2026 07:53
@coveralls

coveralls commented Sep 16, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 35073504349

Coverage remained the same at 71.46%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1018
Covered Lines: 772
Line Coverage: 75.83%
Relevant Branches: 790
Covered Branches: 520
Branch Coverage: 65.82%
Branches in Coverage %: Yes
Coverage Strength: 14.93 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Sep 16, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 31.21%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 174 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
createStore setter: delete + set one root key (#3044 overlay) 589.1 µs 856.4 µs -31.21%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing oracle/store-postures (2537d77) with next (5fa224a)

Open in CodSpeed

…freezes the served value before probing

Runs the store oracle's eight states (plain / optimistic / derived store
leaves) through the same postures as the signal states — the store's read
sites (nodeValue / serveDataKey / optimisticView) are separate
implementations of the same rules, so every cell is a parity check. The
store states move to visibility-oracle-store.states.ts; the store runner is
unchanged (72 cells, same results).

Runner fix: the closure readers (untracked / latest / isPending) assign
`served` inside the posture's own compute — boundary content — which
re-runs after the entanglement probe resolves the state's flight. The
second pass overwrote the first, so three earlier readings ("isPending
false behind a fallback", "override invisible behind a fallback", "the
projection's seed served as a value in boundary content") were artifacts;
retracted. `served` is now frozen before probing.

Findings (tests/posture-store-parity.test.ts):
- S1, violation (signal side), it.fails — adopted, unflushed: inside the
  adopting action's body the store leaf answers latest 0 / isPending false
  (A28), the signal answers 1 / true — adoption stamped it and
  `unflushedValue` reads a stamped node with no stash as flushed-held.
  Spec O4.
- S2, observed, both agree — a memo + render effect created inside
  loading-boundary content over a held value publishes it (spec O2's
  in-flush form).

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@ryansolid
ryansolid force-pushed the oracle/store-postures branch from 9f24401 to 2537d77 Compare September 16, 2026 08:23
@ryansolid
ryansolid merged commit 1701e7f into next Sep 16, 2026
6 of 7 checks passed
@ryansolid
ryansolid deleted the oracle/store-postures branch September 16, 2026 08:42
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.

2 participants