Skip to content

docs(full-platform): record the slack approval gateway design - #49

Merged
Juanmadiaz45 merged 2 commits into
mainfrom
docs/slack-approval-gateway
Sep 14, 2026
Merged

Juanmadiaz45 merged 2 commits into
mainfrom
docs/slack-approval-gateway

Conversation

@Juanmadiaz45

Copy link
Copy Markdown
Contributor

What changes

Adds full-platform/slack-approval-gateway.md, documenting the new Slack-mediated approval system: what problem it solves (the GitOps PR gate gets full Slack approve/reject; the silent prod-environment gate gets a rich notification, kept exactly as-is per the team's explicit choice not to replace required_reviewers), the new microtodosuite-slack-approver GitHub App's permissions/webhook subscriptions, where its credentials live (AWS Secrets Manager, not GitHub Actions secrets, since nothing here runs as a GitHub Action), key handling and rotation, the Slack-user-to-GitHub-login authorization boundary, and what this design deliberately does not do.

Why

Two human-approval gates exist today. Gate 2 (gate-prod, a live required_reviewers GitHub Environment) is silent -- a run pauses with no notification anywhere. This design fixes that and adds full Slack approve/reject for gate 1 (the GitOps PR merge, the pipeline's real production gate). Confirmed against GitHub's REST API docs that a GitHub App cannot satisfy a classic required_reviewers check on behalf of a listed human, which is why gate 2 gets a notification rather than a button -- the team chose to keep GitHub's UI approval exactly as it is.

Tasks

No task register covers this work; it is new scope agreed directly with the maintainer in this session, not tracked against an existing spec.

How it is verified

Every permission, secret-storage, and behavior claim in the doc is derived from: (a) GitHub's official REST/webhook API documentation (confirmed via research: Users/Teams-only reviewer eligibility, workflow_job action waiting, App-submitted PR reviews counting toward required approvals), and (b) the actual implementation in microservice-app-slack-approval-gateway (companion PR, not yet opened pending that repo's creation) and the Terraform module in microservice-app-ops (companion PR).

Risk and rollback

None: documentation only. Rollback is git revert this commit.

What this PR does not do

Does not create the GitHub App or the Slack app (both require a human in each platform's own UI). Does not change any existing GitHub Environment or branch protection configuration.

@Juanmadiaz45
Juanmadiaz45 merged commit f27a3fd into main Sep 14, 2026
1 check passed
@Juanmadiaz45
Juanmadiaz45 deleted the docs/slack-approval-gateway branch September 14, 2026 21:17
Juanmadiaz45 added a commit that referenced this pull request Sep 21, 2026
## What changes
Corrects `full-platform/slack-approval-gateway.md`: what was documented
as one GitHub App (`microtodosuite-slack-approver`) covering both gates
is now two -- `microtodosuite-gitops-slack-approver` (write access,
installed only on `microservice-app-gitops`) and
`microtodosuite-prod-gate-notifier` (read-only, installed on the five
service repos, no private key stored anywhere).

## Why
GitHub Apps declare one permission set that applies uniformly to every
repository they are installed on -- there is no way to grant write
access on one installed repo and read-only on another within the same
App. The original single-App design would have left unused write
permission (Pull requests, Contents) sitting on all five service repos
just because the App also needed it on `microservice-app-gitops`.
Splitting into two Apps removes that: the notifier App genuinely cannot
write anywhere, because it is never granted the permission to.

## Tasks
No task register covers this work (same as the original PR #49).

## How it is verified
Re-derived directly from GitHub's own documented constraint (one
permission set per App installation, confirmed during the original
design's research pass) -- not a new claim, a correction of scope
assignment within the same known facts.

## Risk and rollback
None: documentation only, and no GitHub App has been created yet under
either name. Rollback is `git revert` this commit.

## What this PR does not do
Does not change the Terraform module
(`aws/shared/slack-approval-gateway/`, already merged in #106) -- it
needs no change, since it already only ever consumes one App's id/key
(the one that can write) and a shared webhook secret both Apps use. Does
not create either GitHub App.
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.

1 participant