Repository navigation
[AAASM-6444] ✨ (init): Add org_id and registration_key to init_assembly - #390
Open
Chisanan232 wants to merge 4 commits into
Open
Chisanan232 wants to merge 4 commits into
Chisanan232 wants to merge 4 commits into
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
|
Contributor
Author
|
OWNER-MERGE-REVIEW head=0f6eb5546f66311d7f24652c27800d1cbd9daf1b verdict=PASS blocking=0 reviewer=claude-independent-agent |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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