Repository navigation
test: distinguish terminated assistant workers from join timeouts - #32
Merged
Merged
Conversation
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.
Summary
Prepare v0.6.6 without moving the existing v0.6.5 tag.
Correct the asynchronous assistant cleanup test to distinguish SBCL's second join value
:abortfrom:timeout. A terminated worker is already dead; returning the configured default does not establish a timeout. Keep the two-second deadline, the explicit thread-liveness assertions, and the provider, channel, pending-turn, generation, and terminal-event checks unchanged.The synchronous external-command deadline now includes output draining. An exited command can leave a descendant holding its pipes open; waiting only for the leader allowed both custom stdout copying and SBCL's non-FD stderr copier to outlive the timeout. The shell closes its own pipes without signaling an already-exited leader's possibly reused process group. Shared stdout/stderr pipes have one reader.
Track deadline expiration independently of callback identity: callers may use the same callback for success and timeout. Update the existing copier mocks to use real, terminated threads, preserving output, join, wait, exit-status, and original-error assertions.
Verification
A controlled SBCL 2.6 experiment confirmed both timeout and aborted-thread results, including liveness. The original release job failed on the first-value assertion even though the asynchronous cleanup case finished in less than its join deadline.
An actual-source macOS SBCL probe reproduced the orphaned-pipe hang and then verified bounded completion for stdout and non-FD stderr, with normal-exit controls. Independent review caught the merged-pipe double-reader case before publication; its regression requires exact output, not just a successful status.
On macOS arm64, the final source passed all 2,416 tests with no skips, failures, or errors. The focused regression run selected and passed all 11 cases. The native executable builds and reports v0.6.6; using its native-helper launcher, the unchanged 45-second release PTY harness passed all 11 checks and three sessions exited zero, with owned processes absent after cleanup. Launching the bare image without its required helpers did not reach readiness. Gitleaks found no secrets in the three release commits.
The final head passed all four Linux CI jobs:
nix flake check, integration, source coverage, and the release binary build. Integration and coverage each passed all 2,417 tests without skips, failures, or errors. All 20 dependency suites passed; assertion-integrity negative controls and history-storage checks passed. Executable-expression coverage is 91.45%, above the unchanged 85% minimum but below the 100% target. The tagged tree must also pass the release workflow before publication. Existing provider and platform limitations remain documented; this is a development preview.