Skip to content

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

Description

@zackees

Problem

The ESP32 embed-processing path extracts a filesystem path from each MaterializedLnk cache object, but drops the lease object immediately. _lnk_leases is declared for lifetime retention yet the created lease is not appended, so cache cleanup/eviction can invalidate a materialized .lnk path while the consuming build step still expects it to exist.

Source

Unresolved CodeRabbit thread on merged PR #119:
#119 (comment)

A current-main audit found no duplicate issue and confirmed the retention gap remains.

Acceptance criteria

  • Retain every MaterializedLnk in _lnk_leases for the full ESP32 embed-processing operation.
  • Add a regression that proves the materialized cache lease remains alive while its extracted path is consumed.
  • Release leases normally when the operation ends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions