Prepare held valuation-history adapters without customer registration
HELD DRAFT — do not merge or activate customer access. This preserves a bounded source continuation of existing #795 under recoupable/mono#326 and recoupable/app#1911 while a separate database-access prerequisite awaits independent acceptance and explicitly approved release.
The draft adds internal valuation-history insert/select adapters, guarded save acknowledgement, and a prepared authenticated history handler/validator using current personal-and-organization catalog ownership. Queries are scoped to one catalog, bounded to 1–100 rows and ordered by measured_at then ID. Unmeasured/invalid estimates are not written; unconfirmed saves do not trigger paid work again. Synthetic roundtrip cases cover two dated estimates, a different catalog and membership revocation before reads.
There is no registered REST route, MCP tool, job or production caller. Existing POST /api/valuation and measurement reads are byte-for-byte unchanged. The adapters are not wired to completed runs. No schema/types/grants/policies, financial model, provider, credit or customer persistence behavior changes. No migration, provider call, customer row read/write or hosted valuation was performed. No detailed private access findings or release SQL are published in this PR.
26 new mocked cases and all 324 selected catalog/valuation cases (47 files) pass, as do full ESLint, scoped formatting and whitespace checks. No diagnostics were reported in these files during the source typecheck; the full repository typecheck is not green outside these files. Tests exercise the real prepared handler/validator and database adapters against synthetic auth/data boundaries, not live database permissions. Source outside this new internal dependency chain does not import the adapters.
The original implementation remains #795, and its complete disposition stays open. This adapts selected source/tests from cc0511d0714dec01b2d369ee0fbe819a00881123 rather than creating a competing product project. Daily read-triggered persistence, concurrent daily deduplication, completed-run wiring, public route registration, scheduled/report/Attio integration, publication parity and authorized deployed readback remain unfinished. Existing public availability must remain pending.
See docs/verification/catalog-valuation-history.md for the held contract and activation gates. Independent source review is useful now; passing CI does not authorize the separate database change, customer activation or this draft's merge. Coordinator owns release decisions.
Summary by cubic
Prepares internal catalog valuation-history adapters as a held draft — no REST route, job, caller, or customer access is activated, and existing POST /api/valuation and measurement reads are unchanged.
Adds insert/select adapters plus a prepared read handler and validator scoped to one catalog, ordered by measured_at then ID, with a limit of 1–100 (default 30). Unmeasured or invalid estimates are not written, and unconfirmed saves return false without rerunning paid measurement. Synthetic tests cover two dated estimates, cross-catalog scoping, query validation, and membership revocation before reads.
Held boundaries
- No schema, types, grants, policies, provider, or customer-persistence changes.
- The database-access prerequisite and release approval are separate; passing CI does not authorize the merge, customer activation, or the database change.