measure: trace-derived ground truth against testgraph itself (#12) - #67
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
harness/journey_tests_testgraph.jsonmapstests/test_*.pyfiles tojourneys/testgraph.json's journeys, checked against which module each file exercises unmockedledger.appendhas zero real inbound static edges despite unaliased call syntax, filed separately as CodeGraph: ledger.append has zero real inbound call edges; unrelated list.append() calls false-positive-link to it instead #66TECHNICAL.mdUpdate 7Test plan
python3 -m unittest discover -s tests -q— 251 passedharness/trace.py+harness/ground_truth.pyrun end to end against this repo, output captured in Update 7