Repository navigation
test(sdk): record that the runtime does not fence a second owner - #399
Open
ChrisKrawczyk wants to merge 1 commit into
Open
ChrisKrawczyk wants to merge 1 commit into
ChrisKrawczyk wants to merge 1 commit into
Conversation
The real-runtime test added in #364 expected a second Copilot process to be refused while another process held an active turn. Runtime 1.0.112 writes inuse.<pid>.lock but does not fence: once the active turn's events are on disk, a second process resumes the session and the first turn still completes. The test only passed when the resume raced the first events.jsonl flush and failed with "Session not found", so it failed under load. Wait until assistant.turn_start is on disk, then record that a second process can resume the session, so a runtime that adds fencing is noticed. Correct the migration notes: PilotSwarm must keep one owner per session itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cc944a13-3e0b-43de-8040-5863182bbdb0
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.
Problem
copilot-runtime-migration.test.js› "refuses a resume while another process owns an active turn", added in #364, fails intermittently under load.The test's premise is false. Runtime 1.0.112 writes
inuse.<pid>.lockinto the session directory, but it does not stop a second process from taking the same session:events.jsonl: a resume from a second process fails withFailed to load session events: Session not found. That is why the test usually passed.first.stop()after that failure.I confirmed this with a probe in a Linux container, using SDK 1.0.34 and runtime 1.0.112, which listed the session directory before and after the flush.
Change
assistant.turn_startis on disk and checks thatinuse.<pid>.lockexists. It then records that a second process can resume the session while the first turn is held, and that the first turn still completes. If a later runtime adds fencing, this test fails and the notes below can be revised.copilot-sdk-migration-1.0.34.md): they now say the runtime does not fence a second owner, so PilotSwarm must keep one owner per session itself.#376 carries the same two hunks, byte for byte. Whichever PR merges first, the other's copy becomes a no-op when it is rebased.
This PR changes only a test and documentation: no runtime code, no migration and no orchestration change.
Validation
1f6af957), the test file passes 12 of 12 on Linux (Node 24.22.1).npm run check:privacypasses.