Skip to content

Groups-based Action Decorator System - #430

Open
azht wants to merge 8 commits into
academy-agents:mainfrom
azht:azht-action-decorators
Open

Groups-based Action Decorator System#430
azht wants to merge 8 commits into
academy-agents:mainfrom
azht:azht-action-decorators

Conversation

@azht

@azht azht commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Adds groups-based access control for shared agents. Agents can declare which Globus groups may invoke each action via a sharing param on the @action decorator with union semantics across groups. Currently sharing=[] makes an action owner-only, and ommiting it falls back to the union of all groups declared on that agent's actions.

Decisions

  • The sender of a message doesn't self report it's group memberships the exchange checks those and stamps messages with relevant group memberships.
  • We use the union of all groups with any ability to call any action on an agent for cases where the sharing param is undeclared on an action, and sharing=[] makes it owner only.
  • ShutdownRequest is owner-only; CancelRequest is allowed for the owner or the original requester. Agents that declare no sharing anywhere keep the existing open behavior, so this is backwards compatible for agents not using the feature.
  • New error code RequestForbiddenError. The header gains a groups field that's default empty so existing messages still validate.

Related Issues

Changes

  • Breaking (backwards incompatible changes to public interfaces) ✅ 2026-07-15
    • Some non-sharing things affected: terminate now requires mailbox ownership, shutdown is owner-only when owner is recorded.
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change or feature addition) ✅ 2026-07-15
  • Refactor (internal code or design clean up)
  • Documentation (no changes to the code)
  • Test (changes or additions to testing) ✅ 2026-07-15
  • Build (change to CI workflows or build processes)
  • Package (changes to package metadata or dependency versions) ✅ 2026-07-15

Testing

Added test covering: per-action sharing authorization (allow/deny/owner), explicit empty sharing (owner-only), fallback to the agent group union for undecorated (agree with Alok, this preserves past behavior), owner-only shutdown, response delivery to unshared mailboxes, ownership checks in create/termiante/put, owner propagation through agent registration (maybe a few more?). All tests in the touched files pass locally (156 passed).

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Relevant tags are added based on the types of changes.
  • Code changes pass pre-commit (e.g., ruff, mypy, etc.). ✅ 2026-07-15
  • Tests have been added to show the fix is effective or that the new feature works. ✅ 2026-07-15
  • New and existing unit tests pass locally with the changes. ✅ 2026-07-15
  • Docs have been updated and reviewed if relevant.

@azht azht changed the title Azht action decorators action decorator system Jul 15, 2026
@azht azht changed the title action decorator system Groups-based Action Decorator System Jul 15, 2026
@AK2000 AK2000 added the enhancement New features or improvements to existing functionality label Jul 15, 2026
azht added 4 commits July 16, 2026 16:34
Cancel-of-cancel bypassed authorization because the cancel handler
registered its response-send task in _action_tasks without recording a
requester. Split fire-and-forget response sends into _response_tasks so
they are never cancellable, and drain them on shutdown without
cancelling, so a denied requester always learns their request was
refused.

Also add the ownerless-registration bypass to _authorized_for_cancel to
match its sibling helpers, and guard the empty client_groups header in
get_client_info so a group-less client parses to set() rather than {''}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New features or improvements to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fine Grained Permissions

2 participants