Repository navigation
[AAASM-6444] ✨ (init): Add org_id and registration_key to init_assembly - #390
Conversation
The organization is a claim the gateway validates against the operator registration key. Both are forwarded to the native register only when set, so the existing call shape is unchanged, and a native build that cannot carry them fails init instead of registering the agent org-less. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLpw696KjUDUg4QjH83En4
…gister Pin the shared agent-assembly crates to the AAASM-6451 merge (main d4093e89b), which adds AssemblyConfig::org_id and registration_key, and expose both as optional arguments of the PyO3 register call. Absent means an org-less registration, as before. The two changes are one unit: the binding does not compile against the old pin and the new pin does not compile without the binding. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLpw696KjUDUg4QjH83En4
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
An empty key reached the native client as Some(""), which overrides the
AA_REGISTRATION_KEY environment fallback and sends an empty header the gateway
refuses; an empty org_id became an empty claim. Normalise both to None in
init_assembly. Found in independent review of the org identity change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLpw696KjUDUg4QjH83En4
…ailure output The leak test fails when the key is interpolated into the unregistered warning (checked by mutation) and passes without it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLpw696KjUDUg4QjH83En4
|
OWNER-MERGE-REVIEW head=0f6eb5546f66311d7f24652c27800d1cbd9daf1b verdict=PASS blocking=0 reviewer=claude-independent-agent |
Brings in the FUNDING.yml-only change (HORO-2531) so the branch is current. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLpw696KjUDUg4QjH83En4
|
|
OWNER-MERGE-REVIEW head=90f085b348ec0c9dc2b3b65e836e8667e53933ac verdict=PASS blocking=0 reviewer=claude-independent-agent |
|
OWNER-ADMIN-MERGE (same-identity REVIEW_REQUIRED deadlock exception, engineering-workflow exception 2) for head 90f085b. Verified identity: Chisanan232 (author; org AI-agent-assembly role=admin, checked just now). Only remaining blocker: GitHub required approving review, which the author cannot supply for their own PR. At this head: independent adversarial review clean (no Critical/High), OWNER-MERGE-REVIEW PASS comment posted, 23 checks success + 7 skipped, mergeable, 0 unresolved threads, 0 REQUEST_CHANGES. Evidence recorded earlier: J59 20/20, J56 11/11, gateway-restart 12/12, J08 6/6 on an ephemeral wheel (evidence only). Merge by merge commit pinned to this head, on the owner explicit instruction; host Allow once / Deny prompt applies. Merging does not tag or publish anything. |



Description
init_assembly()can now carry an organization claim and the operator key the gateway binds it to. Without them an agent registers org-less, as before; withorg_idplus aregistration_keybound to that org the gateway accepts the claim, and a later process of the same agent (including after a gateway restart) re-binds to its registry identity instead of being refused.org_idandregistration_keyparameters ofinit_assemblyare passed down to the runtime client (commit 697e37b, with unit tests intest/unit/core/test_init_org_identity.py).RuntimeClient.registertakes the same two optional arguments, and the shared agent-assembly crates are pinned to the AAASM-6451 merge (core maind4093e89b), which providesAssemblyConfig::org_id/registration_keyand the gateway-side org binding and restart re-bind. The binding and the pin are one commit because neither compiles without the other.Limits: an identifier alone never authorizes a re-bind; a running process that is already registered when the gateway restarts must itself restart (the SDK does not re-register on
Unauthenticated).Type of Change
Breaking Changes
Related Issues
Testing
Unit tests added / updated
test/unit/core/test_init_org_identity.py: 4 passed.cargo check --all-targetsandcargo clippy --all-targets -- -D warningsinnative/aa-ffi-pythonagainst the new pin: exit 0.ruff checkandruff format --check: clean.mypy agent_assemblyreports only environment errors in the local dev venv (the nativeagent_assembly._coremodule and grpc stubs are not installed there), none in changed files.Real stack, release-candidate build of core
d4093e89bwith a wheel built from this tree (ephemeral build): J59 20/20 and J56 11/11 CANDIDATE_VERIFIED, and akill -9gateway restart check 12/12 (same registry ids after restart, no duplicate, a second holder of the label becomes a separate agent, an org claim without the key is refused).Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01TLpw696KjUDUg4QjH83En4