Skip to content

feat: harden architecture boundaries with staged acceptance gates - #13

Merged
amtalwalkar-sudo merged 181 commits into
mainfrom
hardening/architecture-boundaries-contract
Nov 6, 2026
Merged

amtalwalkar-sudo merged 181 commits into
mainfrom
hardening/architecture-boundaries-contract

Conversation

@amtalwalkar-sudo

@amtalwalkar-sudo amtalwalkar-sudo commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Stage 1 — compiler/AST-backed persistence boundary enforcement — complete and verified.

Evidence:

  • Code commit: 42fd818ac12a5a69860863b1549d736892df4d91
  • CI #631 (42190831986): architecture, full web regression/build, Android compile/unit/instrumentation/reliability gates succeeded.
  • TypeScript AST checks cover import graphs, aliases, feature entry points, IndexedDB/Dexie/Web Storage/Cache APIs and browser persistence-library imports.
  • Kotlin compiler PSI checks cover Room DAO and direct SQLite access, with positive/negative fixtures.

Stage 2 — formal persistence and schema contracts — complete and verified.

Evidence:

  • Code head: af2da94a4defccafa46e12143b08591650bb670e
  • CI #727 (42197902329): architecture, complete web regression/build, Android build, unit, instrumentation, and Room reliability gates succeeded.
  • Shared record-envelope v1 and backup snapshot v1 contracts; validation at application, browser/Room persistence, backup export and restore ingress.
  • Dexie v5 and Room v3 ordered migration contracts, historical/adversarial fixtures, future-version rejection, and Work command/intent/state/event/outbox contract validation.
  • Contract: docs/PERSISTENCE_SCHEMA_CONTRACT.md.

Stage 3 — real persisted-data cross-platform parity — complete and verified.

Evidence:

  • Code commit: 6e11d75c3d9860f2d6632a6a443d33e7f1e4f869
  • CI #741 (42203502104): architecture, complete web regression/build, Android build/unit/instrumentation, and Android emulator Room/workflow/backup reliability gate all succeeded.
  • Web persists ordinary and pending-edge datasets in Dexie/IndexedDB, reads current records through DexieDriverWorkflowRepository, tests malformed-record rejection, restore/reopen equivalence, and produces a complete serialized projection oracle.
  • Android CI waits for the web job and downloads the exact Dexie-generated oracle. Instrumentation persists equivalent records in on-disk Room, tests replay idempotency, snapshot export/replacement/restore, close/reopen, and compares the complete shared TypeScript projection output in WebView.
  • Room v2 migration fixture now includes a legacy Log Book event; after 2→3 migration, Android projects the persisted migrated event and matches the Dexie historical-row oracle. Pending shift/trip edge states and malformed read-boundary rejection are also covered.
  • The full serialized business output is compared, including event/group IDs, metric IDs/values/statuses, ordering, logical shift/day allocation, and integrity diagnostics.

Stage 4 — recovery and transaction guarantees — complete and verified.

Evidence:

  • Initial implementation commit: 3f540d7d34de1340d274a52b97a3ca8ac5e8e8e2 (CI #748: run 42207494968).
  • Follow-up audit fix: 30b179e5df0a056dd1bd003490c5d00492fd71c3. This closes the remaining native startup-entrypoint gap by gating generic RoomStore reads/writes and the overlay attention-status write through the process-wide recovery gate shared by Backup, DriverWorkflow, RoomStore, and the overlay service.
  • CI #751: run 42211390874 passed architecture, focused recovery/reliability tests, complete web regression/build, Android assemble/unit/AndroidTest compilation, and the required Android emulator Room/workflow/backup reliability gate on the follow-up implementation head.
  • Browser coverage: failure injection at event/state/intent/outbox writes; identity conflict and exact replay; pending-intent retry after IndexedDB reopen; interrupted export/replacement rollback; automatic checkpoint recovery after reopen; Timeline/trip-history rebuild from authoritative events after restore/reopen.
  • Android coverage: Room transaction-trigger failure injection at Log Book/state/intent/outbox writes; duplicate/replayed completion and command identity checks; pending-intent recovery; ordered Room migration and injected migration rollback; restore replacement rollback; checkpoint recovery after Room close/reopen; backup snapshot revision validation.
  • Contract evidence is recorded in docs/ARCHITECTURE_HARDENING_IMPLEMENTATION_CONTRACT.md and docs/TRANSACTION_AND_RECOVERY_CONTRACT.md.
  • CI #752: run 42213013949 passed all architecture, web, and Android jobs on current PR head c58525732e9efa4d1ff0a12bd7e2433bd9749bf4 (the documentation-only Stage 4 evidence commit).

Stage 5 — integrated regression gate — complete and verified.

Evidence:

  • Implementation commit: 376282f9fa6a0d912c866c1692f214909fed1d55.
  • CI #753: run 42244490685 completed successfully on this exact PR head.
  • The integrated regression job depends on architecture, web, and Android and explicitly fails unless all three report success.
  • Architecture gate: success.
  • Web gate: success — focused offline workflow/backup reliability regressions, complete web regression suite, Dexie-generated Timeline parity oracle, and production build.
  • Android gate: success — debug/release assembly, Android test compilation, unit tests, Room/workflow/backup emulator reliability gate, and publication of Room schema history.
  • Integrated regression gate: success.
  • The unsigned release APK publication step was correctly skipped because this is a pull-request run; it is configured for merged main.

PR #13 remains draft and unmerged. No Workflow/Timeline UI, navigation, styling, cards, or shell redesign is included. Physical-device and live Dropbox/account acceptance remain separate deferred release gates.

@amtalwalkar-sudo amtalwalkar-sudo changed the title docs: define staged architecture hardening acceptance contract feat: harden architecture boundaries with staged acceptance gates Nov 5, 2026
@amtalwalkar-sudo
amtalwalkar-sudo changed the base branch from feat/runtime-architecture-foundation to main November 6, 2026 15:43
@amtalwalkar-sudo
amtalwalkar-sudo marked this pull request as ready for review November 6, 2026 15:44
@amtalwalkar-sudo
amtalwalkar-sudo merged commit 1b71614 into main Nov 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant