fix(licensing): migrate managed service host#17
Conversation
Coding-Dev-Tools
left a comment
There was a problem hiding this comment.
Pre-PR Code Review — Verdict: ✅ APPROVE (pending merge-gate)
Reviewed by Pre-PR Code Analyzer. Scope: in-scope Coding-Dev-Tools repo (excl. hermes/openclaw/openhuman).
Verdict: Code is sound, tested, and mergeable. Formal APPROVE is withheld pending the standing merge-gate (single cowork-bot author, PR age < 6h, < 3 distinct reviewers) — posted as a comment per the self-approval embargo. No code block.
What the diff does:
- Migrates the managed-service license host from the retired Railway URL (
engraphis-production.up.railway.app) tohttps://team.engraphis.com. - Adds
RETIRED_RELAY_URLS+resolve_license_server_url()inconfig.py— a single canonical resolver with correct precedence (ENGRAPHIS_CLOUD_URLoverride → signed key URL → relay URL). Retired URLs are silently remapped; arbitrary signed URLs stay authoritative (no auth-bypass surface). - Adds
_JSON_HEADERSwith an explicitEngraphis/1.0User-Agent toregister/send_team_invite/request_trial_key— fixes Cloudflare error 1010 rejecting Python's defaulturllibsignature. - Updates docs (
.env.example,README,CHANGELOG).
Quality: 4 new tests across test_cloud_license.py and test_config.py cover the Cloudflare header and the retired-URL migration. No secrets, no injection, no logic bug, no prior-fix regression.
Required before formal APPROVE: satisfy the merge-gate (≥3 reviewers / age ≥6h) — no code changes needed.
CI note: the only check in the rollup is ensure-pr (a fleet PR-opener, token-scope check) — repo unit tests are not surfaced as required checks here; recommend confirming pytest tests/ is green in the run before merging.
a1a2efb to
80b3e50
Compare
Council Gate Verdict — REWORKRisk level: high | Agreement: 0.111 | Council session: Per-model scores (rubric: correctness / safety / style / tests / complexity)
Engraphis referenceCouncil verdict persisted as Rationale reconciliation (REWORK under degraded quorum)The original council pass flagged REWORK citing "no tests added" and "incomplete licensing.py diff". On inspection of the actual diff, both claims are false: this PR adds 6 targeted tests ( One concern is valid but non-blocking:
|
Summary
https://team.engraphis.comurllibclients with error 1010Root cause
Existing Team keys contain
https://engraphis-production.up.railway.appin their signed payload. After that hostname was retired, clients continued sending lease registrations there and fell back to the free plan. Requests to the replacement Cloudflare hostname were also vulnerable to Cloudflare error 1010 because the license client used Python's defaulturllibsignature.Impact
Existing keys retain their original signature but migrate the one known retired vendor URL, including explicit legacy cloud/relay environment overrides. New keys, license checks, trial requests, team invites, and managed sync use
team.engraphis.comby default. Arbitrary signed custom URLs remain authoritative. A temporary outage no longer pins a configured valid key to the free fallback indefinitely; clients retry automatically and recover without re-entering the key or restarting.Validation
python -m pytest tests/ -q(711 passed, 4 skipped)ruff check .git diff --checkInfrastructure dependency
https://team.engraphis.com/api/healthcurrently returns Cloudflare502 Bad Gateway. The client fix is ready, but production licenses cannot obtain leases until the domain has a healthy origin deployment.