Context
Follow-up to #966 (PR #985). #985 made ESP32 sketch + core compiles hit zccache across project directories (warm compile-sketch 94.5 s → 0.73 s, core 12.9 s → 0.55 s) by fixing two fbuild-side determinism leaks: the object filename hashed the absolute source path, and library include order came from unsorted read_dir.
Framework-lib (fw-libs) object compiles still miss cross-project — warm fw-libs stays ~150 s. The 126 fw-libs TUs report verdict=Cold in the per-compile zccache DIAG (their context key is not found), while the 126 sketch/core TUs now verdict=Hit.
What's ruled out
Hypothesis
Since the args are identical yet the context key differs (verdict=Cold), the leak is a non-arg context input specific to the zccache wrap CLI path (fw-libs use the CLI wrapper → daemon IPC, not the in-process embedded service that sketch/core use). Candidates: per-session system_includes discovery differing on the CLI path, or a session/key_root resolution difference between the CLI-wrap session and the embedded ephemeral session.
Next diagnostic
Dump the fw-lib compile's context-key inputs (not just the hash) for cold vs warm — reuse the [FB966DIAG] tracing approach (patch a tracing::info! at pipeline/mod.rs verdict, [patch] fbuild's zccache to the local clone). Diff the normalized source/includes/defines/system-includes fed to compute_context_key between the two checkouts; the one differing input is the leak. Then relativize/normalize it (fbuild-side) or exclude it (zccache-side), matching #985's approach.
Acceptance
Part of #974 / follow-up to #966.
Context
Follow-up to #966 (PR #985). #985 made ESP32 sketch + core compiles hit zccache across project directories (warm compile-sketch 94.5 s → 0.73 s, core 12.9 s → 0.55 s) by fixing two fbuild-side determinism leaks: the object filename hashed the absolute source path, and library include order came from unsorted
read_dir.Framework-lib (
fw-libs) object compiles still miss cross-project — warmfw-libsstays ~150 s. The 126fw-libsTUs reportverdict=Coldin the per-compile zccache DIAG (their context key is not found), while the 126 sketch/core TUs nowverdict=Hit.What's ruled out
Esp.cpp, 435 tokens) is byte-identical between the/tmp/ndsand/tmp/nds2checkouts after normalizing the project-dir prefix — including-o, all-I, defines, and order. So it is not an arg-level path/order leak.~/.fbuild/…), so fix(build): ESP32 sketch+core compiles hit zccache cross-project (#966) #985'sobject_hash_keykeeps their absolute (already project-independent) path — object names match across checkouts.ZCCACHE_WORKTREE_ROOTon thezccache wrapCLI path fw-libs use; it did not change the outcome.Hypothesis
Since the args are identical yet the context key differs (verdict=Cold), the leak is a non-arg context input specific to the
zccache wrapCLI path (fw-libs use the CLI wrapper → daemon IPC, not the in-process embedded service that sketch/core use). Candidates: per-sessionsystem_includesdiscovery differing on the CLI path, or a session/key_rootresolution difference between the CLI-wrap session and the embedded ephemeral session.Next diagnostic
Dump the fw-lib compile's context-key inputs (not just the hash) for cold vs warm — reuse the
[FB966DIAG]tracing approach (patch atracing::info!atpipeline/mod.rsverdict,[patch]fbuild's zccache to the local clone). Diff the normalized source/includes/defines/system-includes fed tocompute_context_keybetween the two checkouts; the one differing input is the leak. Then relativize/normalize it (fbuild-side) or exclude it (zccache-side), matching #985's approach.Acceptance
fw-libshitting zccache (drops from ~150 s to seconds), completing cross-project caching for all firmware compile phases.Part of #974 / follow-up to #966.