Skip to content

Add an option to discard failed results in the action cache - #2958

Open
mikweaa wants to merge 2 commits into
TraceMachina:mainfrom
mikweaa:ac-discard-failed-results
Open

mikweaa wants to merge 2 commits into
TraceMachina:mainfrom
mikweaa:ac-discard-failed-results

Conversation

@mikweaa

@mikweaa mikweaa commented Oct 18, 2026

Copy link
Copy Markdown

What and why

Added a new field to AcStoreConfig that makes the AC server acknowledge "UpdateActionResult" requests that have a non zero exit code without caching them.

Why? So that failures caused by something temporary don't get cached.

Fixes #321

How was this verified?

Two new tests in ac_server_test.rs. With the option on, a failed result isn't stored, and a successful one still is. I checked the test by altering line 150: && action_result.exit_code != 0 to && action_result.exit_code >= 0 and the test caught it (the success test failed).

Risk

The setting is off by default so risk is low. The only issue is that when it's on genuine failures are also rerun which is slower.

AI assistance

Claude drafted everything, I reviewed every line

Added an opt in "discard_failed_results" setting to the AC store config.
When it is enabled requests whose result has a non zero exit code are acknowledged but not stored.

Fixes TraceMachina#321
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Nov 16, 2026 12:56pm UTC
nativelink-aidm Ready Ready Preview Nov 16, 2026 12:56pm UTC

Request Review

@CLAassistant

CLAassistant commented Oct 18, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@rajputdivyanshu81

Copy link
Copy Markdown
Contributor

Thanks for this, the approach looks right to me. A few notes:

  1. The new field changes the config reference, which AGENTS.md says to regenerate
    with gen:config-reference. reference/nativelink-config/main.mdx and index.mdx
    aren't updated in this PR.
  2. Nothing records when a result is discarded. A debug! line, or a counter, would let
    operators confirm the option is doing something.
  3. For maintainers: the worker side configures this with UploadCacheResultsStrategy
    (SuccessOnly, Everything, ...). Should the AC server reuse that enum instead of
    a bool, so both sides are configured the same way?

Context: workers already default to SuccessOnly, so this option covers the
remaining case of client-uploaded results via UpdateActionResult (e.g. Reclient
local execution).

This branch was successfully deployed

2 active deployments
Preview – nativelink — b4f698da Deployed Nov 16, 2026 by vercel[bot]
Preview – nativelink-aidm — b4f698da Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a filter to the action cache

4 participants