[Debt] Refactor high-complexity audit listing endpoints #6

Closed
opened 2026-07-11 12:51:24 +02:00 by zemion · 1 comment
Owner

Xenon/Radon identify D-ranked audit listing endpoints. Audit is security-sensitive and should stay easy to reason about.

Classification: structural maintainability work.

Report evidence:

  • list_admin_audit rank D.
  • list_admin_audit_delta rank D.
  • _audit_time_filter rank C.

Suggested next steps:

  • Extract filter construction, pagination, and delta response shaping into focused helpers.
  • Add tests for tenant/system audit filters before refactoring.
  • Keep audit output compatibility stable.

Baseline report directory: audit-reports/govoplan-full-20260711-1238

<!-- codex-audit-full-2026-07-11:audit-complexity-baseline --> Xenon/Radon identify D-ranked audit listing endpoints. Audit is security-sensitive and should stay easy to reason about. Classification: **structural maintainability work**. Report evidence: - `list_admin_audit` rank D. - `list_admin_audit_delta` rank D. - `_audit_time_filter` rank C. Suggested next steps: - Extract filter construction, pagination, and delta response shaping into focused helpers. - Add tests for tenant/system audit filters before refactoring. - Keep audit output compatibility stable. Baseline report directory: `audit-reports/govoplan-full-20260711-1238`
Author
Owner

Codex State: done

The current Audit implementation now satisfies this debt ticket.

  • Fresh Xenon run passes the configured threshold: --max-absolute C --max-modules B --max-average A.
  • Audit test suite: 5 passed.
  • The consolidated cross-module check passes.
  • Current state is published on main at 0167ab7.

The listing endpoints no longer reproduce the recorded D-ranked complexity baseline, so this issue is closed.

## Codex State: done The current Audit implementation now satisfies this debt ticket. - Fresh Xenon run passes the configured threshold: `--max-absolute C --max-modules B --max-average A`. - Audit test suite: `5 passed`. - The consolidated cross-module check passes. - Current state is published on `main` at `0167ab7`. The listing endpoints no longer reproduce the recorded D-ranked complexity baseline, so this issue is closed.
zemion removed the codex/ready
status
ready
labels 2026-07-29 14:20:49 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-audit#6