fix(forgejo): write org labels through the forgejo-admin surface #934
No reviewers
Labels
No labels
burndown-2026-06
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/devrel
role/eval
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/sysadmin
role/tpm
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/infrastructure!934
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/label-taxonomy-admin-verb"
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?
Fixes the failure Kai hit running
just forgejo-label-taxonomyafter #933 merged.No labels were mutated. It failed on the first write. All three orgs still carry the nine pre-rename role values.
Root cause
Under
aosguard ops forgejo,org-label createandorg-label editare stubs that accept no flags. Their entire description is a redirect:The real surface is
aosguard ops forgejo-admin org-label, whoseedittakes<org> <id>plus--name,--color,--description,--exclusive.The pre-existing script wrote to the same stub namespace. Combined with the
json.loadson YAML output fixed in #932, that is two independent defects on the read path and the write path, which is about as strong as evidence gets that it had never successfully run.What changed
Writes go to
forgejo-admin. Reads deliberately stay on the ordinaryforgejosurface, so--checkand--dry-runremain runnable without admin credentials. That property is worth keeping: the check belongs in CI and in anyone's hands.The real lesson, and the fix for the class
Coverage was shaped wrong rather than absent.
plan()had 17 tests. The argv handed to aosguard had none. So a planner that computed exactly the right six renames dispatched them to a verb that could not accept them, and every test still passed.write_argvis split out and eight tests now assert the invocation shape:forgejo-admin, reads stay onforgejoNoneleaks into argv--exclusiveis a bare flag, and absent when falsedeleteVerification
Using aosguard's own
--dry-run, which resolves a request without firing it. This is the check I should have run before shipping #932:A rename is a PATCH against the label id, which is what carries every issue through it. The admin verb's own help says the same: "An edit keeps the label id, so every issue carrying it keeps it through a rename - this is the safe way to move a taxonomy."
25 tests pass. Full
pre-commit run --all-filesgreen.just forgejo-label-taxonomy-checkexits 1, correctly, because the orgs still hold the old names.Refs coilyco-flight-deck/agent-compose#342