Never cache failed or incompletely written task outputs
A killed build left an output directory that the next run accepted as a hit. Publish a cache entry only after successful exit and complete output hashing.
- Focused work estimate
- 1h 45m + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Atomicity · Cache design · Failure injection
Estimated field mix
- Developer tooling60%
- Storage systems40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
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
- Nonzero exit, cancellation, and missing declared outputs never create reusable entries.
- Entries become visible through one final commit marker after all files and metadata are written.
- Concurrent identical writers either publish equivalent complete entries or report an integrity conflict.
Implementation constraints
- Use a unique staging directory per attempt.
Verification to include
- Kill a fixture build after it creates one output and assert the next run executes it again.
- Race two successful writes for one key and verify readers observe only complete entries.
Deliverables
- Atomic cache publisher and partial-output test
Rollout and recovery
Invalidate legacy entries without a completion marker; keep cache misses safe by running the original task.
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.