[quality] tests: cover consumingStore/deleteOnClose refcounting in cmd/purebuild - #266
Open
hanthor-hive-agent[bot] wants to merge 1 commit into
Open
[quality] tests: cover consumingStore/deleteOnClose refcounting in cmd/purebuild#266hanthor-hive-agent[bot] wants to merge 1 commit into
hanthor-hive-agent[bot] wants to merge 1 commit into
Conversation
consumingStore is the rolling disk-profile wrapper DirStore uses during the EROFS pass: it deletes each blob on Close unless kept, and tracks shared refs so a blob only goes away once every reader has closed it. Put/Open/Close were all at 0% coverage (cmd/purebuild#222 covered the xorriso/parseImageRef paths but not this). A wrong refcount here either leaks blobs under disk pressure or deletes one a later read still needs. Signed-off-by: hanthor-hive-agent[bot] <hive@users.noreply.github.com>
Contributor
Author
|
Important Held for human sign-off on the direction, not on the code. This PR's only tracked rationale is #265, which the hive filed itself — issue #265 was filed by hanthor-hive-agent[bot] and no human has acknowledged it. An agent-filed issue does not, on its own, establish that anyone agreed to the direction (hivecommons/hive#5117). The change may well be right; nothing here is a review of it. To release the hold, acknowledge the direction on that issue — comment on it, assign yourself, or add the |
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.
Test Improvement
Adds unit tests for
consumingStoreanddeleteOnCloseincmd/purebuild/main.go— the rolling disk-profile wrapper the EROFS pass uses overoci.DirStore: it deletes each blob onCloseunless the ref is in the keep set, and refcounts shared refs so a blob is only removed once every reader has closed it.Before this PR,
Put,Open, andCloseon both types were at 0% coverage (pergo tool cover -func). Package coverage forcmd/purebuildgoes from 13.5% to 16.0%; all four newly-tested functions are now at 100%.New cases:
Close(file still present, content correct)CloseCloseand is deleted on the second (shared-blob semantics)Putdelegates to the inner store and round-trips content/size correctlyRefs #265 (that issue's primary finding is
cmd/tbwasm, which needs a CI wasm-build step — this PR does not touch.github/workflows/, since the hive GitHub App here lacks theworkflowspermission scope needed to push changes to that path; a human will need to land that part).Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=claude model=claude-sonnet-5 claude=2.1.226