noCV
BUILD-105 · Cache only valid results

Restore cached outputs without touching unrelated files

Practice briefStoryExpert

A cached archive restored ../config.json during a local corruption test. Replace blind extraction with a validated manifest and staged restoration inside declared output roots.

Focused work estimate
4h + prerequisites
Priority in the scenario
High
Engineering practice
Filesystem safety · Artifact integrity · Transactional writes · Threat modeling

Estimated field mix

  • Security50%
  • Developer tooling30%
  • Storage systems20%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A product team waits for every package to rebuild after small changes. An experimental cache is faster but occasionally returns success after a shared type changed. Build a small, auditable task runner around fixture packages.

Setup prerequisites

  • Prepare four fixture packages with one shared library and two applications.
  • Use only trusted fixture commands in local tests.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Every restored file has a normalized in-root path and verified content digest.
  • Absolute paths, traversal paths, symlink escapes, and unexpected output entries are rejected.
  • A rejected or interrupted restoration preserves the prior output set and reports a cache miss.

Implementation constraints

  • Treat cache entries as untrusted even when the cache is local.
  • Separate verification from replacement and avoid executing archive hooks.

Verification to include

  • Restore a valid two-directory output manifest and compare every digest.
  • Use traversal, digest mismatch, and interrupted replacement fixtures and verify unrelated files are unchanged.

Deliverables

  • Validated cache restorer and corruption fixtures

Rollout and recovery

Enable restoration behind an opt-in flag; on any integrity error rebuild from source and quarantine that cache entry.

Value of the work

For the engineer: Practice incremental computation, dependency scheduling, cache correctness, and cancellation.

For the team: Inspect whether faster checks preserve the guarantees reviewers depend on.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.