Repository navigation
Conversation
Host cancellation now has tests at each layer that handles it: the pi run and task sessions abort on a live cancel, bindPiCancellation honours a signal aborted before binding, withGatewayRemint stops after a cancel during the re-mint, and drainQueue joins live siblings after a cancel. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
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.
Scope: Tests only. No behavior change.
Problem
A host cancel has to stop the pi session, the gateway re-mint and the orchestrator drain. Some of those paths had no test, so a regression would show up as a run that keeps working after the user cancels it. Review thread r4077474538 on #1307 asked for this coverage.
Changes
This PR only changes tests.
pi/__tests__/backend-cancellation.test.ts: the pirunandrunTasksessions abort when the host cancels during a live turn, and both return the abort result. There is oneit.eachrow per entry point.pi/__tests__/cancellation.test.ts: thebindPiCancellationtest is a table that covers a cancel after binding and a cancel before binding.pi/__tests__/gateway.test.ts: when the host cancels during the re-mint,withGatewayRemintregisters no new provider and does not continue.orchestrator/__tests__/executor.test.ts: the sibling-join test is a table that covers a fatal error and a host cancel. In both rows,drainQueuewaits for the live sibling and starts no dependents.Test plan
pnpm typecheck,pnpm lint(0 errors),pnpm vitest run(202 files, 3360 tests) andpnpm test:archpass.pi/index.tsbindsinputs.signalto the sessionrunrowpi/task.tsbindsinputs.signalto the sessionrunTaskrowcancellation.tsif (signal?.aborted) onAbort()before bindingrowgateway.tsabort check afterrefreshAuth()executor.tsawait Promise.allSettled(running.values())Created with PostHog Desktop