Repository navigation
feat(p014): add opt-in project-aware binding coverage - #423
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
…vation only) One CSharpCompilation per project from the existing project.assets.json, local targeting packs and the packages folder (project references as compilation references; dotnet/sdk conflict order; fail-closed statuses), written to a separate file after the facts. Facts, findings, SARIF and exit codes are unchanged; directory/.sln/unrestored inputs are recorded UNSUPPORTED. CI step in wpf-extractor asserts byte-identical facts and the fail-closed status. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
G0 Wpf.Ui.dll package-vs-package conflict equals the SDK oracle (209=209); G1 P4/P5 all SOURCE_SET_INCOMPLETE; G2 facts byte-identical main/off/on, controls K1-K12 against production code, fixtures vs oracle, foreign 0, deterministic sidecars; G3 P5 +1390 ms vs limit 3063 ms, ~302 MB. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
…only CRLF module, same on main Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
…D0-1..3) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
…w; FIX0 gate proposed F-PROD0-1 (#if NET8_0 without DefineConstants -> COMPLETE), F-PROD0-2 (probe marker text -> no sidecar) and F-PROD0-3 (unreadable source with COMPLETE) all confirmed on the f84943d build. Facts and exit codes unaffected. Fix gate is proposed only, not started. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
|
Details:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
…sources; probes off in production - any #if/#elif (Roslyn directive trivia) in a unit's sources -> SOURCE_SET_INCOMPLETE(preprocessor-conditional): sources are parsed without the SDK's TFM defines, so the measured branch may not be the compiled one; - an unreadable source -> SOURCE_SET_INCOMPLETE(unreadable-source); - project-reference status propagation moved to Compile (post-order), after each member's sources are read, so an incompleteness found while reading reaches every parent; - /*probe:*/ parsing only behind Measure(recordProbes: true), bounds-checked; the sidecar Runner never enables it. Facts, findings and exit codes unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
…ed; G0-G3 re-run) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG
|
FIX0 pushed: new head Verdict history:
Commits, in order:
The fix (
Falsifiers:
G0–G3 re-run:
Tests. Not claimed. |
What this is
P-014 PROD0. It adds one opt-in, observation-only extractor flag,
--binding-coverage FILE. For one restored.csprojit writes a per-project binding-coverage record:Without the flag nothing changes. Extractor behaviour, OwnIR, SARIF, exit codes and diagnostics stay the same.
PROD1 remains forbidden. New symbols are not fed to diagnostics. #407 stays deferred.
Final head:
4b0321e240beda354f193b54502ccd4f18592478. Base:main22b29d5b.Verdict history (both decisions kept)
f84943dPASS-P014-PROD0issued on G0–G3, then refuted by the owner's adversarial review →KILL-P014-PROD0(final)REPORT.md(unrewritten),01-review-falsifiers.md,02-review-result.md4b0321ePASS-P014-FIX0: a separate, bounded experiment, pre-registered before the code change; CI green on this head03-fix0-preregistration.md,04-fix0-result.mdThe review found three defects on
f84943d, all in what the sidecar said about its own completeness. Facts andexit codes were never affected.
f84943d4b0321e#if NET8_0, noDefineConstantsCOMPLETE(it measured the#elsebranch)SOURCE_SET_INCOMPLETE [preprocessor-conditional]"/*probe:"in a source.csunreadable = 1together withCOMPLETESOURCE_SET_INCOMPLETE [unreadable-source]COMPLETE[unreadable-source]; Root[p2p-unit-source_set_incomplete:Child]Production changes
frontend/roslyn/OwnSharp.Extractor/BindingCoverage.cs(new)OwnSharp.BindingCoverage, plus the sidecarRunner; FIX0 changes listed belowfrontend/roslyn/OwnSharp.Extractor/Program.cs(+17)--binding-coverage FILE,--binding-coverage-tfm TFM, usage text, and one call after the facts are written. A failure goes to stderr; the exit code is unchanged.github/workflows/ci.yml(one step inwpf-extractor)cmp-identical with and without the flag; directory and unrestored inputs areUNSUPPORTED; the restored sample is measured, deterministic, andCOMPLETEexactly when no reason is presentfrontend/roslyn/README.md,docs/proposals/P-014-semantic-resolution.mdFIX0, in
BindingCoverage.cs:#if/#elif(Roslyn directive trivia) givespreprocessor-conditional;unreadable-source;Compile, after the member's sources are read;/*probe:*/parsing runs only underMeasure(recordProbes: true), with a bounds check, and theRunnerneverenables it.
Fail closed
COMPLETErequires all of the following:conflict decided by the dotnet/sdk order (overrides → AssemblyVersion → FileVersion);
#if/#elif,Directory.Build.*, package MSBuild assets, an unreadable source, or an incomplete project-reference member;Defines and implicit usings are not applied; they are only reported.
Evidence on
4b0321e(docs/evidence/p014-prod0-2026-10/04-fix0-result.md)main22b29d5b, this branch without the flag and this branch with it:P4
AD528B8A…, P55F0EA76D…, samplesF82A32D8….separately), K5, K6, K7, F2.3–F2.5, K11, K12 and the guard, run against the production code: all PASS, and
identical to the
f84943drun.Wpf.Ui.dll209 = 209, K9 163 = 163and 167 = 167.
f84943drun. In 12 sidecars every field is identical; the only change is the addedpreprocessor-conditionalreason on P4's root project and on P5. P4/P5 are neverCOMPLETE.peak about 297 MB.
Tests
ruff check .passes.4b0321e.python tests/run_tests.pyexits 1 on this Windows host.cargoon PATH.test_cli_ownir_fixturescases as themainbaseline in the same environment(frozen LF bytes against Windows CRLF). There are no other failures.
Limits
share of verified code.
preprocessor-conditionalis conservative: even#if DEBUGmakes a unit incomplete.foreign_binding = 0guards against leaks between projects. It is not independent proof that the referencemanifest is right; that rests on the SDK-oracle checks.
CONFLICT_UNRESOLVED), the rank and platformsteps, the full SDK contract.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TFkNAFFQz9KoTzpPws8vYG