Corpus gates grade stale package pins (csharp 0.1.4 vs shipped 0.1.11, js 0.1.3 vs 0.1.6, …), hiding the C# csharp_partial bind withdrawal #534
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#534
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consolidated scope (triage 2026-11-09)
Priority: Critical: every corpus gate (baseline, stage, cost, tier-3) measures packages that do not ship, so the shipped extractors are ungraded; and a real C# withdrawal of correct binds is hidden.
This issue is now the canonical tracker for:
frozen::pin(name)(crates/test-support/src/frozen.rspin) returns the FIRSTPINSrow with that name, andshipped.rsuses it.tests/host-fixtures/packages/PINStherefore makes the corpus grade csharp 0.1.4 (shipped 0.1.11; no newer pin exists at all), javascript 0.1.3 (0.1.5 is pinned but never selected; shipped 0.1.6), typescript 0.1.4 (0.1.6 pinned; shipped 0.1.7), rust 0.1.5 (shipped 0.1.7) and python 0.1.4 (shipped 0.1.5). Fix: the corpus selects the version that ships (the bundled package set), with a registry test asserting that it equals the release bundleOriginal report
Summary
In C#, the namespace stage (
csharp_partial) withdraws correct inherited-member binds whenever it runs. On cs-dapper it hides this only because its cost estimate is about 190× its budget, so it never runs there. Each defect hides the other, and the corpus gate measures neither.A. When the stage runs, it removes correct binds
CODE_INDEX_CSHARP_PARTIAL_WORK_BUDGET=9500000000loses 162 binds and gains 4.Step, 37i, 19BaseSetup, 16GetClosedConnection, …), made by name tiers 10/12/120 and checked correct against the source. Example:benchmarks/Dapper.Tests.Performance/Benchmarks.Belgrade.cs:17 BaseSetup()→Benchmarks.cs:17 BenchmarkBase.BaseSetup.lang-out/csharp/min/z2). Removing an#if !NET4X … #endifwrapper around one file's body makes the binds come back (min/z5).usingdirectives inside#ifget nonamespace_import_factsrows. Innamespace_imports(crates/guest/csharp/src/csharp.rs:2985-3014), thepreproc_ifcondition counts as an earlier sibling and falls into_ => false.temp.proven_type_bases(index/inherited_members.rs:759), whichmember_lookup.rs:741then uses in place of the name-tier target, also for other files.#ifis everyday multi-targeting C#.B. The cost estimate is ~190× too high, and the gate is blind to it
resolver stage SKIPPED … stage="csharp_partial" estimate=9488891035 budget=5000000023 times in one run, andstages_skippedlists it three times.work_estimate(inherited_members.rs:48-109) multiplies five worst-case maxima: groups × owners × parts × (imports+32) × 32.tests/corpus/stage-baseline.jsonrecordscs-dapper "stage.csharp_partial.degraded": 0, so the gate's extractor is not the shipped one. The likely cause is that the corpus harness extracts with the frozen builtin (see #515).Proposal
usingdirectives insidepreproc_if/preproc_elsecount as imports, as a union over branches, each marked conditional.CSHARP_PARTIAL_ESTIMATE_SQLalready does for part of it). De-duplicatestages_skippedand the WARN.precision_gate(#188).Acceptance
stage-baseline.jsonis measured on the shipped package.#ifwrapper._ => falseand the fixture goes red.Evidence:
lang-out/csharp/runs/lost_binds.tsv,po.err,min/z2,min/z5.Filed from the per-language review on 2026-11-09: 8 agents, one per language plus one for Vue/Svelte/XAML/timeline, run against copies of the pinned corpus repos (
tests/corpus/corpus.toml) using installed build2dcfc615, which differs from master only by XAML/CI commits. The top claim of every issue was spot-checked in the main session. Artifacts live under the review session's scratchpadlang-out/<lang>/and are available on request.C# csharp_partial stage withdraws correct inherited-member binds when it runs (#if-wrapped using), and its ~190x cost estimate hides it from the gateto Corpus gates grade stale package pins (csharp 0.1.4 vs shipped 0.1.11, js 0.1.3 vs 0.1.6, …), hiding the C# csharp_partial bind withdrawalbuildagent referenced this issue2026-11-09 09:21:03 +01:00
Progress 2026-11-09: gate population fixed on branch
codex-534, movement measured, bind account in progressStep 1, done (commit
65d4218c, reviewed by the lead):precision_gatenow install the livetests/packages/<lang>/, the exact bytes recorded intests/packages/<lang>.digest, through the existingshipped::install(..., dir_of).PINSare unchanged and remain for host tests only (#318).install_shippedhas one caller, the corpus harness..digestrecords: package id, version and packed digest. Its mutation was run: C# pointed at its frozen dir goes red withcsharp: package digest differs.Movement on first measurement (corpus_ratchet, release, clean corpus; no baseline touched):
The shipped JS/TS packages resolve FEWER refs than the old pins. That is either a shipped recall regression or wrong binds the old pins made. Totals cannot say which, so no bless yet. In progress: a reusable
#[ignore]bind-diff suite, joined on (path, line, col, kind, occurrence) and split byresolved_by, with hand-checked samples of added, removed and unchanged binds for all four repos.Housekeeping: three corpus checkouts held stale
.code-index/first-contact state from 2026-10-20. That made the harness refuse correctly. They were backed up and removed (noted in #546).Bind account: the gate switch exposes two SHIPPED defects; no bless until both are fixed
The reusable suite
crates/indexer/tests/corpus_bind_diff.rs(#[ignore]) is on branchcodex-534(18cfce62).COSI_BIND_DIFF_REPO,COSI_BIND_DIFF_BASE/HEAD(frozen|shipped),COSI_BIND_DIFF_OUT.resolved_by.kindfrom the join goes red.Class→util.Class, 36 enum members → classes, callbacks → unrelated locals). The 10 sampled additions are correct.6c6ca5de) explain it.tier1r_receiverwrites inbenchmarks/Dapper.Tests.Performance/LegacyTests.csbindpost.Id/post.Text/… toDashing.Postinstead ofPerformance.Post. The file is innamespace Dapper.Tests.Performanceand hasusing Dapper.Tests.Performance.Dashing;. In C#, the enclosing namespace'sPosttakes precedence over the using-imported one (verified by the lead). Also 2 correct inherited calls lost.msgs[0].unwrap_begin()(tests/json.rs:162→Message::unwrap_begin, verified by the lead), 26Message.unwrap_*+ 4IncrementalIgnore.root/normalize. The shipped rust package records no qualifier for index-expression receivers.Unchanged-bind samples were correct in all four repos. The full sampled rows are in the account.
Decision (lead): the gate switch (
65d4218c) is correct and stays.baseline.jsonis NOT re-blessed until the C# enclosing-namespace precedence (#541) and the Rust index-receiver qualifier regression (#540) are fixed in the same train. Then the bless reason cites this account.Bind account for the re-bless on
integration-1109(e1420994) against the master-blessed baseline, all four moved repos, joined on(path, line, col, kind, occurrence).Dapper +1678:
Person,CommandDefinition) and their typed receiver members (type_fqn,tier1r_receiver);QueryImpl<T>andcache.Deserializer.All 32 retargets are correct. Each one adds the namespace to the target identity; the target location does not change.
Blocker, two correct binds lost under the shipped C# package:
Dapper/SqlMapper.Identity.cs:51:base.GetType(index)→Identity.GetType;Dapper.Rainbow/SqlCompactDatabase.cs:38: inheritedGetParamNames(o)→Database.GetParamNames.Both are inherited-member calls. The shipped package marks the base ref
DIRECT_SUPERTYPE, and the proven-base path then fails to bind. A fix is in progress; the bless waits for it and for a re-measure.C# items done, and the corpus baseline is re-blessed on
integration-1109(eefa9b6f). Nothing is pushed yet.The degraded
csharp_partialstage (codex-partial,c3b85b39):work_estimateproduct (cs-dapper: 9,488,891,035 against a budget of 50,000,000) is replaced by pricing over the actual candidate keys (file/language/FQN and import-key histograms): 2,100,513. The budget is unchanged.stages_skippedand the WARN are deduplicated, and the WARN fires on the degradation transition.The withdrawal (
173fbbbf): running the stage to completion exposed 163 correct dapper binds withdrawn.inherited_members.rsthen withheld project-wide proof and replaced earlier base proofs with NULL, andmember_lookup.rssubstituted that NULL for the base ref's existing target. That reached BenchmarkBase, TestBase, the factories andIdentity.GetTypethrough their base chains.The direct-base proof (codex-base,
9e410c1c): arity and the inherited nested scope now restorebase.GetType(index)and the inheritedGetParamNames/TableName.Bless:
baseline.jsoncites this account.Next: the single full gate run on the integration tree, including every corpus suite in ci.yml and the nightly jobs, then CI.
Status (local integration branch
integration-1109@60368c0d, not pushed):namespace_typeprovenance replacestype_fqnon unqualified refs, with an arity check. A failed linearization now returnsSearch::Refused. The COALESCE fallback that bypassed base proof is removed (member_lookup.rs,inherited_members.rs), and the alias veto is shared. Package readiness is 28/28 and the bind diff is zero.60368c0d, each with its reason: the stage, cost, tier-3, host-package-lifecycle and ruby_package_cost records, plus the agent bench, where cs-dappercorrect_via_fallbackwent 25→15. The whole bench move iswho_calls.SetupCommand, whose 10 callers now resolve; recall is unchanged.baseline.jsonmoved only in the audited bind-account re-bless,eefa9b6f.60368c0d, on an idle machine: all 44 legs rc=0. That includes corpus, all package legs, tier3, agent_bench, plugin_path_cost and mixed_load. precision_gate is 7/7 with phantoms=0.Released in v0.41.48 (source PR #564, version PR #565). The C# bind account and the audited baseline re-bless are in this release; the corpus movement is listed in the release notes.
🤖 Generated with Claude Code
Merged into #540.
Shipped identity is graded by shipped.rs::gate_packages_match_checkout_records; resolver_cost_model.rs grades actual-key pricing.
Withdrawal/base fixes and the audited baseline shipped; evidence is in #540 Done.
Remaining: Conditional imports (branch-union facts and exact z2/mutation acceptance).