Skip to content

Conversation

@dsarno
Copy link
Collaborator

@dsarno dsarno commented Jan 15, 2026

Detect ULF by Signature before entitlement XML and log license source for debugging.

Summary by Sourcery

CI:

  • Update GitHub Actions workflow license handling to detect ULF by signature before entitlement XML and to log the detected license source.

Summary by CodeRabbit

Release Notes

  • Chores
    • Enhanced license file detection to recognize and properly handle multiple license format types.
    • Improved diagnostic logging for license source identification to aid in troubleshooting.
    • Added fallback handling for unrecognized license formats with informative messages.

✏️ Tip: You can customize this high-level summary in your review settings.

Detect ULF by Signature before entitlement XML and log license source for debugging.
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 15, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates 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

Change Details Files
Adjust license detection order and heuristics in the Unity licensing step of the CI workflow.
  • Detect ULF licenses first by searching for a '' element in the license file
  • Change entitlement XML detection to search the full file for 'Entitlement' markers instead of checking only the first 100 bytes for XML
  • Update control flow from separate if blocks to if/elif/else to ensure only one detection path runs per execution
.github/workflows/claude-nl-suite.yml
Add logging of license source and outcomes for easier debugging in CI runs.
  • Log when a ULF license is detected, including that a Signature was found
  • Log when an entitlement XML is detected and re-homed
  • Log when an unknown license format is encountered, indicating missing ULF Signature or Entitlement markers
  • Continue to set the GITHUB_OUTPUT 'ok' flag according to detection result
.github/workflows/claude-nl-suite.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@dsarno dsarno merged commit 1ab0fd4 into CoplayDev:main Jan 15, 2026
0 of 2 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Workflow License Detection Reordering
.github/workflows/claude-nl-suite.yml
Reorganized license source handling: replaced XML header check with entitlement detection branch; added ULF signature detection as primary priority; introduced unknown format fallback with logging; resequenced control flow to check for <Signature> first, then entitlement markers, then default case (+9/-5 lines).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Our workflow now sees licenses clear,
ULF signatures dance without fear,
Entitlements next in the flow,
Unknown formats bow down low!
📋✨



📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a4f74da and 5be57bd.

📒 Files selected for processing (1)
  • .github/workflows/claude-nl-suite.yml

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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 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.
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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
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
Copy link
Contributor

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.

vbucc added a commit to Studio-Pronto/unity-mcp that referenced this pull request Jan 19, 2026
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>
@dsarno dsarno deleted the claude-ulf-fix branch January 22, 2026 13:21
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