Repository navigation
Assert exact Windows token and job handle cleanup - #187
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.
The post-merge release build failed
TestWindowsNativeFailuresReleaseHandlesbecause the process-wide handle count rose from 113 to 119, while the token-security and PostgreSQL lifecycle assertions passed. A whole-process count cannot distinguish handles opened by the Go runtime from resources owned by the functions under test.The test now records every token and job handle acquired by those native calls, verifies that the real
CloseHandlesucceeds exactly once for each resource, and requires no owned handles to remain after each error path or successful token-release callback. This replaces the previous allowance of two unexplained handles with exact resource assertions. The native close function joins the existing injectable syscall boundary; production still usessyscall.CloseHandleat the same cleanup points.PowerShell CI repeats the cleanup test 50 times on each supported Go version, on both Windows x64 and ARM64, alongside the full existing suites and unchanged 90% coverage gate. Windows cross-compilation for both architectures and Windows vet passed locally; Public CI passed all 13 required checks, including both Windows architectures, both Go versions, all repeated handle assertions, and detached hidden Node launches. Combined production coverage is Production coverage: 90.98% (1564/1719 statements); required 90.00%.