Skip to content

test(signals): posture matrix — gatedAway posture, direct-effect reader, fuzzer P1 as a cell and pinned violation - #3485

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

ryansolid merged 1 commit into
nextfrom
oracle/gated-away-posture

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Tests and spec only — no runtime change. Follows #3483.

What

The fuzzer's (#3446) campaign against current next (seed 3289, 1,000 cases) produced 21 failures in one symptom group, law P1 — "ordinary writes publish after a drain when no visible reader still needs an unresolved answer" — reduced to case 854. This PR gives that finding a home in the posture matrix and pins it.

  • posture gatedAway: reader built behind a show() gate, then the gate closes — alive, no longer deriving from x. Records x, isPending(x), and the state's held source write after the gate closes, before any release.
  • reader effect: a render effect reading x directly — the reporter shape the reduction used. The matrix previously only had memo + effect-over-memo, and the two behave differently here.
  • state contract: source (the mainline signal whose write the flight holds) and perturb (a write made after the matrix reader exists).
  • matrix-only state: "pending own async, observed only by the matrix reader (fuzzer P1)".

Result

P1 reproduces as exactly one cell — effect × gatedAway: the source's write stays held (forever, the flight never lands) after the only reader stopped reading the memo. memo × gatedAway on the same state releases: the memo's re-run clears its status; a render effect that directly observed the flight keeps reporterBlocksSource true from its stale _pendingSources / NotReady source. Verified on next and on the runtime currently in the batch-2 worktree — neither covers it.

Pinned it.fails in posture-born-held-and-observation.test.ts; recorded as spec O3 (violation, open): A15 / #3426 live reporter — "re-ran and no longer derives from the source" is the fifth liveness case after disposed, zombie, behind-fallback and first-observer. The fix belongs in one readerLive() predicate, not a fifth arm.

Also observed in the new posture: isPending(x) is false after the gate closes on every state where the flight is x's own — consistent with the reader no longer deriving from it.

The fuzzer's other finding (W1, 12 policy) translates to plain Solid that publishes synchronously; it's the fuzzer's wait-budget model, not a hang.

signals 2,494 + 1 expected fail.

…er, the fuzzer's P1 as a cell and a pinned violation

Adds to the posture matrix:
- posture `gatedAway`: the reader is built behind a `show()` gate, then the
  gate closes — alive, no longer deriving from `x`. Records `x`,
  `isPending(x)` and the state's held SOURCE write after the gate closes,
  before any release.
- reader `effect`: a render effect reading `x` DIRECTLY (the reporter shape
  the fuzzer's reduction used; the matrix only had memo + effect-over-memo).
- state contract: `source` (the mainline signal whose write the flight holds)
  and `perturb` (a write made after the matrix reader exists, so the reader
  observes the flight it opens).
- a matrix-only state, "pending own async, observed only by the matrix
  reader (fuzzer P1)".

Result: fuzzer #3446 law P1 (21/1000 cases, one symptom group, case 854)
reproduces as exactly one cell — `effect × gatedAway` on that state: the
source's write stays held after the only reader gated away; with a memo
between the effect and the flight (`memo × gatedAway`) it releases. Pinned
`it.fails` in posture-born-held-and-observation.test.ts; recorded as spec O3
(violation, open): A15 / #3426 live reporter — "re-ran and no longer derives
from the source" is the fifth liveness case, to be fixed in one readerLive()
predicate rather than a fifth arm of reporterBlocksSource.

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: 3a09d3f

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 35066086155

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 improve performance by 11.58%

⚠️ 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 improved benchmark
✅ 174 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
projection derive: write one NESTED field (reference) 2.9 ms 2.6 ms +11.58%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing oracle/gated-away-posture (3a09d3f) with next (48463f5)

Open in CodSpeed

@ryansolid
ryansolid merged commit 21c7bf4 into next Sep 16, 2026
7 checks passed
@ryansolid
ryansolid deleted the oracle/gated-away-posture branch September 16, 2026 07:25
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