Repository navigation
Guard trajectory readers against fork cycles - #199
Merged
nickjalbert merged 3 commits intoOct 6, 2026
Merged
nickjalbert merged 3 commits into
nickjalbert merged 3 commits into
Conversation
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.
Recursive trajectory readers can recurse indefinitely through cyclic fork or parent metadata. Track the current ancestry in each recursive reader while allowing a shared child through independent branches. Canonicalize paths before comparing ancestry: relative references such as
./trajectory.jsonlor../parent/trajectory.jsonlotherwise produce a different pathname on each recursive visit and bypass the guard.Closes #198.
Validation: a new real
traj cat -r --rawregression checks a relative self-cycle, a two-node relative cycle and shared-child branches, with bounded timeouts. The earlier PR times out on the self-cycle; the completed fix terminates both cycles and preserves the shared child in both branches. Existing recursive-tree (15 checks) and explore-report (7 checks) scripts pass on Ubuntu; Bash syntax andgit diff --checkpass. New regression is picked up by the existing shell CI harness. Current-commit CI is pending. Cyclic explore/list/render paths were inspected but not separately executed; macOS and live identity behavior were not tested locally.