codex/phase-2b-source-registration
Aram backend
Phase 2A provides the persistent, audit-safe data foundation. Phase 2B starts
with an isolated source-registration primitive that records a filename, type,
and SHA-256 digest for a Draft fiscal year. It does not persist source bytes,
parse spreadsheets, calculate financial values, or alter canonical files.
XLSX preflight inspection validates the accepted worksheet names and header
locations before any future row-level import; it does not evaluate formulas or
read financial data rows.
The ledger parser then streams validated rows as immutable typed records. It
uses Decimal for source amounts, rejects non-finite or incomplete values, and
does not calculate balances or write parsed rows to the database.
Local setup
cd backend
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[test]'
alembic upgrade head
uvicorn aram_backend.main:app --reload
Open http://127.0.0.1:8000/docs. The health endpoint is
GET /api/v1/health; read-only schema catalogs are available at
GET /api/v1/schema/entities and GET /api/v1/schema/enums.
Tests
cd backend
pytest
Tests use an isolated temporary SQLite database with foreign-key enforcement. Runtime SQLite files are ignored by Git.