docs: Record this repo's configuration and the consumer register #77
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
priority/P3
size/L
size/M
size/S
size/XL
size/XS
state/blocked
state/done
state/in-progress
state/in-review
state/needs-refinement
state/ready
type/bug
type/chore
type/feature
type/refactor
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
amtronics/platform-actions!77
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/pa71-configuration-doc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue
Part of #71
Problem
This repository had no configuration document. Its own answer is short — one
name, the per-run token, and nothing registered on the repository at all — but
the short answer is not the useful one. The names a consuming repository must
hold before the standard release flow works are spread across eight README
sections and
templates/release.yml, and nobody can currently answer "what doesa new app need in its vault and its Actions settings" without reading all of it.
That is the shape of #64: a name that lives in one place and is referenced from
another, with no register in between.
Solution
docs/CONFIGURATION.mdin two parts.This repository's own configuration.
GITHUB_TOKEN, injected per run, usedby
report-job-failureinpr.ymland by the tag-and-publish step inrelease.yml. Verified against the repository's Actions settings: zero variablesand zero secrets are registered, and none is referenced.
The consumer's register. Every store name an action or the template reads,
grouped by the store it belongs in — four Forgejo secrets, five variables, and
eleven entries under OpenBao
secret/<app>— each with which action reads it andwhether it is required.
It is deliberately not a second copy of the action interfaces. The README
documents each action's inputs (
deploy-key,grafana-prom-token); theregister documents the store names behind them (
VPS_DEPLOY_KEY_B64,GRAFANA_PROM_TOKEN). Those are different namespaces, and confusing them is theusual cause of a value that looks provisioned and arrives empty.
Three properties are recorded because each has cost a debugging session and none
is visible from a name: the
GRAFANA_PROM_*set is all-or-nothing anddeploy-vpsexits 1 on a partial one; the action replaces the host.envrather than merging, so a name in the vault but absent from
app-envreaches thecontainer empty; and the compose may rename a value between the store and the
process.
Review notes
The line worth checking hardest is the claim that nothing is registered on this
repository — it is what makes the first table complete, and it came from the
Actions settings rather than from the workflows.
EXAMPLE_SECRETandVITE_EXAMPLEin the template are placeholders inside<…>markers, not names; the document says so rather than listing them.Two observations recorded but not acted on: the template has no
dashboardjob,so
GRAFANA_URLandGRAFANA_SA_TOKENare only needed by repositories thatwired
grafana-dashboardin by hand; and the vault address is a literal in everyconsumer's workflow rather than a variable.
Risks and trade-offs
Documentation only. All five
validatesteps pass locally by exit code, andmarkdownlint-cli2is clean on the new file as well as the README, though CIonly lints the README.
WIP: docs: Record this repo's configuration and the consumer registerto docs: Record this repo's configuration and the consumer registerSelf-verified against each acceptance criterion on
8189a41;PR / validategreen..forgejo/workflows/references exactly one name,secrets.GITHUB_TOKEN, in both workflows. Checked the other direction too: the repository has zero Actions variables and zero Actions secrets registered, so the first table is complete in both senses. The two names in the template that look like configuration —EXAMPLE_SECRET,VITE_EXAMPLE— are placeholders inside<…>markers and are named as such rather than listed..env.exampleexists, the two agree. There is none here: no application, no compose, nothing deployed.Gates run locally, by exit code:
test-check-actions.py0,check-actions.py0,test-behaviour-harness.py0,behaviour-tests.py0, README lint 0.markdownlint-cli2is also clean on the new file, thoughpr.ymlonly lintsREADME.md.The design decision worth a second look is what this document is not. Repeating each action's inputs would have made it the second list the conventions forbid, and the README's per-action sections are better at that job. What had no home is the mapping from a store name to the action that reads it —
VPS_DEPLOY_KEY_B64→deploy-key,GRAFANA_PROM_TOKEN→grafana-prom-token— plus the three properties that decide whether a value arrives at all. Those three are stated because each is invisible from the name and each has cost a session: the all-or-nothing Grafana set, the wholesale replacement of the host.env, and the compose renaming a value between the store and the process.Approved. The split between action inputs and store names is the right idea and it is the thing the other ten documents will each get wrong on their own — those really are two namespaces, and the register is the first place either has been written down as such.
Verified
templates/release.ymlexactly, in both directions. Itssecrets.*areOPENBAO_ROLE_ID,OPENBAO_SECRET_ID,DOCKER_HUB_USER,DOCKER_HUB_READ_PUBLICandGITHUB_TOKEN— the first four are the register's four repository secrets and the fifth is the per-run token in the table above it. Itsvars.*areENABLE_VPS_DEPLOY,VPS_DEPLOY_DOMAIN,GRAFANA_PROM_URL,GRAFANA_PROM_USERplus theVITE_EXAMPLEplaceholder; the register's five are those four plusGRAFANA_URL, which is not in the template and is labelled as such. Eleven vault entries, and everyenv.*name in the template resolves to one of them.VPS_DEPLOY_KEYandVPS_HOST_KEY, and they are correctly absent: they are the decoded forms of the_B64store names, produced by a step and handed todeploy-key/host-key. Excluding them is the register's own distinction doing its job — they are neither a store name nor an input.grafana-dashboardreally does takegrafana-tokenbesidegrafana-url;deploy-vpstakesdeploy-host,deploy-user,deploy-key,host-key,deploy-path,deploy-domain,registry-token,grafana-prom-{url,user,token}andapp-env. Andregistry-useris correctly not in the register: consumers passgithub.actor, so there is no stored name behind it.dashboardjob" is right — its jobs areversion,publish,deploy,notify. SoGRAFANA_URLandGRAFANA_SA_TOKENreally are only needed by repositories that wiredgrafana-dashboardin by hand.EXAMPLE_SECRET(line 269) andVITE_EXAMPLE(line 211) are both inside<…>markers. Excluding them with a stated reason is better than listing them.GRAFANA_PROM_*set:deploy-vps/action.yml:141-149exits 1 on a partial one. The replacement: the action builds{ … } > .env.deploy—DEPLOY_DOMAIN,IMAGE_TAG, theapp-envlines,COMPOSE_PROFILESand the three Grafana values, nothing else — so a vault name absent fromapp-envreaches the container empty. The rename:ahmad/nameyreads${APP_TELEGRAM_BOT_TOKEN}in its compose while the repository holdsTELEGRAM_BOT_TOKEN, and the app's Telegram integration is inert in production as a result — a live instance of rule three, found onnamey#79an hour ago.GITHUB_TOKENis referenced by this repository's own workflows (plusNOTESandVERSION, which are step-localenv:and not configuration).The one claim I cannot check, and a correction to what I have said before about that. "Zero variables and zero secrets are registered on this repository" came from the Actions settings, and this identity gets
403 user should be the owner of the repoon both/actions/secretsand/actions/variableshere — so I can confirm nothing is referenced, which is the half that makes the table complete for a reader, but not that nothing is registered.I have twice told you that wall is universal for the review bot. It is not, and the pattern is per-organisation. Both endpoints answer for every
Bayan/*andsuhba/*repository and 403 for everyahmad/*andamtronics/*one:So for the five
#71repositories left —bayan/bayan-web,bayan/kidpoints,suhba/suhba-web,suhba/suhba-docs,suhba/khitta— the bot can read the registration back and check the "set but read by nothing" half itself, which it could not do fortripornamey. Worth knowing before writing those five, and worth me correcting rather than leaving you to work around a limit that does not apply there.No findings.