The single most important architectural fix vs ChironeWp3: ALL helpers consult effective_decisions() instead of raw list_decisions(), so the reopen-aware view is consistent everywhere (fixes the bug where approved_ctes/advance_problems conflated stale pre-reopen decisions with new ones). Model (corrected during TDD): - current_phase folds the audit (excluding retracted) with guard 'n == cur' -- already reopen-aware (old phase_approved:N after reopen to M<N don't advance). - effective_decisions = decisions whose phase <= current_phase. A sql_approved at phase 7 is stale when current_phase=4 after a rollback to F4, even if in the ledger. Rollback to F4 does NOT invalidate decisions of phases 1-3 (they stay effective). - decision_retracted markers excluded (audit-only). Also: session/models.py ported (SchemaLinking + Candidate with grounded_values D14a + concept_formulas D14b). MAX_PHASE/PHASE_NAMES read from workflow.yaml via load_workflow() (no duplication). Strada 2: ladder if-phase-N kept for now, generic prerequisites evaluator (F2 full) deferred. 7 phase tests + 20 total passing.
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.