Skip to content

[WIP] Prototype Linux Helix result caching - #136113

Draft
agocke wants to merge 6 commits into
dotnet:mainfrom
agocke:helix-cache
Draft

agocke wants to merge 6 commits into
dotnet:mainfrom
agocke:helix-cache

Conversation

@agocke

@agocke agocke commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Prototype a Linux x64 Helix work-item result cache using a C# NativeAOT executable, with an opt-in Azure Pipelines shadow lane to validate the integration before replacing any executions.

  • Fingerprint frozen work-item/correlation inputs, commands, environment overrides, timeouts, and declared Helix queue/image/provisioning metadata. Require digest-pinned container references.
  • Admit only completed, infrastructure-successful executions with valid nonempty passing xUnit reports. Preserve original job provenance and validate cached artifact integrity.
  • Follow the existing compiler-cache Cache@2 pattern: rolling per-build snapshots with stable restore prefixes. Persist completed entries only; recreate input snapshots in each job. The pipeline build ID is not execution-key material.
  • Submit the exact frozen archives through the pinned Helix SDK, collect public Helix completion/results, and compare hits with fresh test identities, outcomes, and skip reasons. Hits never suppress submissions or publish cached results as new executions.

Shadow lane

The new helixCacheShadow runtime pipeline parameter defaults to false. When enabled in the public project, only the Linux x64 CoreCLR_AllSubsets job runs the additional validation, after its normal submissions. It uses the existing System.Memory.Data.Tests archive and runtime correlation payload and submits one additional work item to AzureLinux.3.Amd64.Open.

The shadow steps are non-gating (continueOnError); normal tests remain authoritative. The SDK waits for the additional job and cancels it on task cancellation. Evidence is included in the existing build-log artifact under helix-cache-shadow/.

Queue eng/pipelines/runtime.yml against this branch with helixCacheShadow: true to exercise the live path.

Draft limitations

Live Azure template expansion, actual submission/collection through this lane, cross-build Azure cache restoration, and unchanged-rebuild hit rates remain to be validated in CI. The cache fingerprints the declared environment, not a worker attestation. ZIPs are currently hashed byte-for-byte, so nondeterministic archive/build output may prevent useful hits. The first shadow lane is public-queue-only; eviction and replacing normal test executions are out of scope.

Note

This implementation and PR description were created with GitHub Copilot.

Add a NativeAOT content-addressed cache and an opt-in Azure Pipelines shadow lane that always executes fresh Helix work items.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee547d49-5419-4268-b01f-6b2757f99953
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Read completed job details to validate the submitted queue alias while preserving the resolved physical queue in provenance. Cover alias resolution, conflicting aliases, and missing-alias fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee547d49-5419-4268-b01f-6b2757f99953
agocke and others added 4 commits October 21, 2026 03:32
Use separate JSON contexts and an explicit command, evaluation, and action pipeline for Helix cache operations. Replace the Python/resources shadow implementation with native shadow orchestration and C# integration tests, organized into sibling source and tests projects. Correct the opt-in gate for the shadow workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee547d49-5419-4268-b01f-6b2757f99953
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee547d49-5419-4268-b01f-6b2757f99953
Keep shadow validation disabled by default after the enabled CI run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee547d49-5419-4268-b01f-6b2757f99953
Leave the shadow lane enabled while validating cache reuse in the draft PR.
The synchronous experimental harness is intentional; disable it before merge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee547d49-5419-4268-b01f-6b2757f99953

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant