0.1.0: first release — review, harbour, Gas, deploys and releases
- Pandu reviews every MR labelled `labuh` through Codex app-server and answers in a fixed shape; the Hub checks each piece of evidence, applies hard rules the model cannot override, retries once, and posts the comments itself. - The board shows the harbour: lanes per environment, Dicek / Siap gas / Beres, two fixed berth rows, boats that glide; GitLab sign-in, approvers from board.json, works on a phone. - Gas, Tunda, Tolak and Tutup MR with 15 seconds to undo; the Hub checks GitLab again and merges the reviewed commit only, then follows the deploy. - Branches that deploy from tags get a proposed version and changelog; the approver confirms the number and the Hub creates the annotated tag. - Telegram notifications, reminders, dry mode for rehearsals. - Hosting: one image, three containers. The reviewer runs in its own container with no GitLab token and read-only checkouts, reached by the Hub over a token-guarded WebSocket; every command it asks for still passes the Hub's allowlist. Configuration and state live in LABUH_HOME. - AGPL-3.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
52
rubric/rubric.md
Normal file
52
rubric/rubric.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Deploy rubric (draft v2)
|
||||
|
||||
Draft; the real content is open decision 7 and moves to the devops vault later.
|
||||
Each rule has an id the reviewer cites as evidence. "Breaks" says when a finding is `bad` (blocks GO); otherwise it is `todo`.
|
||||
|
||||
Where it runs decides how hard a finding is. Code that runs on its own once deployed (the app, jobs, cron, migrations and seeds in the deploy) is held to "Breaks". A one-off command that someone runs by hand after deploy is a `post_deploy` step: a weakness in its failure path (a step outside the transaction, a rerun that skips a follow-up) is `todo`, and the post-deploy step says how to check the result and recover. It is still `bad` when running it as written, on the happy path, damages data.
|
||||
|
||||
## R1 · Can be rolled back
|
||||
A schema migration has a working rollback (`down()` or equivalent) that restores the previous shape and data.
|
||||
Breaks: a migration whose up() changes or removes existing data or structure without a rollback, or that drops or renames an existing column or table without a plan to restore its data. A rollback that removes only what up() created is fine; a migration that only creates new tables or columns may leave down() empty (`todo` at most).
|
||||
|
||||
## R2 · Existing data is safe
|
||||
Code or scripts that update or delete existing rows are scoped (clear filter, date range) and have a restore point.
|
||||
Breaks: an unscoped update or delete, or a rewrite of historical data with no backup or dry run.
|
||||
|
||||
## R3 · Every reader is updated
|
||||
When a field, column, table, endpoint or event changes, every place that reads it (jobs, reports, cron, other services, the frontend) is updated in the same release or stays compatible.
|
||||
Breaks: a remaining reader of the old shape.
|
||||
|
||||
## R4 · No secrets, config is declared
|
||||
No credentials, tokens or private keys in code or fixtures. New environment variables or config keys are named in the MR description.
|
||||
Breaks: a secret in the diff. A missing config note is `todo`.
|
||||
|
||||
## R5 · Right target
|
||||
The target branch matches the environment the MR says it is for. Teams promote to production through their own release branches (for example `rc/*`) or a twin MR to development, so commit hashes on production often differ from development: never judge release history from commit hashes or branch lists.
|
||||
At most `todo`: when a production MR gives no sign that the same change was tested on development or staging, ask for the link.
|
||||
|
||||
## R6 · Post-deploy steps are written down
|
||||
Anything that must happen after deploy (run a migration, upgrade a module, backfill, clear a cache, a feature flag) is listed.
|
||||
These become `post_deploy` steps. Missing ones are `todo`.
|
||||
|
||||
## R7 · One thing per MR
|
||||
The MR does what its title says. Unrelated changes are `todo` (split or explain). Release branches that bundle several reviewed changes on purpose are fine.
|
||||
|
||||
## R8 · Checked before asking
|
||||
A behaviour change has tests, or the description says how it was checked. Missing evidence is `todo`; a test change that weakens or deletes assertions is `bad`.
|
||||
|
||||
## R9 · Safe deploy order
|
||||
Read how this repository deploys (CI files, deploy scripts, Dockerfiles, runbooks). New code must not serve traffic before the schema it needs exists: migrations run, and succeed, before the new version replaces the old one; a failing step must not leave the new version running on the old schema.
|
||||
Breaks: the deploy starts the new version before migrations it depends on, or continues after a failed migration or seed.
|
||||
|
||||
## R10 · What it needs from elsewhere
|
||||
List what this change needs that lives outside this repository: endpoints, response fields, tables, queues, other services. When the change calls or reads something that does not exist in its counterpart yet (an API the frontend calls, a field it reads, a topic it consumes), it must deploy after that counterpart.
|
||||
`waiting` when it depends on another change that is not deployed yet, naming what it needs; `todo` when unsure. Look for the counterpart in the MR description and links.
|
||||
|
||||
## R11 · Safe to run twice
|
||||
One-off commands, backfills, normalizations and data migrations give the same result when run again, and skip or report rows they already handled.
|
||||
Breaks: a rerun changes data again, double counts, or produces a different result.
|
||||
|
||||
## R12 · Corrections check what they overwrite
|
||||
A data correction writes only rows it has identified by stable business keys (document number, code), and checks that each value it replaces is still the expected old value before writing (compare first, or `WHERE value = old`).
|
||||
`todo` when it overwrites without checking the old value, or when it relies on a hardcoded database id (user, company, warehouse, actor) that is not resolved or checked in the target environment. Breaks: a hardcoded id decides which rows are changed and is not checked against the target environment.
|
||||
Reference in New Issue
Block a user