Story-1525 · EPIC-007 Documents & Intake · revert

Revert the premature 9-value filings.current_state — the register derives the live 3-value status

Why this exists (the lie it removes)

ADR-125 was first implemented (migration 0108) by adding a nine-value business.filings.current_state column alongside the live three-value status. The trouble: matter-v3 — the shipped filings feature — writes status, not current_state. So current_state is backfilled exactly once and then maintained by nothing. As a filing actually moves (draft → filed → served → decided), status updates and current_state silently rots. A register that derives current_state would therefore show a stale, richer-looking lie — strictly worse than deriving the honest 3-value status.

pramaan-docs ADR-125 Amendment 1 (PR #191) + the pramaan-spec#1525 decision resolve this: the Documents Register derives the live 3-value status (draft/filed/archived); the nine-value lifecycle is a deferred filings-feature expansion, not v0.1. To adopt nine values later, the filings feature must first be changed to maintain current_state — a separate matter-v3 story.

What changes

FileChange
alembic/.../0114_revert_filings_current_state.pyDrop business.filings.current_state + its CHECK. downgrade() faithfully restores both (mirrors 0108). Single alembic head off 0113.
src/domains/matter/entity.pyRemove the current_state column + CHECK from the Filing model. status (3-value) untouched.
src/domains/document/service.pyThe documents↔filings derive reads Filing.status (3-value) instead of current_state.
src/domains/document/dtos/document.pyFilingState enum → draft / filed / archived.
tests/integration/test_app_document_filing_link.pyAsserts the derived 3-value status (not weakened — proves the derive reads the live status).

Retained (the correct bridge from 0108)

This revert touches only the nine-value lifecycle. The filings.document_id lead-document link, the annexure model (parent_document_id + exhibit_label, annexures riding the parent's filing), and deriving the filing type via proceeding_filing_types all stay exactly as ADR-125 intends.

Verification

single alembic head alembic round-trip green derive returns 3-value

GET /app/documents/{doc_id}/filing  →  { filingType, filingState: "filed" | "draft" | "archived" | null }

Closes pramaan-io/pramaan-spec#1525.