Repository navigation
[heft] Add shard result contracts and output ownership - #6205
Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 3 commits into
Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 3 commits into
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 3 commits into
Conversation
This branch has not been deployed
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
Add reusable Heft contracts for workloads that need to publish isolated shard results safely. This standalone
foundation provides identities, versioned manifests, atomic publication and exclusive output claims; it does
not enable managed sharding or change existing task execution.
Details
missing results from corrupt ones and leave workload payloads opaque.
publication preserve exclusive ownership through cancellation and cleanup. Abandoned claims require verified
manual recovery, never PID/age-based stealing.
Ported only the generic foundation from
6af2a03e5461da3e2ac8bd91ce2d0f5fd91310c9onto upstreammain, withadditional standalone regressions and a trailing-newline parser correction. No unmerged PR is a prerequisite.
Collation/coherence validation, adapter registration, CLI mode wiring, Jest execution/coverage/JUnit and Rush
identity/cache integration remain separate. Callers must keep outputs disjoint from source and payload inputs;
these cooperative filesystem helpers are not a sandbox. Existing unsharded behavior is unchanged.
How it was tested
Validated this standalone port on Windows with Node 24.22.1 and the repository's Rush 5.182.0/Heft/Jest setup.
The integrated source's earlier validation is not used as evidence for this PR.
node common\scripts\install-run-rush.js install --to @rushstack/heftnode common\scripts\install-run-rush.js build --to @rushstack/heftnode common\scripts\install-run-rush.js build --only @rushstack/heft --productionapps\heft:node ..\..\common\scripts\install-run-rushx.js _phase:test --test-path-pattern sharding --disable-code-coveragenode common\scripts\install-run-rush.js prettiernode common\scripts\install-run-rush.js change --verify --target-branch upstream/maingit diff --cached --checkCoverage includes identity/schema domains, invalid/corrupt manifests, cancellation boundaries, atomic failure
cleanup, symlinked roots versus nested junctions, filesystem name equivalence, overlapping/concurrent claims,
partial acquisition cleanup, replaced/hardlinked claims and abandoned-gate diagnostics. No POSIX run or broad
Jest adapter/coverage/collator/acceptance sweep was performed.
Impacted documentation
Added
docs/heft/shard-contracts.mdfor implemented guarantees and caller obligations. No existing websitebehavior changes. The new schema describes generated result files, so no init template applies.