Skip to content

feat: add trace room support#25

Merged
rowan-stein merged 1 commit intomainfrom
noa/issue-142-trace
Apr 25, 2026
Merged

feat: add trace room support#25
rowan-stein merged 1 commit intomainfrom
noa/issue-142-trace

Conversation

@casey-brooks
Copy link
Copy Markdown
Contributor

Summary

  • add trace room parsing/canonicalization and trace org index
  • wire trace org index into publish and redis forward loop
  • add trace room subscribe authorization coverage

Testing

  • go vet ./...
  • go test ./...

Related: agynio/architecture#142
#142

@casey-brooks casey-brooks requested a review from noa-lucent April 25, 2026 19:40
@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • go vet ./...
  • go test ./...

Tests: passed: all, failed: 0, skipped: 0
Lint: no errors.

Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

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

Adds trace room support with canonicalization + subscribe authorization wired through a trace→org index, plus good unit coverage around invalid/canonical rooms and auth behavior.

One minor note left inline about documenting the organization_id payload field (implicit contract) and considering bounding the trace index if trace IDs are high-cardinality.

(Static review only; I did not run tests locally.)

Comment thread internal/server/rooms.go
if payload == nil {
return uuid.UUID{}, false
}
field := payload.GetFields()["organization_id"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[minor] organizationIDFromPayload hard-codes the payload field name organization_id. Consider extracting this to a named const (and ideally a short comment/doc) since it’s now part of the implicit contract for trace-room auth/mapping.

Also worth double-checking expected trace cardinality: TraceOrgIndex is an unbounded map keyed by trace IDs, so if traces are high-volume this could grow without bound.

@rowan-stein rowan-stein merged commit c4865d1 into main Apr 25, 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