Repository navigation
Conversation
PortCarrier delivered its backlog in one microtask loop, so a caller handler that threw ended the loop. The remaining backlog values were never delivered while later port values still arrived, which breaks REQ-POPUP-MSG-03/04 and REQ-POPUP-CONT-02/06. The rest now drains in a fresh microtask, still ahead of the port's tasks, while the exception propagates untouched. Assisted-by: Claude Opus 5.5 Signed-off-by: xgreenx <xgreenx9999@gmail.com>
That path is the only one where the drain's finally sees another owner of the port; without its ownership check the drain requeues itself forever. The microtask harness moves into a shared, bounded helper so such a loop fails the test instead of hanging the suite. The backlog test also cites POPUP-KEEPER-001, which orders it ahead of the port. Assisted-by: Claude Opus 5.5 Signed-off-by: xgreenx <xgreenx9999@gmail.com>
This branch has not been deployed
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.
A caller handler that threw during the backlog drain lost the rest of the backlog while later port values still arrived, breaking REQ-POPUP-MSG-03/04 and REQ-POPUP-CONT-02/06.
Changes
ts/packages/popup/src/port.ts:261): afinallyrequeues the rest in a fresh microtask, still ahead of the port's tasks. The exception propagates untouched.port.test.ts:382): two throws, values delivered in order before the port's queued value. Fails on main.port.test.ts:424): the rest goes to the next owner, one exception, no further delivery.port.test.ts:80): runs captured microtasks and fails on a self-requeueing loop instead of hanging.Verified
pnpm testints/packages/popup: 156/156 pass. On main'sport.ts, the backlog test fails, 1 of 21.finallyfails the detach test with "microtasks never settle".pnpm typecheck(popup),pnpm lintandpnpm fmt:check(ts) pass. Lint keeps one pre-existing info inpackages/ceremony.Not verified / known issues
🤖 Generated with Claude Code