Split admin.go by subsystem (audit M-11) #148
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
qwc-open/asiakirjat!148
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/split-admin-handlers"
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?
Audit item M-11. Stacked on #146 — base branch is
fix/user-facing-errors, since both touchadmin.goand rebasing a 1200-line move afterwards is no fun. Merge #146 first and this retargets tomain.Why now
The audit filed this at 982 lines. It's 1166 today — I added to it myself with the access-list work before moving those handlers out. Two of this week's bugs (#126's dead revoke button, #129's rename) were traced through this file, and M-10 has to start here.
The split
admin_projects.goadmin_robots.goadmin_groups.goadmin_users.goadmin_global_access.goadmin.goThe boundaries are the five subsystems the audit named — they fell out cleanly because the handlers were already grouped that way inside the file.
Verifying it's only a move
Reviewing 1200 moved lines by eye is exactly where a real change hides, so I checked mechanically rather than claiming it. Comparing the old
admin.goagainst the concatenation of the new files:Every non-comment, non-import line is present, unchanged, and no function gained or lost. The only differences are which file each block lives in and the per-file import lists (written by
goimports).Full suite green, unchanged — no test needed editing, which is the other signal that nothing moved but the code.
What's left after this
M-10 (split
Handlerinto Public + Admin) is the last audit item that isn't blocked. It's more invasive than this one — it changes the type every handler hangs off, so it touches every handler file and the test setup — so I'd rather land it against a clear tree than stack it six deep. Say the word once the queue drains and I'll take it.H-12 stays blocked on CI Docker access, as you noted.
Assisted by Claude Opus 5.