Skip to content

test(signals): pin the direct-commit readers by posture over a held frame (#3482) - #3492

Merged
ryansolid merged 1 commit into
nextfrom
test/direct-commit-readers-posture
Sep 16, 2026
Merged

ryansolid merged 1 commit into
nextfrom
test/direct-commit-readers-posture

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Tests-only. Companion to #3491 (docs); follows the closed #3490.

Why

#3482 reported yield until(...) deadlocking when the confirming frame landed before the call. The proposed fix — exempting CONFIG_DIRECT_COMMIT readers from born-held in enterStagedRead — passed all 2,733 signals tests, yet it made a mainline resolve() over an unrelated action's hold resolve with that action's unrevealed frame while the UI still showed the optimistic row. Nothing pinned that posture for the promise-delivery readers. This adds the pins.

What is pinned

tests/direct-commit-readers-posture.test.ts — the optimistic-row + live-echo shape from the issue, the server broadcasting before it answers, so the confirming frame is held under the action's optimism. A reader created after that, by posture:

posture reader is behaviour
inside the action, after a bare yield the action's own DIRECT_COMMIT arm delivers under its own hold; action settles; commit reveals res_1:confirmed (the documented form)
inside the action, from the await continuation, no bare yield mainline over its own hold born held (A29); replays at the commit its promise holds open; TimeoutError (#3482 as filed)
outside the action mainline over a foreign hold pending through the hold; resolve()"res_1" and until()true only after the commit; never the held frame

The second row pins the consequence the action()/until() docstrings now describe (#3491). The third is the one that was missing.

Verified

On next all three pass. With #3490's one-liner applied, the second and third fail — the third is the leak. Full signals suite 2,737 / 2 expected fails unchanged; until, until-entanglement, resolve, resolve-in-action, born-held, rules-index green. Rules index regenerated (the new file cites A29).

Reproduction shape by @brenelz.

…rame (#3482)

until() and resolve() (CONFIG_DIRECT_COMMIT) created after a confirming
frame was staged under an action's optimism:

- inside the action after a bare `yield` — the action's own reader; the
  DIRECT_COMMIT arm delivers under its own hold and the action settles
  (the documented form, #3491);
- inside the action from an `await` continuation with no bare `yield` —
  a mainline reader over its own hold: born held, replays at the commit
  its promise holds open, times out (#3482 as filed);
- outside the action — a mainline reader over a FOREIGN hold: pending
  through the hold, served the committed view after the commit, never
  the unrevealed frame.

The third is the pin the suite lacked: the exemption proposed in #3482
and declined in #3490 passed 2,733 tests while making a mainline
resolve() serve another action's speculative frame. Verified: with that
one-liner applied the second and third fail; on next all three pass.

Rules index regenerated (the file cites A29).

Co-authored-by: Claude <noreply@anthropic.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: db1c173

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 35082758847

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

@ryansolid
ryansolid merged commit 203cbfb into next Sep 16, 2026
6 checks passed
@ryansolid
ryansolid deleted the test/direct-commit-readers-posture branch September 16, 2026 10:09
@codspeed

codspeed Bot commented Sep 16, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 4.72%

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 173 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
projection derive: write one NESTED field (reference) 1.8 ms 2.1 ms -14.22%
createStore setter: delete + set one root key (#3044 overlay) 588.9 µs 556.4 µs +5.83%

Tip

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


Comparing test/direct-commit-readers-posture (db1c173) with next (1701e7f)1

Open in CodSpeed

Footnotes

  1. No successful run was found on next (db1c173) during the generation of this report, so 1701e7f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

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