Skip to content

test: cover interrupted install reconciliation - #609

Merged
zackees merged 1 commit into
mainfrom
feat/interrupted-install-recovery-tests
Jun 16, 2026
Merged

zackees merged 1 commit into
mainfrom
feat/interrupted-install-recovery-tests

Conversation

@zackees

@zackees zackees commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add disk-cache reconciliation regression coverage for recorded installs missing the .install_complete sentinel.
  • Remove stale managed zccache .zccache-*.tmp staging directories while holding the sidecar install lock.
  • Verify stale sidecar staging cleanup preserves fresh temp dirs and the final managed install directory.

Refs #603

Tests

  • cargo test -p fbuild-build managed_zccache --lib
  • cargo test -p fbuild-packages disk_cache::gc --lib
  • cargo fmt --all --check
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

A single unit test is added to gc.rs verifying that reconcile removes an on-disk installed directory and clears the corresponding index entry (installed_path, installed_bytes) when the .install_complete sentinel file is absent, and that orphan_files_removed is incremented.

Changes

GC reconcile sentinel test

Layer / File(s) Summary
reconcile removes install without sentinel
crates/fbuild-packages/src/disk_cache/gc.rs
Adds test_reconcile_removes_recorded_install_without_complete_sentinel: sets up a directory with payload but no sentinel, records it in the index, calls reconcile, and asserts directory deletion, index nullification, and orphan_files_removed increment.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A bunny hopped in, no sentinel in sight,
The index said "installed!" but something's not right.
reconcile sniffed, then swept the path clean,
Nulled bytes and path — the tidiest scene.
🐇✨ No orphan survives a well-tested machine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely describes the main change: adding a test for interrupted install reconciliation, which is exactly what the changeset accomplishes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/interrupted-install-recovery-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees
zackees merged commit 8ea340e into main Jun 16, 2026
90 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant