[Debt] Refactor IDM assignment workflow guard #4

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

Xenon/Radon identify the IDM assignment workflow guard as D-ranked.

Classification: structural maintainability work.

Report evidence:

  • govoplan-idm/src/govoplan_idm/backend/api/v1/routes.py:155 _ensure_assignment_workflow rank D.

Suggested next steps:

  • Extract assignment workflow state validation into a focused helper/service.
  • Add tests for accepted/rejected assignment transitions.
  • Keep route handler behavior unchanged.

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

<!-- codex-audit-full-2026-07-11:idm-complexity-baseline --> Xenon/Radon identify the IDM assignment workflow guard as D-ranked. Classification: **structural maintainability work**. Report evidence: - `govoplan-idm/src/govoplan_idm/backend/api/v1/routes.py:155 _ensure_assignment_workflow` rank D. Suggested next steps: - Extract assignment workflow state validation into a focused helper/service. - Add tests for accepted/rejected assignment transitions. - Keep route handler behavior unchanged. Baseline report directory: `audit-reports/govoplan-full-20260711-1238`
zemion added the
type
debt
priority
p3
status
ready
module/idm
codex/ready
labels 2026-07-11 12:51:25 +02:00
zemion added the
audit/complexity
audit/structural
source/security-audit
labels 2026-07-11 16:11:39 +02:00
Author
Owner

Codex State: done

Summary

  • Split assignment workflow validation into shape, source resolution, and source-specific rules.
  • Added direct/delegated/acting-for accepted and rejected transition tests.

Changed Files

  • src/govoplan_idm/backend/api/v1/routes.py
  • tests/test_assignment_workflow.py

Verification

  • PYTHONPATH=... /mnt/DATA/git/govoplan/.venv/bin/python -m unittest tests.test_assignment_workflow
## Codex State: done ### Summary - Split assignment workflow validation into shape, source resolution, and source-specific rules. - Added direct/delegated/acting-for accepted and rejected transition tests. ### Changed Files - `src/govoplan_idm/backend/api/v1/routes.py` - `tests/test_assignment_workflow.py` ### Verification - `PYTHONPATH=... /mnt/DATA/git/govoplan/.venv/bin/python -m unittest tests.test_assignment_workflow`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-idm#4
No description provided.