Skip to content

Add a C++ device-reading API with Drogon and Postgres - #462

Draft
sdairs wants to merge 3 commits into
mainfrom
codex/device-heartbeats
Draft

sdairs wants to merge 3 commits into
mainfrom
codex/device-heartbeats

Conversation

@sdairs

@sdairs sdairs commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Saves synthetic project-scoped device readings and advances each device's latest sequence atomically. Matching retained UUIDs replay the original result before sequence/cap checks; unseen stale sequences and full histories conflict. Device/history reads use bounded keyset pagination with numeric identity ordering.

The C++20/Drogon implementation waits for confirmed COMMIT before returning 201/200, breaks transaction/callback ownership cycles, and resolves rollback paths independently. It uses verified libpq TLS, separate owner/runtime roles, loopback defaults, finite admission/pool/body limits and pinned Drogon/Trantor revisions. Shared operator tokens and runtime credentials are trusted; direct SQL can bypass application count/sequence/cap coordination.

Validated on 2 October 2026 in native Ubuntu ARM64: pinned framework build, clean Release application build, formatter, one CTest executable with three validation groups and real compiled listener/SIGTERM preflight. All nine real Cloud cases pass on PostgreSQL 18.6, including two independently blocked sessions, UUID replay/sequence races, ten post-history rollback errors with later recovery, actual deferred COMMIT failure with same-ID recovery, all 200 history rows in numeric pages, constraints/grants, certificate-specific CA/hostname negatives and confirmed old-process exit before persistent restart/replay. Clean role/bootstrap/migration/seed and repeated migration/seed pass.

The uniquely scoped workflow runs local native checks without Cloud secrets. Article, infrastructure credentials, receipts and raw evidence stay local outside this PR. The dedicated Cloud fixture was deleted after review; its exact absence was confirmed.

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