Repository navigation
Description
Observed
services[].scope_cache_sites[].file is written exactly as the input path was given to the extractor. Every other file field in the facts (ctor_file, root_resolve_sites[].file, function records, subscriptions) goes through Rel() and comes out working-directory relative. So when the launcher passes absolute inputs, as the P-037 evidence takes do (scripts/p037_mos_snapshot.py hands analysis_paths() absolute paths), these three sites carry the machine's checkout path.
Reproduction on T (4a8e6582e10222403cd40adc9e95db7e0228a1c2), frozen repo population, same 81 inputs, same cwd:
- inputs passed absolute: 3 occurrences of the absolute checkout path in the facts, all in
frontend/roslyn/samples/DiCaptiveSample.cs(ScopeCachingService,ClockCachingService,UnitOfWorkCachingService); - inputs passed relative: the same three sites come out relative, facts otherwise identical.
Consequence: the repo-population FACTS digest is environment dependent. The M1 baseline (docs/evidence/p037-a2-baseline-mos-repo.json on claude/p037-a2-baseline-4a8e658) and a take of the same commit in a different checkout differ by 126 bytes, which is exactly three paths times the difference in checkout-root length. The engine layers (python-ownlang, rust-own-bridge) are byte-identical across the two environments, so the measured surface is unaffected; only the facts digest is not portable.
Classification
Found pre-existing portability defect, present at T. It is not a P-037 §10.1 case-1 implementation defect: the current OwnIR contract states no "file must be repo-relative" rule. It is deliberately not an A2.2 commit (owner ruling): scope_cache_sites is the anchor for DI005, and normalizing absolute → relative can move a facts/MOS/verdict artifact path, so folding it into the P-037 treatment would mix two causes of FACT-DIFF in one experiment. It gets its own change and its own acceptance.
Proposed fix
Route the site file through Rel(...) where ScopeCachedTypes yields it (frontend/roslyn/OwnSharp.Extractor/Program.cs, the scopeCacheSites.Add(new { type = cachedType, file = cacheFile, line }) site around line 5275), the same way ctor_file and root_resolve_sites[].file already are.
Acceptance
- a fixture that feeds an absolute input path and asserts every
filefield in the emitted facts is relative; corpus/p037-shapescensus unchanged (no shape carries a scope-cache site) and the DI corpus goldens re-recorded only where the DI005 anchor path changes, with the diff reviewed as this issue's own before/after;- explicitly outside any P-037 A2 evidence pair: land it either before a future baseline round or as its own treatment step with its own FACT-DIFF record.
Found during the P-037 A2.1 evidence rehearsal (#304).
Activity
P-037 A2.2-0: freeze the relevance taxonomy, the named exclusions and…