eaa68f4005
The measured failure mode of speculative prefetch (the controlled 2x2 A/B on #441): a pilot load picks the plain-LRU slot and can evict an expert that was just demand-loaded and is still hot, which then gets re-read (thrash: +9-18% bytes for +0.5-0.7pt hit rate). Fix: a speculative load may evict a RESIDENT expert only if the predicted expert is historically hotter than the victim, by the same LFRU hysteresis tier_pick_lfru already uses (25% + 4 freq counts); otherwise it drops the speculation rather than displace a warm slot. Applied to both the blocking (pilot_realload) and io_uring (pilot_uring_batch) victim selections. Cache placement only -> output byte-identical (the moe() barrier still fences every layer; a dropped speculation is just demand-loaded later, same value). Default ON for the opt-in PILOT_REAL path; PILOT_EVICT_GUARD=0 restores plain-LRU for a single-binary A/B. Reuses the existing tier_lfru_score (tier.h). make check 111/111. Perf A/B needs a drive with idle bandwidth (this host is a QLC/DRAM-less lower bound); byte-identical, so it cannot regress output. Companion to the negative multi-worker result on #441. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>