You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 27d23e8
Browse filesBrowse the repository at this point in the historyBrowse files
David Noble
committed
test(plan): close the runtime environments the plan tests mint
The first windows measurement on this PR came back 48 -> 45, not the
predicted ~30. Fifteen failures still carried the leak signature, and
none of them were the production paths #393 diagnosed: they are test
environments that are never closed. Whoever constructs a runtime
environment closes it; these tests never did -- before this branch or
after -- so relocating the mint could not fix them.
A natural experiment inside the plan package proves it. lifecycle_e2e,
lifecycle_starlark, and result_flow_starlark each close their
environment and none of their tests appear in the failure list;
provider_test (2 mints), lifecycle_api (10), gather_api (1), git_resume
(1), and receipt_integration (1) close nothing and all of their tests
do. Fifteen unclosed mint sites, fifteen leak failures.
Add t.Cleanup(func() { _ = environment.Close() }) at all fifteen,
matching the idiom the three passing helpers already use. Verified by
enumeration rather than assumption: repo-wide, every test file that sets
a root now closes it. The files that mint without a root hold no handle,
and TestNewRuntimeEnvironment_BadAnchorFails mints nothing because the
mint is what fails.
The plan document records the miss rather than quietly restating the
target: the option-4 verification asked whether anything dereferences
spec.Root between spec construction and Run (it does not, and that
holds), but never asked who closes the environment in the failing tests.
The -18 estimate was inherited from the #393 diagnosis and repeated
without its own enumeration.
Expected windows effect: 45 -> ~30. Unlike the first estimate, this one
names its mechanism -- fifteen unclosed handles, fifteen cleanups.
Assisted-by: Claude
Signed-off-by: David Noble <[email protected]>
0 commit comments