Skip to content

#3313 step 1: thin-wrapper detection heuristic with a measured precision bar (debug_prints, panics_and_aborts) #3315

Closed

Description

@squid-protocol

Step 1 of epic #3313 (project-local idiom wrappers): the detection heuristic plus a measured precision bar, starting with debug_prints and panics_and_aborts, where the step-0 census found the material gap. Measurement only: no engine, rule or fixture change.

Deliverables

  • tests/tools/wrapper_probe.py, a probe built on the engine's own splice().
    • Candidates: non-synthetic functions of ≤N LOC whose body hits the rule. A hit that is the function's own name doesn't count. N is swept over 3/5/8/12.
    • Call credit through the engine's calls_out_to: resolved same-file first, then a unique repo-wide definition, otherwise unattributed. Qualified x.f(/x::f( calls never count.
    • Output: per repo × rule, the literal hits, wrapped call sites, and candidates with their bodies.
  • tests/tools/wrapper_labels.json: hand-read verdicts (wrapper / not_wrapper / test_helper, each with a reason). It covers every material census case plus a seeded random sample across languages.
  • Tests: probe classification and resolution on fixtures (the WRF shape, the go/core name collision, a qualified call), and label ↔ candidate-key sync.

Decisions this settles, from data

  • The LOC cutoff (precision per N).
  • Whether test-suite helpers count.
  • The resolution rule's false-attribution rate: does it fix go/core's lock case?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineModifications to the central physics and parsing engineenhancementNew feature, sensor, or structural signature

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions