-
Notifications
You must be signed in to change notification settings - Fork 693
Fix ULF detection in Claude licensing #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Detect ULF by Signature before entitlement XML and log license source for debugging.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the Unity license handling step in the GitHub Actions workflow to prioritize detecting ULF licenses by their Signature, adjust the heuristic for entitlement XML detection, and add logging of the detected license source for debugging. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe license detection logic in a CI/CD workflow was reorganized to prioritize ULF signature detection, followed by entitlement marker detection, with an unknown format fallback. Control flow was reordered, replacing an XML header check with an entitlement detection branch, and informational logging was added for each detection path. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✏️ Tip: You can disable this entire section by setting 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- In the entitlement detection branch,
grep -qi 'Entitlement|entitlement' "$f"uses basic regex so|is treated literally and will only match the exact stringEntitlement|entitlement; if you want a case-insensitive match on 'entitlement', simplify togrep -qi 'entitlement' "$f"or enable extended regex withgrep -E.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the entitlement detection branch, `grep -qi 'Entitlement|entitlement' "$f"` uses basic regex so `|` is treated literally and will only match the exact string `Entitlement|entitlement`; if you want a case-insensitive match on 'entitlement', simplify to `grep -qi 'entitlement' "$f"` or enable extended regex with `grep -E`.
## Individual Comments
### Comment 1
<location> `.github/workflows/claude-nl-suite.yml:107` </location>
<code_context>
+ echo "ok=true" >> "$GITHUB_OUTPUT"
# If someone pasted an entitlement XML into UNITY_LICENSE by mistake, re-home it:
- if head -c 100 "$f" | grep -qi '<\?xml'; then
+ elif grep -qi 'Entitlement|entitlement' "$f"; then
mkdir -p "$RUNNER_TEMP/unity-config/Unity/licenses"
mv "$f" "$RUNNER_TEMP/unity-config/Unity/licenses/UnityEntitlementLicense.xml"
</code_context>
<issue_to_address>
**issue (bug_risk):** The grep pattern `'Entitlement|entitlement'` is treated literally and won’t match either word as intended.
In basic `grep` (without `-E`), `|` is treated literally, so this condition only matches `Entitlement|entitlement` and will miss actual entitlement XMLs. If you want case-insensitive matching on the word, use `grep -qi 'entitlement' "$f"` (relying on `-i`), or enable extended regex with `-E` and adjust the pattern accordingly.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| echo "ok=true" >> "$GITHUB_OUTPUT" | ||
| # If someone pasted an entitlement XML into UNITY_LICENSE by mistake, re-home it: | ||
| if head -c 100 "$f" | grep -qi '<\?xml'; then | ||
| elif grep -qi 'Entitlement|entitlement' "$f"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): The grep pattern 'Entitlement|entitlement' is treated literally and won’t match either word as intended.
In basic grep (without -E), | is treated literally, so this condition only matches Entitlement|entitlement and will miss actual entitlement XMLs. If you want case-insensitive matching on the word, use grep -qi 'entitlement' "$f" (relying on -i), or enable extended regex with -E and adjust the pattern accordingly.
Upstream changes (v9.0.7 → v9.0.8): - fix: UIDocument serialization to prevent infinite loops (CoplayDev#586) - fix: Filter isCompiling false positives in Play mode (CoplayDev#582) - fix: search inactive objects when setActive=true (CoplayDev#581) - fix: Add Prefab Stage support for GameObject lookup (CoplayDev#573) - fix: Prevent infinite compilation loop in Unity 6 (CoplayDev#559) - fix: parse and validate read_console types (CoplayDev#565) - fix: Local HTTP server UI check (CoplayDev#556) - fix: Claude Code HTTP Remote UV path override detection - fix: ULF detection in Claude licensing (CoplayDev#569) - chore: Replace asmdef GUID references (CoplayDev#564) - docs: Streamline README for faster onboarding (CoplayDev#583) - Many new client configurators (VSCode, Cursor, Windsurf, etc.) Fork enhancements preserved: - "find" instruction handler in UnityTypeConverters.cs - MarkSceneOrPrefabDirty() helper for proper Prefab Stage support - IsInPrefabStage() and GetPrefabStageRoot() helpers - #main URL reference (no version tags) - TestProjects excluded Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Detect ULF by Signature before entitlement XML and log license source for debugging.
Summary by Sourcery
CI:
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.