Skip to content

test(signals): visibility oracle — posture matrix, and the postures brought to a ruling - #3483

Merged
ryansolid merged 1 commit into
nextfrom
oracle/posture-matrix
Sep 16, 2026
Merged

ryansolid merged 1 commit into
nextfrom
oracle/posture-matrix

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Tests and spec only — no runtime change.

What

The visibility oracle pins node state × reader kind with every reader built mainline. This adds the reader's posture — where it lives when built — and a second observable, entanglement: release only the source's hold and see whether x reveals or is blocked by the reader's context.

Postures: mainline, foreignAction (built inside another live action's body), foreignLane (that action holds its own optimistic write), behindFallback (inside a createLoadingBoundary whose content is pending on a sibling flight), disposedReader (root disposed before the source's hold releases).

tests/visibility-oracle-posture.test.ts — 280 cells, discovery mode: every cell is recorded to VISIBILITY_POSTURE_REPORT as a markdown table; none pinned. The oracle's states move to visibility-oracle.states.ts so both runners share them; the existing runner is unchanged (126 cells, same results).

Rulings from the first pass — tests/posture-born-held-and-observation.test.ts

  • A — same-tick adoption is by design (spec O1, ruled): transitions are ambient; an action is the special case that links one across async; every write is a conceptual transition. An action started later in the same tick owns the ambient writes made before it (16 cells).
  • C — latest() entangles (A15, ruled): lanes are transition-bound, so latest(x) inside another live action merges that action with x's — the value pokes through at once, the reveal is joint (8 cells).
  • B — creation under a transaction escapes the hold (spec O2, recorded, not ruled): a memo + render effect created inside a live action over a held value publishes the held value while untracked reads keep the committed frame (10 cells). Mainline creation is born held (A29); the every-posture extension was prototyped (+83 B, suite green) and set aside — "capture things as they are". Pinned as observed so a change flips loudly.

Recorded, not yet brought to a ruling

  • Behind a showing fallback, isPending(x) answers false where mainline says true (held, superseded ×2, pending own async, body ended, held truth) — possibly A19 exception (1) applied to the reader's boundary.
  • Boundary content under a live override reads the committed value, not the override (A17 says the override is the displayed value; hidden content may be "off the hold").
  • disposedReader is clean in all 56 cells.
  • Inside collection-boundary content, reads of pending nodes return undefined rather than throwing — the boundary's collection semantics, expected.

Why now

This is the file the fuzzer's (#3446) confirmed findings fold into as cells, and it gives O1/O2 a home on next for the triage to cite.

signals 2,369 green on the rebase.

…rought to a ruling

Adds the reader's POSTURE as an axis to the visibility oracle: where the
reader lives when it is built (mainline / inside another live action /
inside another action's optimistic lane / behind a showing fallback /
disposed before the source's hold releases), and a second observable,
ENTANGLEMENT — release only the source's hold and see whether it reveals
or is blocked by the reader's context. 280 cells, discovery mode: every
cell is recorded (VISIBILITY_POSTURE_REPORT), none pinned.

The oracle's states move to visibility-oracle.states.ts so both runners
share them; the existing runner is unchanged.

Rulings from the first pass (posture-born-held-and-observation.test.ts):
- A, same-tick adoption is BY DESIGN (spec O1): transitions are ambient;
  an action is the special case that links one across async; an action
  started later in the same tick owns the ambient writes made before it.
- C, latest() ENTANGLES (A15): lanes are transition-bound, so a latest()
  read inside another live action merges that action with the source's —
  the value pokes through at once, the reveal is joint.
- B, creation under a transaction escapes the hold — RECORDED, not ruled
  (spec O2): a memo + render effect created inside a live action over a
  held value publishes the held value while untracked reads keep the
  committed frame. Mainline creation is born held (A29); the every-posture
  extension was prototyped (+83 B, suite green) and set aside — "capture
  things as they are". A change flips the pin loudly.

Also recorded, not yet brought to a ruling: behind a showing fallback,
isPending(x) answers false where mainline says true, and boundary content
under a live override reads the committed value; a disposed reader holds
and entangles nothing in every cell.

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a411dbf

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

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 35055053703

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.94 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Sep 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 175 untouched benchmarks


Comparing oracle/posture-matrix (a411dbf) with next (5662bbb)

Open in CodSpeed

@ryansolid
ryansolid merged commit 48463f5 into next Sep 16, 2026
7 checks passed
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