SDK register() skips SaaS routing headers #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding from communication-parity audit (2026-05-21). RemoteAgentClient._auth_headers supports Authorization, X-Molecule-Org-Id, and Origin, but register() posts to /registry/register without headers. Other client calls use _auth_headers(), and SaaS tenant edges rely on Origin and sometimes X-Molecule-Org-Id to avoid WAF/Next.js rewrite behavior. Fix: include the non-token routing headers on register, and include Authorization when a cached token exists so re-register follows the same auth surface as heartbeat. Add tests for org_id/origin on register and no regression for anonymous first-register when no token exists.
Resolved by merged PR #28: #28\n\nEvidence:\n- SDK CI matrix 3.11/3.12/3.13 successful before merge\n- register() now sends the SaaS routing/auth headers to /registry/register\n- local full suite before merge: 310 passed, 1 skipped