Skip to content

test: distinguish terminated assistant workers from join timeouts - #32

Merged
takeokunn merged 3 commits into
mainfrom
release/v0.6.6-assistant-cleanup
Oct 11, 2026
Merged

takeokunn merged 3 commits into
mainfrom
release/v0.6.6-assistant-cleanup

Conversation

@takeokunn

@takeokunn takeokunn commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

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 :abort from :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.

@takeokunn
takeokunn marked this pull request as ready for review October 11, 2026 19:51
@takeokunn
takeokunn merged commit e570ecf into main Oct 11, 2026
4 checks passed
@takeokunn
takeokunn deleted the release/v0.6.6-assistant-cleanup branch October 11, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant