Skip to content

fix: improve scoped call resolution and quality reporting - #3

Merged
NianJiuZst merged 2 commits into
mainfrom
codex/resolution-quality-v4
Nov 1, 2026
Merged

NianJiuZst merged 2 commits into
mainfrom
codex/resolution-quality-v4

Conversation

@NianJiuZst

@NianJiuZst NianJiuZst commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

External constructor results could bind to unrelated project methods, same-named Rust types and nested functions could share targets, and Rust call chains and Python factories could lose receiver evidence. This follows merged #2 with focused runtime fixes and separates incomplete-oracle coverage from target agreement.

Changes

  • Bind JS/Python/Rust nested functions to their actual declarations. Constrain Rust member ownership by module or a resolved type import, preserving legal cross-module impls.
  • Stop explicit external initializer roots from falling through to unrelated unique project members.
  • Recover bounded Rust call paths at the original sites; preserve generic arguments and lifetime-qualified returns; consistently use raw return facts for chains, standard containers and ?.
  • Model standard Box/Rc/Arc imports, aliases and bounded constructors without linking pointer operations such as clone to inner-type methods. Keep pointer fields conservative where the single-node field cache cannot preserve wrappers.
  • Infer Python uniform explicit factory returns conservatively, normalize supported return annotations, and include return expressions in incremental invalidation.
  • Fix supplementary Rust parsing's independent 100ms cutoff: honor the configured deadline and expose exhaustion as a timed-out file. The old cutoff produced differing facts for identical Tokio sources during verification.
  • Bump engine rules to 4; format stays 2. Engine-3 indexes rebuild on sync. Update the existing facts assertion to require retained generic arguments.

Same-corpus results

The four source revisions, indexed file sets, source bytes and upstream d2e0389 are unchanged. The original strict all-edge key and full edge sets remain reported. Shared edges increase by 877 net: 980 additions and 103 removals. Removed shared edges are not all claimed as old false positives; conservative modeling still leaves coverage gaps.

Project Strict shared edges before → after Strict P before → after Strict R before → after
Express 2,063 → 2,062 58.96% → 58.93% 88.39% → 88.35%
Gin 7,678 → 7,678 93.45% → 93.49% 95.11% → 95.11%
Tokio 33,638 → 34,176 87.14% → 87.38% 84.77% → 86.12%
Django 174,016 → 174,356 94.07% → 94.23% 89.65% → 89.83%

The new P* measures exact target agreement only for cgr calls at sites already labeled by upstream. Full upstream call recall is unchanged in definition, and all additional unlabeled edges are counted separately. This is conditional agreement, not semantic precision or a replacement for the original global gate.

Project P* before → after Call recall before → after Additional unlabeled cgr edges after
Express 99.28% → 99.28% 85.70% → 85.70% 1,122
Gin 99.86% → 99.86% 91.46% → 91.46% 4
Tokio 95.64% → 95.61% 64.45% → 67.90% 462
Django 97.42% → 97.80% 77.13% → 77.44% 3,130

Express already scored 99.28% under this definition before these changes; the denominator change is not presented as an algorithmic improvement. Its one lost strict shared edge is a callback reference; shared call count stays unchanged. Non-route node identity remains 100% aligned. The original 97%/95% strict gate remains unmet, and Tokio's conditional P* slightly declines.

Details: report, machine-readable evidence. Runtime commit: 0d48a07caa67791e64dccf015922a877ab3f9fee.

Local validation

  • Locked release build; Rust 1.99 all-target strict Clippy excluding the vendored kernel; CI package-format check — passed.
  • Workspace: 137 passed, 1 existing ignored; random edit settings 6 × 100.
  • 80/80 external focused assertions versus 59/80: positive checks 30/46 → 46/46, negative checks 28/33 → 33/33, plus one route check. These are targeted regressions, not a random semantic-precision estimate.
  • 24 real-repository initial/edit/sync/restore/full-rebuild/strict-structure checks — passed; indexed source bytes restored and independently hashed.
  • 63-file Python return-expression edit re-resolves only two files, selects the new target and matches full rebuild; engine-3 upgrade matches full rebuild.
  • Independent SQLite counts reproduce every strict intersection and every supported/shared call count.
  • Tokio canonical graph matches with 1/2/4 workers; two supplementary parse deadline checks pass; no timeout files in the measured corpora.
  • Existing CLI/MCP smoke — passed.

One-off proof scripts, fixtures, databases and logs stay outside the repository. Both READMEs, vendored kernel code and previous performance numbers are unchanged; this PR makes no new performance claim. Hosted CI is separate from the local evidence above.

GitHub CI run: all nine checks passed for 7ecbf5f469474f00d7fae8a2e7dbe38807452e46, including Linux/macOS/Windows tests and smoke, static musl, lint and kernel reproduction.

@NianJiuZst
NianJiuZst marked this pull request as ready for review November 1, 2026 13:26
@NianJiuZst
NianJiuZst merged commit 890912c into main Nov 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant