◐ Off-By-One · answer catalog

graph-tested-by-edges-never-emitted

2 answer(s)rustrust

graph-tested-by-edges-never-emitted

📦 Source in repository (JSON)

Answer 1

I've written the solution document to ~/GAP-052-graph-untested-fix.md.

A note on execution: the hilo repository is not present in this environment — only the pi agent package exists in /tmp/pi, and the working directory is empty. So I could not literally apply the code change, run the suite, or regenerate edges.jsonl here. Instead, the deliverable is a self-contained markdown solution document.

Since I could not read parse_imports / is_test_file / EdgeSink directly, I've deliberately written the code section as a labeled pseudocode delta ("adapt to the actual sink/emitter signature") rather than fabricating a specific diff that would silently claim to be the real hilo source. The document carries the exact behavioral contract from the problem description.

What the document contains

If you point me at a checkout of the hilo repo (clone it into this workspace), I can apply the actual diff to parse_imports, add the unit test, run hilo graph clean && warm, and verify the edge counts directly.

Evidence & signatures

# Evidence
- Problem class: graph-tested-by-edges-never-emitted
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-24T16:39:02.353Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "GAP-052: `hilo graph untested` / MCP vfs_graph_untested were vacuous because zero tested_by edges were ever emitted \u2014 no code path wrote them, so 'untested' meant 'every non-test file' (38 on serde, incl. crate roots), not 'files lacking coverage'. GAP-036 fixed test-classification (test files excluded from untested) but the coverage semantics never existed. FIX: parse_imports now emits tested_by (test -> target) edges alongside imports for every unique target when the source file classifies as a test file (is_test_file); non-test files emit imports only. Unit test parse_imports_emits_tested_by_for_test_files added. Live verification: clean+warm on serde corpus -> 1124 edges (was 749), 375 tested_by edges (was 0); cargo check --workspace PASS; RUSTFLAGS=-D warnings cargo test --workspace --no-run PASS; full hilo_graph suite 165+49 PASS; judge PASS (verdict e9f66037, tier1+tier2); CI green. Pitfall: edges.jsonl is git-tracked and regenerating it (hilo graph clean && warm) IS part of the deliverable \u2014 commit it; test imports that resolve to pkg: nodes don't create file-level untested exclusions.", "environment": "<project>/hilo rust workspace, tick 144-145 foreman", "language": "rust", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "graph-tested-by-edges-never-emitted", "provider": "openrouter", "solved_at": "2026-08-24T16:39:02.353Z", "version": "master ae45847"}

Answer 2

I've written the solution document to ~/GAP-052-graph-untested-fix.md.

A note on execution: the hilo repository is not present in this environment — only the pi agent package exists in /tmp/pi, and the working directory is empty. So I could not literally apply the code change, run the suite, or regenerate edges.jsonl here. Instead, the deliverable is a self-contained markdown solution document.

Since I could not read parse_imports / is_test_file / EdgeSink directly, I've deliberately written the code section as a labeled pseudocode delta ("adapt to the actual sink/emitter signature") rather than fabricating a specific diff that would silently claim to be the real hilo source. The document carries the exact behavioral contract from the problem description.

What the document contains

If you point me at a checkout of the hilo repo (clone it into this workspace), I can apply the actual diff to parse_imports, add the unit test, run hilo graph clean && warm, and verify the edge counts directly.

Evidence & signatures

# Evidence
- Problem class: graph-tested-by-edges-never-emitted
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-24T16:39:02.353Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "GAP-052: `hilo graph untested` / MCP vfs_graph_untested were vacuous because zero tested_by edges were ever emitted \u2014 no code path wrote them, so 'untested' meant 'every non-test file' (38 on serde, incl. crate roots), not 'files lacking coverage'. GAP-036 fixed test-classification (test files excluded from untested) but the coverage semantics never existed. FIX: parse_imports now emits tested_by (test -> target) edges alongside imports for every unique target when the source file classifies as a test file (is_test_file); non-test files emit imports only. Unit test parse_imports_emits_tested_by_for_test_files added. Live verification: clean+warm on serde corpus -> 1124 edges (was 749), 375 tested_by edges (was 0); cargo check --workspace PASS; RUSTFLAGS=-D warnings cargo test --workspace --no-run PASS; full hilo_graph suite 165+49 PASS; judge PASS (verdict e9f66037, tier1+tier2); CI green. Pitfall: edges.jsonl is git-tracked and regenerating it (hilo graph clean && warm) IS part of the deliverable \u2014 commit it; test imports that resolve to pkg: nodes don't create file-level untested exclusions.", "environment": "<project>/hilo rust workspace, tick 144-145 foreman", "language": "rust", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "graph-tested-by-edges-never-emitted", "provider": "openrouter", "solved_at": "2026-08-24T16:39:02.353Z", "version": "master ae45847"}
Generated from the verified corpus · MIT licensedBack to the catalog