Repository navigation
feat: read krater roles from the ganymede patch roles in weave's patches claim - #66
Merged
Merged
Conversation
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
Krater now reads its roles from Weave's
patchesclaim as well as from its old app roles. Weave moves Krater's app rolesreviewerandadmininto the Ganymede patch roleskrater:reviewerandkrater:admin(patchworklabsorg/weave#288). During the move, Krater gives each person the union of both, so nobody gains or loses access.patchesscope too.krater.weave.rolesmapspatches.ganymedekeyskrater:reviewertoganymede:reviewerandkrater:admintoganymede:admin. Other patches and other keys (lead,quilt:viewer, a barereviewer) give nothing. A malformed value gives no patch roles, and the app roles still count.authorize, Slack clicks) read the samepatchesfield.?role=<app key>and the new?patch=ganymede&patch_role=<key>filter, deduplicated bysub. Slack reviewer invites and admin box access include patch-only holders. Until Weave is set up, a 403 or 404 from the patch filter falls back to the app-role list with one warning. Other failures fail closed, as before.KRATER_WEAVE_PATCH(ganymede),KRATER_WEAVE_PATCH_ROLE_REVIEWER(krater:reviewer),KRATER_WEAVE_PATCH_ROLE_ADMIN(krater:admin).Deploy order
The full order is in patchworklabsorg/weave#288. For Krater:
ganymedepatch and addspatchesto its scopes.bin/rails patches:import_app_roles APP=<krater> PATCH=ganymede PREFIX=krater ACTOR=<superadmin email>, dry, then withAPPLY=1.invalid_scope.Follow-up: a later PR removes the app roles, the fallback groups and the
?role=call. While the union holds, removing someone's access needs both the app role and the patch role removed.Checks
uv run pytest: 1808 passed, 1 skipped, 10 deselected (the live Weave tests, which need a real Weave).uv run ruff check .anduv run ruff format --check .: clean.Related: patchworklabsorg/weave#288, patchworklabsorg/quilt#63, patchworklabsorg/internal-docs#11, patchworklabsorg/infra#98.