Skip to content

ci: probe whether a license return succeeds in the same container - #275

Merged
frostebite merged 3 commits into
mainfrom
ci/diagnose-single-container-return
Sep 14, 2026
Merged

frostebite merged 3 commits into
mainfrom
ci/diagnose-single-container-return

Conversation

@frostebite

Copy link
Copy Markdown
Member

Follow-up to #274, which fixed the retry-burn and the misleading warning but did not establish why a user's return fails in a normal build.

The capability matrix runs activate and return-license as separate commands — separate containers, separate machine identities — so its returns always fail on a binding mismatch. A normal build sources both in one container via runsteps.sh, so it should not. That has never been measured.

This adds a serial activate-then-return pair inside a single container, printing Machine Id either side. That's the whole question:

  • ids differ within one container → the binding mismatch is inherent and returns can't work in CI at all
  • ids match and the return succeeds → the user's failure has a different cause, and fix: stop retrying license returns that can never succeed #274 only addressed the symptom
  • ids match and the return still fails → the container split was never the explanation

Skipped cleanly when no serial is configured.

🤖 Generated with Claude Code

frostebite and others added 2 commits September 14, 2026 22:24
Reported in Discord: "we spend an extra 2-3m at the end of the test
action trying to return a license, which will fail every time."

Reproduced in this repo's own licensing capability matrix, which had been
emitting the identical warning unnoticed on every serial cell:

  [Licensing::Module] Error: Access token is unavailable; failed to update
  [Licensing::Module] Error: Failed to return entitlement license
  [Licensing::Client] An error occurred attempting to return the ULF
    license (status code: 1400, message: "Machine bindings don't match")
  License return failed with a known-transient licensing error (attempt 1/4)

A machine-binding mismatch on return is permanent for the same reason it
is on activation: the entitlement is bound to the machine that activated
it. It was being retried because the same failing return also emits
"Access token is unavailable", which IS in the transient list - so the
real reason was masked and all four attempts burned, 20+40+80s of backoff
before warning anyway. Exactly the shape of the activation-side bug fixed
in #264.

Two changes, both applied to all four return scripts:

- A permanent-failure guard breaks out immediately, so the step ends in
  seconds instead of ~2.5 minutes.
- The warning names the actual cause. "This seat may still be held by
  Unity's license server" sends people hunting a leak on their Unity
  account, when in fact the licence was bound to a machine that no longer
  exists. It now says so, and says no action is needed.

Confirmed by machine id, in one matrix job: activation reported
I+Yk5/H/JFuzwWwFQp3B6Yo46d4= and all four return attempts reported
BvJyyTlQnbSn3y+BZ6WqttLX5wM=. That particular split is specific to the
matrix, which runs `activate` and `return-license` as separate commands
and therefore separate containers; a normal build sources both in one
container via runsteps.sh. The retry-burn and the misleading warning are
not specific to it.

Three tests, all verified to fail with the guard disabled. The editor
stub now honours STUB_OUTPUT, since the return paths drive the editor
rather than the licensing client, and this case defines its own stub
because earlier cases redefine the shared one.

Suites: 67 bash, 34 PowerShell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The capability matrix runs `activate` and `return-license` as separate
commands, so they get separate containers with separate machine
identities, and the return always fails on a binding mismatch. A normal
build sources both in one container via runsteps.sh, so it should not -
but that was never measured, and a user reports the return failing every
time in a normal build.

Adds a serial activate-then-return pair inside a single container, and
prints Machine Id either side, because that is the whole question: if the
id is stable within the container and the return still fails, the
container split is not the explanation and the real cause is still
unfound.

Skipped cleanly when no serial is configured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 464760df-de58-4b90-9958-113177c34af9

📥 Commits

Reviewing files that changed from the base of the PR and between b971614 and 425eff1.

⛔ Files ignored due to path filters (5)
  • dist/platforms/mac/steps/return_license.sh is excluded by !**/dist/**
  • dist/platforms/ubuntu/steps/return_license.sh is excluded by !**/dist/**
  • dist/platforms/windows/return_license.ps1 is excluded by !**/dist/**
  • dist/platforms/windows/steps/return_license.ps1 is excluded by !**/dist/**
  • src/generated/embedded-assets.ts is excluded by !**/generated/**
📒 Files selected for processing (2)
  • .github/workflows/licensing-diagnostic.yml
  • scripts/test-licensing-steps.sh

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.

The new warning told users "Node-locked serial activations are released
by Unity on their own; no action is needed." That was never verified.
Unity Pro serials have a finite number of activations, so if they are not
released, reassuring someone that nothing is needed could let them
exhaust the limit and then be surprised by it.

Replaced with what is actually known: the return failed because of a
machine binding, that is expected when activation and return happen on
different machines, and if activations later run out they can be released
at id.unity.com.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@frostebite
frostebite merged commit c0272dd into main Sep 14, 2026
15 of 16 checks passed
@frostebite
frostebite deleted the ci/diagnose-single-container-return branch September 14, 2026 21:57
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