Repository navigation
Fix atomic object-cache publication - #151
Merged
Merged
Conversation
Stage managed objects on the cache filesystem and publish without moving existing cache entries aside. Reuse a competing publisher's complete object when replacement fails. Scope staging cleanup to each object compilation. Add concurrency, failure-cleanup, cross-filesystem, and cache-reuse regressions, and run native cache tests in the GitHub Actions matrix.
Validate cached paths before reuse and preserve existing directories on collision. Add regression coverage and refresh end-to-end review documentation.
itsfuad
enabled auto-merge
October 4, 2026 06:17
itsfuad
disabled auto-merge
October 4, 2026 06:17
itsfuad
enabled auto-merge
October 4, 2026 06:17
itsfuad
disabled auto-merge
October 4, 2026 06:24
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
os.Lstat; directories, symlinks, and other non-regular entries are rejected and preserved.Production ownership
cmd/build.goowns native object compilation.compileObjectis consumed directly bybuildExecutableand owns the per-object staging lifetime.objectCachePath,toolchain.Profile.ObjectArgs,runCompilerTool, destination-local staging, and oneinspectCachedObjectrule shared by initial hits and competing winners. Cache keys and compiler arguments are preserved.cmd/build.go.bugfix.mdis absent anddocs/end-to-end-code-review.mdmatches the PR base exactly.Validation
Passed locally on the intended final worktree:
Regression sensitivity verified:
os.Stattoos.Lstat.os.Renamechanged the published file identity under the concurrent-reader test. Native Windows amd64 run 37150250680 also observedERROR_SHARING_VIOLATIONwhile publisher 2 replaced the winner.Risks and follow-up
os.Linkis the standard-library create-if-absent primitive: destination existence does not overwrite the winner. After any link failure, actual destination state is inspected; a regular winner is reused, while no winner or a non-regular entry returns the wrapped*os.LinkError.TestCompileObjectReusesLockedWinner; native validation of the new mechanism is required in Actions. Local Windows/macOS checks are cross-compilation only.target.SystemLLVMTripleso output links and runs against runner libc. It proves real object compilation, destination-filesystem staging, cross-filesystem behavior, publication, reuse, linking, and fixture execution; it does not prove the managed musl ABI/toolchain path.