Repository navigation
Description
Found by the first run of the detection-accuracy harness (PR #3130, closes #3117) against the pinned language-crucible corpus. One corpus file — cosmetic next to #3132 and the trampoline issue.
Measured
assembly/cosmopolitan/BUILD.mk classifies as python at Tier 1, intensity 0.95, proof Prefix Anchor (BUILD). Expected makefile.
The file is unambiguously a makefile — its first line is a mode line saying so:
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
Mechanism
inspect()'s metadata-anchor block tests the filename prefix (language_lens.py:296-299):
elif name.split(".")[0] in self.anchor_map:
base_anchor = name.split(".")[0]
target_id = self.anchor_map.get(base_anchor)
anchor_proof = f"Prefix Anchor ({base_anchor})"BUILD is a registered exact_matches anchor for python (Bazel BUILD files) — confirmed: anchor_map["BUILD"] == "python". The branch returns immediately at PROSE_CONFIDENCE and never considers that the file's actual extension .mk is a known, uncontested code extension claimed solely by makefile (extension_map[".mk"] == "makefile", and .mk is not in COLLISION_FREQUENCIES).
The same block already has the concept it needs. The "Executable Shield" guard computes is_known_code_ext at :270-274, and the prose-anchor path immediately below gates on it (if not is_known_code_ext: at :277, and elif is_prose: at :300). The prefix-anchor branch sits between the two gated paths and is the only one without the guard.
Suggested direction (record, do not pre-decide)
Skip prefix-anchoring when the file's own extension is a known code extension — i.e. let a real extension outrank a filename prefix.
Preserve this asymmetry: an exact filename match (Makefile, Dockerfile) should still outrank an extension, since those files have no meaningful extension. That path is a separate branch (if name in self.anchor_map at :294) and should be left alone; only the prefix form at :296 should yield. The fix is therefore surgical to one branch.
Related
#3117 (the harness that found this), #3132 (the other Tier-1.5/gravity error class from the same run).
Activity
squid-protocol commentedon Sep 17, 2026
Fixed in #3127 (merged 2026-09-17T10:27:25Z, commit
bede481f+). The PR referenced this issue but without a closing keyword, so it stayed open — closing manually..tclthat re-execspython3still trips the trap, pinned bytest_trampoline_suppression_requires_the_extension_to_claim_the_interpreter..in) also do not outrank a prefix, soMakefile.pre.instays makefile.Regression coverage in
tests/core_engine/test_detection_resolution_order.py. Measured effect on the #3117 harness: overall accuracy 0.9964 -> 0.9974, refusals 3 -> 1, Tier 5 conflicts 3 -> 1.squid-protocol commentedon Sep 17, 2026
Reopening — my earlier close was premature and wrong.
#3127 merged as a squash containing only its first half (through the csh/pfsh/luatrace triggers). The trampoline and prefix-anchor fixes were in a later commit that did NOT land:
grep -c _trampoline_interpreteron main returns 0. My close comment attributed the fix to a merge that does not contain it.The fix is real and tested, but currently only on the
fix/detection-3116branch. Re-landing it on current main now; will close against the merge commit that actually carries it.fix(detection): clear trampoline bootstraps; let a real extension out…