fix: leave receiver-blind calls unresolved #398

Merged
buildagent merged 4 commits from codex/csharp-extension-safety into master 2026-10-20 18:13:10 +02:00
Member

An instance call such as widget.Describe() could resolve to an incompatible Describe(this string) extension when receiver origin was unavailable. Removing that extension exposed another wrong-target path through unique method-name proximity or namespace imports. The runtime now leaves these calls extracted and explicitly unresolved.

Remove the name-only extension tier and gate the unique-candidate tiers using the existing C#/PHP receiver-locality policy. Lexical/self calls and origin-backed lookup retain their paths. Historical provenance code 70 remains decodable. Schema 86 rebuilds disposable caches so old false edges cannot survive an upgrade. Extension declaration metadata, capability dependencies, guest ABI, SDK inputs, and all eleven provider package identities remain unchanged. Runtime 0.41.3 uses the existing C# 0.1.5 provider; no provider release cycle is needed.

There is a real recall cost. Exact call-site comparison of signed v0.41.2 and the candidate on identical published package bytes withdraws 232 Dapper and 903 Guzzle method bindings, with no target gains, target swaps, or extraction drift. The other five tier-one languages retain their binding baselines. Some withdrawals are correct static/instance/extension calls without sufficient origin proof, including Dapper's 18 PocoData.ForType sites. Wrong targets removed include Mighty model calls bound to benchmark methods and Guzzle response-interface calls bound to a test-only request implementation. Safe recall restoration requires provider-owned lookup evidence and instance precedence (#313).

Dapper's hand-verified benchmark still returns 53/62 answers, with the same nine known misses. Twenty answers now arrive as explicitly unproven name fallback: SanitizeParameterValue 3, LookupDbType 1, SetupCommand 10, CastResult 3, and the same three Sanitize sites scored again by rename_edit_site. The exact fallback-channel pin moves 5 to 25; oracle truth, recall floors, cost records, attribution, and tolerances stay unchanged. The injection fixture uses an explicit static import for its two positive calls and retains the distant qualified call as a negative control.

CI also exposed a Windows permission-refusal timing failure: one call took 2.061 s against its 2 s bound. The permission probe repeatedly paid SQLite's Windows access-denied retry loop. Windows now uses the existing direct file probe; Unix keeps SQLite-first probing to preserve POSIX locks. No caching, new dependency, permission-policy change, or relaxed bound. The cross-process lock-preservation test now runs on Windows too and accepts only SQLite BUSY/LOCKED as proof.

Removing the extension tier eliminates 21 SQL statements even for non-C# projects. Before/after statement traces attribute about 34,000 Express and 32,000 Sinatra full-scan steps to those retired statements; both also lose two sorts and keep the same automatic-index work. The guarded seven-repository cost writer lowers the cost record with the existing tolerance policy and no degraded-stage allowance. The record also discloses prior in-band drift separately from this patch's exact trace comparison.

Validation:

  • Captured #397 before the fix. Native and frozen packaged-worker regressions cover block/file namespaces, extension deletion/restoration, metadata/direct-call controls, and schema-85 cached false-edge reset.
  • Actual published C# 0.1.5 installed and checked with built-in publisher trust and full requested grants: public queries verify package ownership and keep Widget.Describe explicitly unresolved. The .NET 9.0.118 compiler oracle prints widget.
  • Seven daemon precision gates retain their existing positive expectations; exact real-corpus binding comparison provides the broader effect review above.
  • Candidate artifact pilots: C# 83 phases and Timeline 13 phases passed, with unchanged published package identities. These grade selected semantics and CLI reindexing, not complete language semantics or watcher transport.
  • Production source at d7d8c9d0 passed the Linux ordinary/timing/artifact/doc job and the complete native Windows lane (4,761 ordinary tests plus timing checks, including the permission regression and new lock-preservation case). Final changes after that are the corpus fixture and reviewed cost record only.
  • Complete required-corpus local validation: 72 tests across eight suites, 12 unblessed cost tests, three PHP differential cases, and the release-only watcher seam passed. The final five-case agent benchmark also passed: 93 checks across the complete corpus CI job, all with the corpus required.
  • Affected Clippy with warnings denied, formatting, and whitespace checks passed. Final-head required CI must pass before merge.

C# still has static/instance/extension recall gaps, and the plugin ABI/package format remains experimental. This PR does not claim complete C# production readiness.

Fixes #397.

An instance call such as `widget.Describe()` could resolve to an incompatible `Describe(this string)` extension when receiver origin was unavailable. Removing that extension exposed another wrong-target path through unique method-name proximity or namespace imports. The runtime now leaves these calls extracted and explicitly unresolved. Remove the name-only extension tier and gate the unique-candidate tiers using the existing C#/PHP receiver-locality policy. Lexical/self calls and origin-backed lookup retain their paths. Historical provenance code 70 remains decodable. Schema 86 rebuilds disposable caches so old false edges cannot survive an upgrade. Extension declaration metadata, capability dependencies, guest ABI, SDK inputs, and all eleven provider package identities remain unchanged. Runtime 0.41.3 uses the existing C# 0.1.5 provider; no provider release cycle is needed. There is a real recall cost. Exact call-site comparison of signed v0.41.2 and the candidate on identical published package bytes withdraws 232 Dapper and 903 Guzzle method bindings, with no target gains, target swaps, or extraction drift. The other five tier-one languages retain their binding baselines. Some withdrawals are correct static/instance/extension calls without sufficient origin proof, including Dapper's 18 `PocoData.ForType` sites. Wrong targets removed include Mighty model calls bound to benchmark methods and Guzzle response-interface calls bound to a test-only request implementation. Safe recall restoration requires provider-owned lookup evidence and instance precedence (#313). Dapper's hand-verified benchmark still returns 53/62 answers, with the same nine known misses. Twenty answers now arrive as explicitly unproven name fallback: SanitizeParameterValue 3, LookupDbType 1, SetupCommand 10, CastResult 3, and the same three Sanitize sites scored again by rename_edit_site. The exact fallback-channel pin moves 5 to 25; oracle truth, recall floors, cost records, attribution, and tolerances stay unchanged. The injection fixture uses an explicit static import for its two positive calls and retains the distant qualified call as a negative control. CI also exposed a Windows permission-refusal timing failure: one call took 2.061 s against its 2 s bound. The permission probe repeatedly paid SQLite's Windows access-denied retry loop. Windows now uses the existing direct file probe; Unix keeps SQLite-first probing to preserve POSIX locks. No caching, new dependency, permission-policy change, or relaxed bound. The cross-process lock-preservation test now runs on Windows too and accepts only SQLite BUSY/LOCKED as proof. Removing the extension tier eliminates 21 SQL statements even for non-C# projects. Before/after statement traces attribute about 34,000 Express and 32,000 Sinatra full-scan steps to those retired statements; both also lose two sorts and keep the same automatic-index work. The guarded seven-repository cost writer lowers the cost record with the existing tolerance policy and no degraded-stage allowance. The record also discloses prior in-band drift separately from this patch's exact trace comparison. Validation: - Captured #397 before the fix. Native and frozen packaged-worker regressions cover block/file namespaces, extension deletion/restoration, metadata/direct-call controls, and schema-85 cached false-edge reset. - Actual published C# 0.1.5 installed and checked with built-in publisher trust and full requested grants: public queries verify package ownership and keep Widget.Describe explicitly unresolved. The .NET 9.0.118 compiler oracle prints `widget`. - Seven daemon precision gates retain their existing positive expectations; exact real-corpus binding comparison provides the broader effect review above. - Candidate artifact pilots: C# 83 phases and Timeline 13 phases passed, with unchanged published package identities. These grade selected semantics and CLI reindexing, not complete language semantics or watcher transport. - Production source at d7d8c9d0 passed the Linux ordinary/timing/artifact/doc job and the complete native Windows lane (4,761 ordinary tests plus timing checks, including the permission regression and new lock-preservation case). Final changes after that are the corpus fixture and reviewed cost record only. - Complete required-corpus local validation: 72 tests across eight suites, 12 unblessed cost tests, three PHP differential cases, and the release-only watcher seam passed. The final five-case agent benchmark also passed: 93 checks across the complete corpus CI job, all with the corpus required. - Affected Clippy with warnings denied, formatting, and whitespace checks passed. Final-head required CI must pass before merge. C# still has static/instance/extension recall gaps, and the plugin ABI/package format remains experimental. This PR does not claim complete C# production readiness. Fixes #397.
fix: leave receiver-blind calls unresolved
Some checks failed
Package CI / package (svelte) (pull_request) Successful in 39s
Package CI / package-corpus (rust) (pull_request) Successful in 38s
Package CI / package (vue) (pull_request) Successful in 48s
Package CI / package-corpus (csharp) (pull_request) Successful in 50s
Package CI / package-corpus (svelte) (pull_request) Successful in 41s
Pilot plugin compatibility / Fetch the pinned runtime once (pull_request) Successful in 1m14s
Package CI / package-corpus (timeline) (pull_request) Successful in 41s
Package CI / package-corpus (xaml) (pull_request) Successful in 40s
Package CI / package-corpus (typescript) (pull_request) Successful in 48s
Package CI / package-corpus (vue) (pull_request) Successful in 48s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m35s
Pilot plugin compatibility / Pilot compatibility (timeline) (pull_request) Successful in 1m14s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m42s
Pilot plugin compatibility / Pilot compatibility (csharp) (pull_request) Successful in 2m38s
Pilot plugin compatibility / Pilot compatibility result (pull_request) Successful in 1s
CI / cargo doc (intra-doc links) (pull_request) Successful in 8m11s
Package CI / package suites (clippy) (pull_request) Successful in 9m27s
CI / cargo deny (pull_request) Successful in 9m23s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 10m9s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 10m56s
CI / cargo clippy (pull_request) Successful in 11m12s
CI / cargo check (windows-gnu) (pull_request) Successful in 11m35s
Package CI / package (ruby) (pull_request) Successful in 12m40s
Package CI / package-corpus (ruby) (pull_request) Successful in 20m51s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
CI / cargo test (pull_request) Successful in 27m38s
CI / OSS corpus (tier 1) (pull_request) Failing after 39m17s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been cancelled
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Has been cancelled
CI / cargo test (daemon transport) (pull_request) Has been cancelled
c95a5f5fc9
test: record receiver-proof fallback identity loss
Some checks failed
Package CI / package-corpus (rust) (pull_request) Successful in 43s
Package CI / package-corpus (php) (pull_request) Successful in 46s
Package CI / package-corpus (timeline) (pull_request) Successful in 35s
Package CI / package (csharp) (pull_request) Successful in 46s
Package CI / package-corpus (javascript) (pull_request) Successful in 56s
Package CI / package-corpus (typescript) (pull_request) Successful in 35s
Package CI / package-corpus (xaml) (pull_request) Successful in 39s
Package CI / package-corpus (svelte) (pull_request) Successful in 51s
Package CI / package-corpus (vue) (pull_request) Successful in 44s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m4s
Pilot plugin compatibility / Fetch the pinned runtime once (pull_request) Successful in 1m42s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m37s
Pilot plugin compatibility / Pilot compatibility (timeline) (pull_request) Successful in 1m6s
Pilot plugin compatibility / Pilot compatibility (csharp) (pull_request) Successful in 2m45s
Pilot plugin compatibility / Pilot compatibility result (pull_request) Successful in 1s
Package CI / package suites (clippy) (pull_request) Successful in 7m18s
CI / cargo doc (intra-doc links) (pull_request) Successful in 8m0s
CI / cargo deny (pull_request) Successful in 8m55s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 9m53s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 10m42s
CI / cargo clippy (pull_request) Successful in 10m43s
CI / cargo check (windows-gnu) (pull_request) Successful in 11m18s
Package CI / package (ruby) (pull_request) Successful in 12m55s
Package CI / package-corpus (ruby) (pull_request) Successful in 20m51s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Failing after 31m29s
CI / cargo test (daemon transport) (pull_request) Has been cancelled
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been cancelled
CI / cargo test (pull_request) Has been cancelled
CI / OSS corpus (tier 1) (pull_request) Has been cancelled
d831f7d443
fix: avoid SQLite access-denied retries in Windows probes
Some checks failed
Package CI / package-corpus (php) (pull_request) Successful in 38s
Package CI / package-corpus (csharp) (pull_request) Successful in 36s
Package CI / package-corpus (rust) (pull_request) Successful in 42s
Package CI / package (javascript) (pull_request) Successful in 50s
Package CI / package-corpus (svelte) (pull_request) Successful in 39s
Pilot plugin compatibility / Fetch the pinned runtime once (pull_request) Successful in 1m4s
Package CI / package-corpus (typescript) (pull_request) Successful in 35s
Package CI / package-corpus (timeline) (pull_request) Successful in 44s
Package CI / package-corpus (vue) (pull_request) Successful in 40s
Package CI / package-corpus (xaml) (pull_request) Successful in 45s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m34s
Pilot plugin compatibility / Pilot compatibility (timeline) (pull_request) Successful in 1m21s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m47s
Pilot plugin compatibility / Pilot compatibility (csharp) (pull_request) Successful in 2m54s
Pilot plugin compatibility / Pilot compatibility result (pull_request) Successful in 1s
CI / cargo doc (intra-doc links) (pull_request) Successful in 8m8s
Package CI / package suites (clippy) (pull_request) Successful in 9m3s
CI / cargo deny (pull_request) Successful in 9m37s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 9m56s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 10m44s
CI / cargo clippy (pull_request) Successful in 11m0s
CI / cargo check (windows-gnu) (pull_request) Successful in 11m24s
Package CI / package (ruby) (pull_request) Successful in 12m32s
Package CI / package-corpus (ruby) (pull_request) Successful in 21m4s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
CI / cargo test (pull_request) Successful in 27m54s
CI / OSS corpus (tier 1) (pull_request) Failing after 39m40s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 42m59s
CI / cargo test (daemon transport) (pull_request) Successful in 10m25s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
d7d8c9d096
test: align corpus controls and cost with receiver proof
All checks were successful
Package CI / package-corpus (csharp) (pull_request) Successful in 42s
Package CI / package (rust) (pull_request) Successful in 46s
Package CI / package-corpus (typescript) (pull_request) Successful in 32s
Package CI / package-corpus (php) (pull_request) Successful in 59s
Package CI / package-corpus (svelte) (pull_request) Successful in 44s
Package CI / package-corpus (rust) (pull_request) Successful in 33s
Package CI / package-corpus (timeline) (pull_request) Successful in 50s
Package CI / package-corpus (xaml) (pull_request) Successful in 38s
Package CI / package-corpus (vue) (pull_request) Successful in 39s
Pilot plugin compatibility / Fetch the pinned runtime once (pull_request) Successful in 1m36s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m32s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m41s
Pilot plugin compatibility / Pilot compatibility (timeline) (pull_request) Successful in 1m14s
Pilot plugin compatibility / Pilot compatibility (csharp) (pull_request) Successful in 2m55s
Pilot plugin compatibility / Pilot compatibility result (pull_request) Successful in 1s
Package CI / package suites (clippy) (pull_request) Successful in 9m1s
CI / cargo doc (intra-doc links) (pull_request) Successful in 8m16s
CI / cargo deny (pull_request) Successful in 9m27s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 10m2s
CI / cargo clippy (pull_request) Successful in 10m40s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 10m40s
CI / cargo check (windows-gnu) (pull_request) Successful in 11m19s
Package CI / package (ruby) (pull_request) Successful in 12m12s
Package CI / package-corpus (ruby) (pull_request) Successful in 21m9s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
CI / cargo test (pull_request) Successful in 27m48s
CI / OSS corpus (tier 1) (pull_request) Successful in 39m17s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 43m37s
CI / cargo test (daemon transport) (pull_request) Successful in 10m23s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
7aa9cf3171
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index!398
No description provided.