Skip to content

feat: authorize instance inbox rooms - #34

Merged
rowan-stein merged 2 commits into
mainfrom
noa/issue-161-notifications-instance-inbox
Jul 16, 2026
Merged

feat: authorize instance inbox rooms#34
rowan-stein merged 2 commits into
mainfrom
noa/issue-161-notifications-instance-inbox

Conversation

@casey-brooks

Copy link
Copy Markdown
Contributor

Summary

  • Add instance_inbox:{id} and instance_inbox:me room parsing/canonicalization.
  • Enforce instance inbox subscription authorization: caller identity id must match the room id and x-identity-type must be agent_instance.
  • Keep thread_participant:{id} authorization unchanged.
  • Add tests covering self sentinel resolution, explicit concrete room subscription, dedupe, wrong identity id denial, and user/app/non-agent-instance denial.

Validation

  • PATH=/root/go/bin:$PATH buf generate buf.build/agynio/api --template ./buf.gen.yaml — passed.
  • go test -json ./... — passed: 48 passed, 0 failed, 0 skipped.
  • go vet ./... — passed with no errors.
  • go build ./... — passed.
  • git diff --check — passed with no whitespace errors.

E2E

  • devspace run test:e2e could not run because DevSpace 6 rejects the command name in this repo config: commands.test:e2e has to match the following regex: ^(([a-z0-9][a-z0-9\-]*[a-z0-9])|([a-z0-9]))$.
  • devspace run-pipeline test:e2e could not run because there is no valid local kubeconfig in this environment: please make sure you have an existing valid kube config.

#161

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Validation summary:

  • PATH=/root/go/bin:$PATH buf generate buf.build/agynio/api --template ./buf.gen.yaml — passed.
  • go test -json ./... — passed: 48 passed, 0 failed, 0 skipped.
  • go vet ./... — passed with no errors.
  • go build ./... — passed.
  • git diff --check — passed with no whitespace errors.

E2E:

  • devspace run test:e2e could not run because DevSpace 6 rejects the command name in this repo config: commands.test:e2e has to match the following regex: ^(([a-z0-9][a-z0-9\-]*[a-z0-9])|([a-z0-9]))$.
  • devspace run-pipeline test:e2e could not run because there is no valid local kubeconfig in this environment: please make sure you have an existing valid kube config.

#161

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the instance inbox subscription support. The implementation matches the architecture intent for canonicalizing instance_inbox:me, enforcing matching agent_instance callers, and preserving existing thread_participant behavior.

I left one minor test-structure comment. I could not run the suite locally because generated API files are absent and buf/gcc are not installed in this environment.

Comment thread internal/server/server_test.go
@casey-brooks

Copy link
Copy Markdown
Contributor Author

Addressed Noa's minor test-structure comment by adding t.Parallel() inside the generated instance inbox authorization subtests. I also changed the test server cleanup in that parent test to t.Cleanup(cleanup) so cleanup runs after parallel subtests complete.

Validation:

  • go test -json ./... — passed: 48 passed, 0 failed, 0 skipped.
  • go vet ./... — passed with no errors.
  • go build ./... — passed.
  • git diff --check — passed with no whitespace errors.

#161

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the update. The requested test-structure change is applied, the previous thread is resolved, and CI is green. The instance inbox subscription implementation remains aligned with the architecture requirements.

@rowan-stein
rowan-stein merged commit 883e58a into main Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants