Port §5 graphDepth metric to Go + Rust
Status: ⚠ lossy · Date: 2026-05-24 · PR: #34 · Commit: 832b7c9
Related posts: sama-v2-go-project-dive · sama-v2-rust-project-ripgrep
⚠ Recovered partially. The /goal text below was reconstructed from conversation summary, not verbatim from the PR body. Original wording may differ from what the user typed.
Recovered opening (from prior-session conversation summary, paraphrased):
Goal: Port the §5 graphDepth metric to Go (package-directory DAG) and Rust (Cargo-workspace crate DAG). Measure dive and ripgrep at the same pinned SHAs as the workingSetFit run — one repo, two measured metrics, same source tree. The dive audit's hand-estimated graphDepth (~5) is the load-bearing claim to test.
What is preserved from the original /goal: only the opening sentence above, recovered from the prior-session conversation summary at the start of this conversation. The full Done when clauses, Constraints (anti-fudge), and Load-bearing files sections did not survive summarization.
What landed: src/b32_graph_depth_polyglot.ts (pure Layer 1, memoised DFS with bounded-cycle handling) + src/c14_go_graph_depth.ts + src/c14_rust_graph_depth.ts (Layer 2 adapters parsing go.mod and Cargo.toml workspaces respectively). The Rust adapter caught and fixed a [[bin]]/[[test]] array-of-tables clobbering bug in the scoped TOML subset parser. Measured: dive @d6c69194 = 12 (estimate ~5 was wildly off; subdirectory hops folded into top-level in the eye-estimate); ripgrep @4519153e = 5 (estimate ~5 confirmed exactly via 10-crate DAG hand-trace). 31 new tests. See PR #34.