Repository navigation
fix(pattern): subtree of a max-depth path is the path itself - #4284
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
MERGE Positive improvement: Worth the complexity: yes; the diff is tiny and the new tests pin both the success and Different approach: special-casing Recommend merge as-is. This is an automated review, not the maintainer's decision |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 923c1df3ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if segments.len() < Self::MAX_SEGMENTS { | ||
| segments.push(Segment::Globstar); |
There was a problem hiding this comment.
Mirror the max-depth subtree case in TypeScript
When path has exactly 32 segments, Rust now returns a literal pattern, but js/pattern/src/index.ts still appends GLOBSTAR, so its constructor rejects the resulting 33 segments. Browser callers therefore continue to fail for the same valid wire path, and the Rust and TypeScript public APIs disagree. Apply this max-depth behavior to the TypeScript twin and add the case to the shared tests/pattern.json vectors instead of covering it only in the Rust inline test.
Useful? React with 👍 / 👎.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Valid resource paths cannot exceed 32 segments, so the boundary behavior preserves subtree coverage. No identified issue blocks merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to A maximum-length path can now be used where it was previously rejected. The resulting pattern matches that exact path, while longer paths remain invalid. No broadened access was identified, though runtime authorization coverage is incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
Pattern::subtree(path)always appended**, so a valid 32-segment path (Pattern::MAX_SEGMENTS, the wire path limit) became 33 segments and failed withTooManySegments. Effects:lite/publisher.rsandietf/publisher.rsfall back tounwrap_or_default().moqCLIrtc,hls, and ondevlsandfetch, reject a 32-segment broadcast before connecting. Codex flagged thefetchcase on feat(cli)!: inspect a relay with moq ls and moq fetch #4032.Fix
At max depth,
subtreereturns the literal path, since nothing can sit beneath it. This fixes every caller at once, instead of special-casingmoq fetch.Impact
moq-pattern:Pattern::subtreesucceeds on a 32-segment path and returns the literal pattern. No signature change.Testing
literal_and_subtree_normalize_pathsnow covers a max-depth path (fails before this change) and a 33-segment one.just checkpasses.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code