Audit every wired v2 action for broken or anomalous wiring
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
Sweep every registered v2 action against the wiring catalog and report what is broken or wired in a way that does not match the rules in `actions/AGENTS.md`. Legacy BaseAction actions are out of scope.
### How
- Import every module under `ai.backend.manager` and collect the concrete subclasses of the nine v2 action bases, so the sweep does not depend on one test's import closure.
- Diff that set against `load_wiring_catalog()` — the same source `backend.ai mgr ops list` reads.
- Trace every wired action class and every processor attribute to the adapters, handlers, resolvers and bgtasks that construct or run it.
### What to look for
- An action defined but never wired, and a wiring nothing ever invokes.
- A declared `operation_type()` that makes RBAC check a permission other than the one the operation actually needs — field-row writes, soft-delete reversals, upserts, and the same operation declared differently on v1 and v2.
- A gate that does not match what the operation does: an anonymous or public wiring that writes, a gated action on a route with no auth middleware.
- A catalog row that disagrees with what the audit trail records — entity type, field type, duplicate rows.
### Deliverable
The findings are recorded as a comment on this issue. Each fix group is then filed as its own issue; this task covers the audit only, not the fixes.
JIRA Issue: BA-7486
Contributor guide
Research direction
Read actions/AGENTS.md first, then inspect load_wiring_catalog() and the entry point used by `backend.ai mgr ops list`. Import modules under ai.backend.manager, identify the nine v2 action bases, and trace wired actions and processor attributes to their adapters, handlers, resolvers, and bgtasks. Done means recording each finding in an issue comment and grouping fixes into follow-up issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, security
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100