Repository navigation
fix: Let users open conversation history and send messages - #116
Merged
Merged
Conversation
Milo's OpenFGA provider now authorizes subresources on their own, with no fallback to the parent resource's permissions. Conversations serve two subresources and declared neither, so every transcript load and every turn sent through the conversations apiserver failed as "not registered". A read-only production probe confirmed it for conversations/messages.get. Key changes: - declare conversations/messages (get) and conversations/sendmessage (create) on the Conversation ProtectedResource; these are the verbs the stock RequestInfoFactory resolves for the only methods served, GET and POST - grant messages.get in conversation-viewer beside conversations.get, and sendmessage.create in conversation-creator beside conversations.create; the user role inherits both - extract the v1alpha1 storage map into v1alpha1Storage so tests can read it - add iam_test.go: it probes every method on every subresource in the storage map through the assembled server (only 405 counts as unserved), resolves each with the stock RequestInfoFactory, and requires the permission to be declared and granted by every role that grants the base verb; a second test requires every role permission to be declared Without the fix the test fails for both subresources (undeclared, ungranted); with it, both pass. Granting an undeclared permission fails the second test. Hazard: with subresource authorization off, the provider marks any role holding a subresource permission invalid as a whole, so these roles would grant nothing on a Milo running without the flag. Fixes #115
0xmc
marked this pull request as ready for review
October 4, 2026 22:24
scotwells
approved these changes
Oct 4, 2026
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.
Summary
Users cannot open a conversation's history or send a message through the Milo API, because Milo now checks those requests against permissions the assistant never registered.
Each request fails as "not registered" for every user, with no fallback to the conversation's own permissions.
This registers both permissions and grants them alongside the matching conversation permissions, so readers can open history and creators can send. A new test derives the served subresources from the server itself, so a future one fails the build until it is registered and granted.
It must ship before the chat dock is promoted to production.
Fixes #115. Follows #114, milo-os/milo#456, milo-os/openfga-provider#139, datum-cloud/infra#6664 and datum-cloud/infra#6667, and mirrors milo-os/telemetry#193.
Test plan