Repository navigation
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
|
ClawSweeper closed this pull request because it changes 68,223 lines (62,146 added, 6,077 removed) across 216 files, above this repository's 50,000-line limit for review. Changes this large cannot be reviewed safely or scanned within limits and usually indicate a stale branch merged against an old base. Please open a fresh pull request from current |
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.
The implemented generic source/companion/publication seam and wiring measure +212 net lines. Correct standalone Doctor authorization additionally requires an estimated 95–115 lines at the existing backup producer, scoped-snapshot verifier, and immediate version runner: total +307–327. Reused backups currently prove integrity and source inode, not equality with the current source rows. A fresh post-backup generation alone could therefore authorize retiring newer credentials that the retained backup cannot restore. That verification must not be omitted to meet the size threshold.
Rebased proof so far: PostgreSQL schema generators/checks 144+21 and Kysely4 passed; shared Swift/native113 tests passed, including receipt/wire fixtures; unchanged published native readers again accept the untouched independent source. The actual new SQLite public-admission suite finished with 1 pass and 2 failures: foreign-write refusal passes; canonical v25 candidate Doctor reports maintenance does not own the database; native-v0
createUpdateRunrefuses missing global schema role before capture. Rollback assertions were not reached. Two declaration-preflight errors remain in the provisional tree. PostgreSQL public-path/conformance reruns, remaining native proof, fresh review and full CI are incomplete. No READY claim is made. Signed real-Mac proof pending (landing gate).The prior published-head implementation and evidence are retained below; they do not validate the provisional reconciliation.
What Problem This Solves
Native and TypeScript clients currently keep private identities, cached pairing tokens, and socket secrets in shared Gateway state, preventing client bootstrap from remaining independent of the selected database.
R10 PR1b follows preparatory #174294 and recovery prerequisite #174360. Peter approved the R0 responsibility-based ownership design on 2026-10-14. The coordinator's binding follow-up requires copy-only import for uncaptured independent native sources. This draft stacks on R14b and includes PR1a until it lands.
User Impact
Client identities, token refresh, and native socket credentials use local
client/credentials.sqlite, including when shared state uses PostgreSQL. Existing identities and token bytes are preserved. Migration requires captured custody; rollback loses credentials issued after upgrade, and affected clients re-pair.This draft is not ready to land. The current R14b API does not yet provide all required migration-publication hooks described below. Signed real-Mac proof pending (landing gate), scheduled separately by the coordinator.
Why This Change Was Made
exec_approvals_config; keep approval policy and effect-time authority with their existing owners for PR3.destinationVersionidentically in both languages as the local schema version, currently 1, separate from shared cutover version 26. Release obsolete shared credential workers and duplicate preparation/codecs/socket orchestration.Update Behavior
PR1a enables no production reader or writer, so a published SQLite driver reaches PR1b with credentials still in shared state. Automatic rollback restores those shared tables; the old release ignores the orphaned local file. Credentials issued between upgrade and rollback are lost; affected clients re-pair. A subsequent cutover rebuilds a stale canonical local copy from restored shared state, never merges it. Published native readers continue accepting untouched independent sources and refuse the retired canonical table layout.
No published release supports PostgreSQL shared state. Those installations use an engine-aware driver containing PR1a's local-family capture/restore support. The actual updater capture/restore test passes for an already-cut-over PostgreSQL store, its retained agent, and local identity/token/socket credentials. Predecessor extraction still requires R14b's missing integration.
Current R14b head
48d0ad6d37be0f59dfc6f5cd6806b01779311fd6covers existing PostgreSQL generation advancement, but lacks (1) captured SQLite/native-v0 source authorization, (2) local companion preimage/absence and final-generation attribution, and (3) compound native-v0 to fresh PostgreSQL publication. Production retirement deliberately refuses without that authority. The actual published-driver harness captures schema20, then candidate Doctor refuses before cutover with the original shared tables intact and no local file created. This is an unproven migration handoff, not orphan-induced rollback failure. No substitute capture callback or fabricated receipt is used to claim end-to-end proof.Evidence
Scope and Schema Coordination
PR1b-only production: +5,497 / −2,971 = +2,526 net, across 104 production files (197 total), excluding both prerequisites, generated output, tests, docs, and wrapper inventory. The 8,468 changed production lines exceed the revised 4,500–6,000 changed / +1,500–2,200 net estimate. The retained growth implements both language owners, full caller cutover, exact credential preservation, and the required recovery boundaries; LOC is reported, not a stop.
This migration currently uses state26. Async #174036 also targets26: take the next free version at landing, 26 if this lands first, otherwise27; whoever lands second renumbers and regenerates PostgreSQL/schema outputs. Table-scoped backup is exactly
device_identities,device_auth_tokens,gateway_origin_device_tokens,exec_approvals_config, plussqlite_stat1/sqlite_stat4for the removed indexes.Do not merge. READY requires the complete R14b publication integration and its end-to-end proofs; the standalone prerequisite's READY flag alone does not establish those boundaries.