Prototype CLI authorization for Devvit app maintainers#273
Open
CR29-22-2805 wants to merge 2 commits into
Open
Prototype CLI authorization for Devvit app maintainers#273CR29-22-2805 wants to merge 2 commits into
CR29-22-2805 wants to merge 2 commits into
Conversation
a7b5504 to
105788a
Compare
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.
Related to #272
💸 TL;DR
This PR prototypes CLI-side support for an optional maintainer role on Devvit apps.
Devvit currently limits app uploads and publishing to the app owner. That model works for individual projects, but it creates a deployment bottleneck for mature, collaboratively maintained apps: reviewed backend improvements still cannot be released unless the sole owner is available.
For Bot Bouncer, multiple contributors help review code, develop features, handle appeals, and improve moderator workflows, but every backend deployment still depends on one app owner. When that owner is occupied with the appeal backlog or other operational work, improvements that could reduce moderator workload become harder to ship.
A limited maintainer role would follow the principle of least privilege. Trusted contributors could handle routine deployment work without receiving ownership, access to sensitive owner-only capabilities, or control over project governance.
📜 Details
Prototype behavior
This PR adds shared CLI-side authorization logic that can classify the current developer as:
ownermaintainerunauthorizedIt updates:
devvit uploaddevvit publishdevvit playtestThose commands can recognize owners and designated maintainers when compatible authorization metadata is available. Existing Reddit employee override paths are preserved.
Identity matching
The prototype prefers stable Reddit account IDs over display names.
Display names are used only when stable IDs are unavailable. If both identities contain IDs, matching display names do not override differing IDs.
Authorization metadata compatibility
The shared helper can read authorization information from:
currentUserRole.app.maintainersfield as a temporary compatibility fallback.The parser accepts unknown API data rather than asserting that
FullAppInfoalready contains fields missing from the generated type.Command-specific behavior
devvit upload:devvit publish:devvit playtest:Production authorization model
The preferred production design is for the backend to return either:
upload,publish,playtest, androllback.The CLI may use those values for early feedback and clearer errors, but the server must independently enforce every protected operation.
The temporary runtime parser should be replaced with generated protobuf/API types after the backend contract is implemented.
Remaining implementation work
🧪 Testing Steps / Validation
Expanded unit coverage includes:
Validation completed:
git diff --checkFull workspace tests have not yet completed successfully. A prior dependency installation attempt failed because
packages/apps/devvit-dev-bot/package.jsonreferencesdevvit@0.13.6-dev, which was unavailable from the public npm registry.GitHub Actions has not yet produced a workflow run for the current PR head.
✅ Checks