Submodule checkout recursion (be get mounting a gitlink, then recursing into the mounted sub's own gitlinks) has no depth limit, so a deep / cyclic gitlink chain fans out until it crashes. The fix is DELIBERATELY TRIVIAL: thread ONE depth counter through the checkout sub-mount recursion and stop once it passes a small constant cap. No shared module, no ancestry/visited set, no changes to read views (status/diff/log/patch) — just the checkout. A prior over-engineered attempt (a subguard.js module threaded through 8 files) was DISCARDED as bullshit. Scope: be/verbs/get/get.js ONLY. See DIS-058, GET-039; method Issues.
be/verbs/get/get.js recurseSubMounts descends a mounted sub's gitlinks with NO depth bound; a deep or cyclic 160000 chain recurses until OOM/crash.be self-locator is NOT in scope — GET-039 makes it a symlink, not a sub. Add NO be-name special-case.MAX_SUBMODULE_DEPTH = 8) bounds the checkout sub-mount recursion: past it, stop descending — log a friendly skip, leave the mount point as-is, exit clean, no crash.be-js-sub-cycle).be/ JS only, NO C. Touch ONLY be/verbs/get/get.js (the checkout sub-mount recursion). Do NOT add a new module; do NOT touch submount.js, core/recurse.js, classify.js, or any read view (status/diff/log/patch). KEEP IT MINIMAL — this is a few lines, one counter, one constant.be gets bounded (anchors ≈ cap, not the chain length), no crash. Do not edit existing tests except to add that one case; do not regress be-js-sub-cycle./home/gritzko/journal/be.depth argument to the get-side sub-mount recursion (default 0 at the top-level mount); increment on each descent; when depth >= MAX_SUBMODULE_DEPTH, log + return WITHOUT mounting/recursing the deeper sub.6388c34e ("add submodule nesting limit", 30Jun): MAX_SUBMODULE_DEPTH = 8 (get.js:53), recurseSubMounts(g, rel, m, out, depth) bails past the cap with a friendly warn (get.js:854-881); top-level mount seeds depth 0.be/test/ case greps depth cap/MAX_SUBMODULE): ONE case — a chain deeper than 8 jab gets bounded (anchors ≈ cap), exits clean; sub/cycle (within cap) intact.be/verbs/get/get.js, which GET-039 also edits — small 3-way at land time; keep the change to a few lines to minimise it.subguard.js module threaded through 8 files) and was discarded. The be corner case is GET-039's symlink-as-blob (landed; sub/selfloop guards it).6388c34e (get.js only, exactly as re-scoped); the deep-chain repro test is the only remainder.