Skip to content

fix(orchestrator): make treehash-mapping cache write best-effort (audit #8) - #249

Draft
sbalabanov wants to merge 1 commit into
mainfrom
audit/fix-08-besteffort-treehash-put
Draft

fix(orchestrator): make treehash-mapping cache write best-effort (audit #8)#249
sbalabanov wants to merge 1 commit into
mainfrom
audit/fix-08-besteffort-treehash-put

Conversation

@sbalabanov

Copy link
Copy Markdown
Contributor

Summary

The treehash-mapping Put is a pure cache optimization (maps build description to treehash to skip workspace materialization on future requests), but its failure was incorrectly failing the entire request after a successful graph computation.

  • Make treehash-mapping Put best-effort: on error, log a structured warning and continue serving the computed result
  • Add inline comment documenting the two-tier cache write policy (identity-bearing writes are load-bearing; pure-optimization writes are best-effort)
  • Add table-driven tests pinning both behaviors: treehash Put failure still succeeds, graph blob write failure still fails

🤖 Generated with Claude Code

The treehash-mapping Put maps (remote, base sha, requests) to treehash
so future requests can skip workspace materialization. Unlike the graph
blob write (which is load-bearing because the response is read back from
storage), this is a pure cache optimization whose failure should not
fail the entire request after a successful computation.

On error, log a structured warning and continue serving the computed
result. Add inline comment documenting the two-tier cache write policy
and table-driven tests pinning both behaviors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

4 participants