Repository navigation
Conversation
…cessful QR approval
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope — P0C3A real Cloudflare D1 (still Draft, stacked on PR #5)
The first real Cloudflare staging D1 was created as a separate database
mote-cloud-stagingin the connected account. The existingmote-rcpersonal Worker and all existing D1 databases were not changed. This PR does not deploy any Worker, expose a public API, change DNS, or create secrets.Remote evidence (Cloudflare API, 2026-11-16 UTC)
0001_core.sql(9 statements),0002_auth.sql(6),0003_pairing_claim.sql(3 triggers). Queriedsqlite_master: 5 Cloud tables + 3 pairing triggers present.meta.changes = 2(ticket UPDATE + trigger device INSERT), losing0.0additional changes); duplicate credential claim was rejected and rolled back, leaving the attempted ticketpending; only one device row existed.Actual bug found & fixed
The previous
CloudPairingRepository.approve()expectedresult.meta.changes === 1, correct in local Node SQLite but false on actual Cloudflare D1 where the trigger contributes a second change. Real clients would receive a failure even after successful device registration. Fixed to accept a safe positive integer changes count for this unique-ID UPDATE with atomic trigger, and added a staging HTTP regression test simulating D1's trigger-inclusive count (while retaining existing Node SQLite tests).Repeatability & CI
cloud/scripts/verify-staging-d1.mjs: opt-in remote D1 contract verifier with explicit database-name guard, required env values, per-run random fixture IDs and finally-cleanup.docs/cloud-p0c3a-real-d1.mdrecords evidence, safe execution, caveats, and critical warning: migrations applied via D1 REST API, not recorded in Wrangler migration ledger — never blindly reapply SQL viawrangler d1 migrations apply --remoteon this database.Strict release blockers
No Cloud Staging Worker or per-account DO deployed; no genuine Apple identity or iOS app, no live WebSockets, no physical Windows/Mac lock, no real double-account Worker E2E, no revocation broadcast, no public rate limit/account deletion. The stage stays private and disabled; existing self-host Relay is untouched.
Next P0C3B: reconcile Wrangler migration baseline, configure disabled/gated separate Staging Worker with authenticated operator secrets and real Apple app identifier, verify DO runtime and actual hardware E2E before any public access. No unsigned production binaries or App Store claim.
Verified GitHub CI (HEAD
9b58d47c1cc23cc8b2e1cd24a9a622216a2b1875)CI #43 — 9/9 jobs SUCCESS. Relay / Protocol (including new trigger-count regression), standalone Cloud staging Worker dry-run plus script syntax check, repository consistency, Dashboard, original Worker, macOS, Windows, Windows E2E and Windows test-mode release artifact passed. This validates source/tests; real D1 tests were separately performed via Cloudflare REST API. Cloud Worker/DO, native clients and real remote locks remain not deployed/not live-verified.