Skip to content

[codex] fix(esp32): retain embed cache leases - #1327

Merged
zackees merged 1 commit into
mainfrom
feat/1326-materialized-lnk-leases
Aug 20, 2026
Merged

[codex] fix(esp32): retain embed cache leases#1327
zackees merged 1 commit into
mainfrom
feat/1326-materialized-lnk-leases

Conversation

@zackees

@zackees zackees commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • retain each MaterializedLnk while ESP32 embed paths are consumed by objcopy
  • release the RAII cache leases when embed processing completes or exits
  • add a real disk-cache regression covering the pinned and released states

RED → GREEN

  • before the fix, materialized_lnk_lease_lives_while_embed_path_is_consumed failed with pin count 0 instead of 1
  • after the fix, the focused regression passes

Validation

  • bash test -p fbuild-build-esp — 104 passed
  • soldr cargo fmt --all -- --check
  • soldr cargo clippy -p fbuild-build-esp --all-targets -- -D warnings
  • clud-review: clean

Closes #1326

Summary by CodeRabbit

  • Bug Fixes
    • Improved embedded file handling for relative and absolute .lnk paths.
    • Ensured resolved embedded files remain available while they are being consumed.
    • Added support for consistent path resolution across binary and text embedded files.

@zackees
zackees merged commit d9d0bfa into main Aug 20, 2026
25 of 26 checks passed
@zackees
zackees deleted the feat/1326-materialized-lnk-leases branch August 20, 2026 17:10
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c211b47-99a2-4b93-8cba-a6a77bd83ffc

📥 Commits

Reviewing files that changed from the base of the PR and between 76bc253 and 9003c9b.

📒 Files selected for processing (1)
  • crates/fbuild-build-esp/src/esp32/orchestrator/embed_stage.rs

📝 Walkthrough

Walkthrough

The ESP32 embed stage now resolves relative and absolute .lnk paths through the disk cache. It retains materialized leases while embed files are consumed. A regression test verifies cache pinning during consumption and release afterward.

Changes

ESP32 embed lease retention

Layer / File(s) Summary
Materialize embed entries
crates/fbuild-build-esp/src/esp32/orchestrator/embed_stage.rs
expand_embed_entries resolves embed paths, materializes .lnk entries through the disk cache, reports unavailable-cache errors, and retains leases.
Integrate and validate lease retention
crates/fbuild-build-esp/src/esp32/orchestrator/embed_stage.rs
Binary and text embed processing use the shared resolver. The test verifies materialized contents, active cache pins during consumption, and lease release afterward.

Estimated code review effort: 3 (Moderate) | ~20 minutes

✨ 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/1326-materialized-lnk-leases

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.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 21, 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.

bug(cache): retain MaterializedLnk leases during ESP32 embed processing

1 participant