Skip to content

measure: trace-derived ground truth against testgraph itself (#12) - #67

Merged
inth3shadows merged 3 commits into
mainfrom
measure/testgraph-self-trace
Aug 14, 2026
Merged

measure: trace-derived ground truth against testgraph itself (#12)#67
inth3shadows merged 3 commits into
mainfrom
measure/testgraph-self-trace

Conversation

@inth3shadows

Copy link
Copy Markdown
Owner

Summary

Test plan

  • python3 -m unittest discover -s tests -q — 251 passed
  • harness/trace.py + harness/ground_truth.py run end to end against this repo, output captured in Update 7

honeyslate's Postgres is still unreachable (port :55433 closed, no Docker
under WSL), so this runs the cheaper target Update 4 proposed: testgraph's
own 251-test stdlib suite against its own registry from #59. pytest runs the
existing unittest suite unmodified.

New harness/journey_tests_testgraph.json maps each tests/test_*.py file to a
journey, checked against which module each file exercises UNMOCKED (test_hook
patches select/registry on every path; test_core calls select/export for
real).

81 traced symbols land outside the static footprint across all 6 journeys.
62 are the module-alias blind spot Update 5 already declared, now confirmed
by an independent method. 8 are this map's own file-level over-approximation
noise (test_core.py double-mapped to J2 and J4). 11 are new: ledger.append
has zero real inbound static edges despite unaliased call syntax identical to
ledger.path two lines away, while 7 unrelated .append() list calls elsewhere
get bare-name-matched to it instead — which is why the registry's own
min_caller_edges spot-check passed while pointing at the wrong callers
entirely. A commit that breaks ledger.append currently selects neither J1 nor
J5.

Full writeup in TECHNICAL.md Update 7. Not fixed here — the edge-resolution
defect is in CodeGraph's resolver, a distinct root cause from the
already-documented alias gap, and gets its own issue.
Grouped by file totals instead of (journey, symbol) pairs, which hid two
real errors that happened to cancel in the sum: select.py was undercounted
(1 claimed vs 6 actual) and ledger.py was overcounted (11 claimed vs 4
actual, even though the sentence's own enumeration — "append x2, path,
state_dir" — already summed to 4). harness/plugin/tgtrace.py's 2 traced-only
symbols were omitted from every bucket entirely.

Re-derived from the ground_truth --json output grouped by (journey, symbol):
63 alias blind spot (the 62 already known, plus one more instance in
select.py via propose.py's sel._is_test call — same aliased-module pattern,
not previously listed), 12 map-granularity noise (two distinct mechanisms,
not one), 2 the tgtrace.py blind spot the registry's own note already
declares, 4 the ledger.append edge defect (#66). 63+12+2+4=81.
@inth3shadows
inth3shadows merged commit 8eb3e7a into main Aug 14, 2026
1 check passed
@inth3shadows
inth3shadows deleted the measure/testgraph-self-trace branch August 14, 2026 10:45
@inth3shadows
inth3shadows restored the measure/testgraph-self-trace branch September 7, 2026 11:54
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