Repository navigation
Description
Summary
Please host the PR Hygiene service, a small Rust web service with a SQLite database, on a dash.org subdomain. It serves the PR review dashboard, a public read API that the team's /prs skill and Slack digest read, and GitHub sign-in that lets each person see their own review speed.
It belongs with the permanent shared services in #21 (dash-infra Terraform).
Background
- What it is. PR Hygiene runs the review policy on dashpay/platform, rust-dashcore, tenderdash, grovedb and dash-evo-tool: who must review what, and whether a PR is ready. The engine runs in GitHub Actions today. The dashboard is an interim page on GitHub Pages (https://dashpay.github.io/stale_prs_are_bad/).
- Code:
dashpay/stale_prs_are_bad, directoryservice/. Run details are inservice/README.md. - Stage 1, this request, is read-only. The service holds no credential with access to any repository. GitHub Actions in our repo pushes data to it every 15 minutes, authenticated with a GitHub Actions OIDC token that the service verifies.
- Stage 2 is later, a separate request. It's described below so you can plan the hosting with it in mind.
What's needed now (stage 1)
| Image | docker build -f service/Dockerfile . from the repo root. Distroless, runs as uid 65532. |
| Process | pr-hygiene-service serve, plain HTTP on port 8080 |
| Hostname | a dash.org subdomain, e.g. pr-hygiene.dash.org (your naming), with TLS terminated in front |
| Storage | a persistent local volume at /data for SQLite in WAL mode. Not NFS, SMB or EFS: WAL needs real file locks, and the service refuses to start without them. Small: we expect well under 1 GB. |
| Backup | daily |
| Inbound | HTTPS from the internet: POST /ingest comes from GitHub-hosted runners, which have no fixed IPs, and GET /api/v1/* and the page are public |
| Outbound | HTTPS to token.actions.githubusercontent.com, github.com and api.github.com |
| Secrets | the GitHub sign-in App's client secret, as a mounted file. This is optional at first: without it the service runs with sign-in off. |
| Health | GET /healthz (liveness) and GET /readyz (readiness) |
| Restart | restart on crash |
| Deploys | an image built from protected master only, deployed on merge, with no ticket per release. The deploy could use GitHub Actions OIDC to AWS, matching the github-oidc module in #21. |
The reverse proxy must also (details in the README):
- time out slow and idle connections;
- cap connections and rate-limit
/api/v1/*per client, with tighter limits on/auth/*and/api/v1/me*; - pass
POST /ingestthrough with a body limit no larger than 1 MB; - pass the
Originheader through unchanged; - never log
Authorization,CookieorSet-Cookie, or the query string of/auth/callback.
Load is light. Ingest is one POST of about 110 KB every 15 minutes. The public reads come from the team, its tools and the dashboard page. We haven't measured CPU or memory under load yet, and will in the first week.
Stage 2, later (for planning only, not requested yet)
When the Rust engine takes over from the Actions one, the same image runs a second process: a worker.
- It runs as its own container with no inbound port, and holds a GitHub App private key: read-only first, write access at cut-over. A non-exportable KMS key is preferred if available.
- The front container receives GitHub webhooks.
- The worker keeps its own SQLite file on its own local volume.
- At cut-over the worker becomes merge-critical. It posts the required
PR Hygienestatus on the five repos, so while it's down PRs can't turn green. That needs alerting on webhook delivery failures, queue age, and the time since each PR was last checked.
Questions
- Where should it run: AWS dashdev under the dash-infra Terraform project from Create dash-infra Terraform project for shared services #21, or somewhere else?
- Which subdomain?
- Which deploy mechanism do you prefer, and who owns the image registry?
- Backups: is the provider's volume snapshot enough, or do you want a separate copy?
Once you give us the URL, we set PR_HYGIENE_SERVICE_URL in our repo and start posting data to it.
Related
- Create dash-infra Terraform project for shared services #21 dash-infra Terraform project for shared services
Activity
shumkov commentedon Nov 20, 2026
@dashinfraclaw please pick this up. It's overdue: filed on Oct 7, no reply yet.
The minimum to start is stage 1 as described above:
pr-hygiene-service serve, plain HTTP on port 8080;/datafor SQLite (not NFS/EFS), with daily backups;It holds no credential with access to any repository. Build and run details are in
service/README.md.Please reply here with:
Once it's up, we set
PR_HYGIENE_SERVICE_URLin dashpay/stale_prs_are_bad and the ingest job starts posting to it.ktechmidas commentedon Nov 20, 2026
Picked up. Stage 1 hosting is in place; the service goes live when dashpay/stale_prs_are_bad#120 merges.
Answers to the four questions:
us-west-2, one small ARM64 EC2 instance with a local EBS volume for SQLite. Terraform is in feat: Terraform for the PR Hygiene service and services.dash.org #92 (the first piece of Create dash-infra Terraform project for shared services #21) and is applied.https://pr-hygiene.services.dash.org.services.dash.orgis a new zone we run in Route 53. The host is up with a valid certificate and answers 502 until the first image is deployed.master, assumes an AWS role through GitHub OIDC (theproductionenvironment, restricted tomaster), pushes the image and triggers the deploy. The host waits for/readyzand rolls back if it does not come up. The environment and the role variable are already set, so merging that PR runs the first deploy. It needs a review from you or @QuantumExplorer.VACUUM INTOcopy to S3, expired after 90 days, rather than volume snapshots.nginx in front implements the README's proxy rules; the rate-limit numbers are starting points, so say if they should change. Sign-in stays off until the sign-in App exists. Once the first deploy is verified, set
PR_HYGIENE_SERVICE_URLto the URL above (no trailing slash).Posted by Claude (infraclaw) on behalf of
ktechmidas.shumkov commentedon Nov 23, 2026
@dashinfraclaw a quick check, please, as we turn on live updates.
The PR Hygiene caller workflow in the five governed repos (platform, rust-dashcore, tenderdash, grovedb, dash-evo-tool) now grants
id-token: write, so the shared PR Hygiene job can post verdicts topr-hygiene.services.dash.org, signed with its OIDC token. A side effect is that any step of that job could mint a GitHub OIDC token for any audience. The only code in the job is our shared workflow fromdashpay/stale_prs_are_badmaster, and no pull request code runs in it.Could you confirm that no AWS role, in dashdev or any other account, trusts the OIDC subject of those five repos with a wildcard, such as
repo:dashpay/platform:*? If one does, please pin it to the exact workflow (job_workflow_ref) or environment. Thepr-hygiene-deployrole is fine: it trusts onlyrepo:dashpay/stale_prs_are_bad:environment:production.ktechmidas commentedon Nov 23, 2026
Checked today across the three accounts in our AWS Organization (dashdev, dashevo, dashconsult). One role matched, and we are removing it.
The match.
oidc-rolein dashdev trustsrepo:dashpay/platform:*. It is a leftover of the 2023 self-hosted runner setup, last used in July 2024. It has no permission policies. Its only access is full control of one S3 bucket, the old runner cache, which is empty. So a token from any Platform workflow withid-token: writecould take over an empty bucket and nothing else. We are deleting the role, removing it from the bucket policy, and deleting theAWS_ROLE_TO_ASSUMEvariable on dashpay/platform that points at it. No workflow reads that variable.This did not start with your change:
release.yml,book.yml,tests-codeql.yml,tests-js-package.ymlandtests-rs-nightly-long-running.ymlon Platform already grantid-token: write.Everything else.
pr-hygiene-deployand two fordash-network-go. Four static-site deploy roles each trust a whole repository:dashpay/data-contract-creator,dashpay/proposal-generator,dcginfra/dashmate-siteanddcginfra/grovedb-site(the website repository, notdashpay/grovedb). None of them is one of the five.Posted by Claude (infraclaw) on behalf of
ktechmidas.shumkov commentedon Dec 1, 2026
Thanks @ktechmidas — the service is live at https://pr-hygiene.services.dash.org (deployed from master by #120), PR Hygiene pushes verdicts to it, and the OIDC check is done with the stale
oidc-roleremoved. Closing; hosting follow-ups will come as new issues.