Skip to content

Expose --depth's node-discovery cap as --max-depth-nodes - #22

Merged
inth3shadows merged 3 commits into
masterfrom
claude-status
Aug 5, 2026
Merged

Expose --depth's node-discovery cap as --max-depth-nodes#22
inth3shadows merged 3 commits into
masterfrom
claude-status

Conversation

@inth3shadows

Copy link
Copy Markdown
Owner

Summary

  • --depth's 200-node traversal safety cap was a fixed constant the code comment flagged as "not exposed as a flag (yet)" — now --max-depth-nodes <n> (default 200), mirroring the existing --max-symbols pattern (same validation, rejected alongside --architecture).
  • Default behavior is unchanged; this is additive only.
  • Docs updated: README, TECHNICAL.md (pipeline diagram, config table, Known Limitations — closed the gap), USAGE.md troubleshooting.

Test plan

  • npm test — 90/92 pass. The 2 failures (--architecture end-to-end + embed round-trip) are pre-existing and unrelated — reproduced identically on unmodified master via git stash, likely a local codegraph 1.5.0 vs. CI-pinned 1.4.1 version drift. Tracked separately.
  • 3 new tests: bad-value rejection, --architecture combo rejection, and a live CLI trace against this repo's own codegraph index proving a lowered cap actually fires depthBudgetWarning.
  • Manual live run through all four branches (default unchanged, lowered cap warns, bad value rejected, --architecture combo rejected).

The 200-node safety cap on --depth traversal was a fixed constant the
code explicitly flagged as "not exposed as a flag (yet)". Mirrors the
existing --max-symbols pattern (same validation, same rejection when
combined with --architecture) so a well-connected symbol that
legitimately needs a higher cap to finish at --depth 3+ can get one.
Default behavior is unchanged.
The cap stopped being internal-only in the previous commit --max-depth-nodes made it externally configurable, but the stderr message, USAGE.md, and TECHNICAL.md still called it "internal", undercutting the flag that answers it. Points users at --max-depth-nodes instead.
Two issues from code review:

- The --architecture rejection now only fires when the explicit value
  differs from the default (200), matching --depth's own precedent
  (values.depth !== '1'). Previously any explicit --max-depth-nodes
  was rejected outright, even one matching the default, disagreeing
  with --depth's "only reject if it would actually change anything"
  behavior for what should be an identical contract.
- TECHNICAL.md's config row claimed "same rationale as --max-symbols"
  in a way that implied enforcement parity that doesn't exist:
  --max-symbols has no guard at all outside --architecture (silently
  ignored), while --max-depth-nodes hard-errors on a real mismatch
  inside --architecture. Reworded to credit --max-symbols only for
  the "why expose this as a flag" reasoning, and --depth for the
  actual --architecture-rejection precedent.
@inth3shadows
inth3shadows merged commit cbde7ce into master Aug 5, 2026
5 checks passed
@inth3shadows
inth3shadows deleted the claude-status branch August 5, 2026 18:09
@inth3shadows
inth3shadows restored the claude-status branch August 5, 2026 20:51
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