Repository navigation
Work document #47 follow-ups - #1095
Merged
Merged
Conversation
…d-stream strand pin, and the spread-timing matrix - The IIP-buffer check in plain has() could be poisoned by a partially open regular stream: the validator traveled as a bare callback, so the bracket-walk state built during the regular-buffer walk carried into the IIP-buffer walk — an IIP-fed standing value beside an unfinished stream read as being inside brackets. The validator now travels as a factory through the whole has() chain (ProcessInput.has, hasStream, InPort.has), and every buffer walk gets fresh framing state. hasStream's non-control path calls InPort.has directly with its factory — the per-walk item from the follow-up ledger is closed for the control and non-control paths alike - The strand pin: a stream left unclosed (the sender disconnects with the open bracket outstanding) strands its framing, and the port's terminal disconnect reports it. The test documents the discovery that a close-before-open never reaches the buffer at all — the Edge's bracket-integrity validation rejects it at the sender, so the malformed-order class is already handled upstream of the strand diagnostics - The spread-timing matrix variant: arrivals across macrotask gaps produce the same result as back-to-back posting — the shape that makes async components tractable - The per-arrival O(pending scopes) cost stays a noted trade-off of the wakeup-completeness model (recorded in work document #47), closing the last ledger item without code
- InPort.has's two-arg overload branch (the old function-in-second-position convention) is removed: the factory is the third parameter, and an old-style call now fails with a descriptive TypeError naming the contract instead of a bare makeValidate-is-not-a-function - Plain has()'s validators are stateless by contract — the factory wrapping matters only for stateful validators, which belong in hasStream's framing-aware walks; pinned at the wrap site
spec/InPort.js pins both guards: has() on an old-style two-arg call and a missing factory, and hasStream's matching guard — the two methods' contracts stay symmetric against the guards being simplified away
spec/InPort.js already carried the InPort unit suite (26 tests); my guard-spec creation overwrote it with only the three guard tests. The original suite is restored and the guard tests appended to it
- The double blank line before the guard suite collapsed (the CI format error) - The migration guide's framing-aware validator bullet qualified: a count is trustworthy within a single port's hasStream walk — the validator closure is shared across walks and across the ports of a multi-port hasStream call, so a counting validator must not carry state between them
bergie
marked this pull request as ready for review
October 17, 2026 22:02
The release had consumed [Unreleased] into the alpha.10 segment before the follow-up entry was written; the entry landed inside the consumed section. Moved to [Unreleased]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the has() factory contract, the unclosed-stream strand pin, and the spread-timing matrix
The IIP-buffer check in plain has() could be poisoned by a partially open regular stream: the validator traveled as a bare callback, so the bracket-walk state built during the regular-buffer walk carried into the IIP-buffer walk — an IIP-fed standing value beside an unfinished stream read as being inside brackets. The validator now travels as a factory through the whole has() chain (ProcessInput.has, hasStream, InPort.has), and every buffer walk gets fresh framing state. hasStream's non-control path calls InPort.has directly with its factory — the per-walk item from the follow-up ledger is closed for the control and non-control paths alike
The strand pin: a stream left unclosed (the sender disconnects with the open bracket outstanding) strands its framing, and the port's terminal disconnect reports it. The test documents the discovery that a close-before-open never reaches the buffer at all — the Edge's bracket-integrity validation rejects it at the sender, so the malformed-order class is already handled upstream of the strand diagnostics
The spread-timing matrix variant: arrivals across macrotask gaps produce the same result as back-to-back posting — the shape that makes async components tractable
The per-arrival O(pending scopes) cost stays a noted trade-off of the wakeup-completeness model (recorded in work document Improving on SplitStr #47), closing the last ledger item without code