Repository navigation
feat(architecture): warn when --limit cuts a probed symbol's callees - #42
Merged
Merged
Conversation
--architecture ignored truncation, so edges cut by --limit vanished silently. probeSymbolCallees now reports truncated for the slice it answered with (via readTruncation), probeFileEdges collects those names, and architectureTruncationWarning prints one aggregated stderr line. The node -f trail is never flagged: it has no --limit.
inth3shadows
added a commit
that referenced
this pull request
Sep 27, 2026
The warning added in #42 flagged this repo's own diagram: at the default `--limit 50`, `test/run.js` (60 callees) and `render/callgraph.js` (57) were cut off. - `docs/architecture.svg` regenerated at `--limit 100`: the `test/run.js → render/callgraph.js` edge goes from 29 to 55. - CI's architecture `--check` step and TECHNICAL.md's regenerate command pass the same `--limit 100`, so they stay the same command. Note: `--check` compares nodes and edges, not weight labels (`svgStructure`, by design), so CI passes with or without this and never caught the 29. Local: the new `--check` command exits 0 ("up to date").
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.
Follow-up (c) from #39's review.
--architectureignored truncation, so file edges cut by--limitdisappeared with no warning.probeSymbolCalleesreturnstruncated, read byreadTruncationfrom the slice it actually answered with: the matched definition's owntruncated, else the response's, else the hit-the-limit heuristic (npm). Thenode -ftrail is never flagged: it has no--limit, andparseNodeCallsalready refuses a trail cut at 12.probeFileEdgescollects those names;architectureTruncationWarningprints one aggregated stderr line, likediffTruncationWarning.probeFileEdgesunexported).Real run on this repo at the default
--limit 50: warns for thecallgraph.jsfile node, which has 57 callees (total: 57, truncated: true). Sodocs/architecture.svghas been missing some of that file's edges. This PR does not regenerate it.Local:
node test/run.js180 passed, 0 failed (fork codegraph).