docs release evidence p27 t03 catalog cache - AlexandreZanata/Abastevo GitHub Wiki
P27-T03 — Server catalog, offline cache and canonical action targets
Status: LOCAL_DONE on codex/phase-27-station-intake. Task: P27-T03.
Binds B-BR-D01/D02/D04/D06/D07 and BUC-D05. Room-persisted catalog
with offline replay; canonical UUID targets verified across
social/contribution consumers; no price fabrication, no CNPJ-as-UUID.
Behavior (TDD)
- Room v8:
server_station_cache(UUID PK, nullable coords, position order, no invented geometry) +server_catalog_meta(single-row cursor);MIGRATION_7_8additive-only; schema8.jsoncommitted. DirectoryStationRoomCache(bound toServerStationCache, memory impl retired): fresh traversals replace the page set, details upsert singly, empty loads null, IDs lowercase-normalized. Nearby stays transient (never persisted). Offline replay = a fresh instance over the same DAO returns the last good page + cursor with zero network.- Interface change (honest ripple):
ServerStationCachemethods are nowsuspend(Room-backed); memory impl removed, fakes updated, Hilt graph resolves (dropped the uninjectable clock lambda caught by Dagger, fixed the non-suspend testclear()). - Canonical targets verified: feedback (
FeedbackTarget), contribution (ContributionTarget), outbox draft (station_idUUID-checked) all refuse legacy CNPJ rows; server list order is the stable sort (no missing-price fabrication); legacy expert tools untouched.
Validation
- NEW:
DirectoryStationRoomCacheTest4/4 (replace+order, restart replay, empty + unknown-coords honesty, case-insensitive detail + clear) +Migration7To8UnitTest(additive-only, no index, no drop). - Regression: full
:domain+:application+:data+:appsuites +:app:assembleDebug+ Hilt KSP PASS; backendvacuum lint+apicontractPASS (contracts untouched). git diff --checkPASS;scan-secrets.shPASS.
Limits and next
- Device-side v7→v8 migration proof joins the end manual/device batch (unit SQL assertions here; no emulator per directive).
- Next: P27-T04 lightweight suggest-correct-status Android journey.