Skip to content

Commit ac41aef

Browse files
authored
Document Slice 6C Gate 4 final backup (#19)
1 parent 2c1b2bb commit ac41aef

1 file changed

Lines changed: 213 additions & 0 deletions

File tree

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
# Orbit V6 Slice 6C Gate 4 Final Backup Report
2+
3+
Date: 2026-07-17
4+
Starting main SHA: `2c1b2bb3002f68d4bdf04b2ae893d459dcba27d0`
5+
6+
## 1. Scope and result
7+
8+
Gate 4 authorized one final manual encrypted backup through the existing
9+
production backup path, its normal backup-run metadata, and a restore proof on
10+
disposable resources. It did not authorize or perform a Worker deploy, OAuth
11+
change, DNS change, Pages deployment, custom-domain attachment, production
12+
restore, KV write, media write, paid-feature activation, or live traffic
13+
cutover.
14+
15+
**Gate 4 result: `PASS`.**
16+
17+
The new backup was read back byte-for-byte from private R2, decrypted and
18+
verified. A disposable D1 restore passed count, relationship, integrity,
19+
security-revocation, non-empty-target, and corruption-rejection checks. Both
20+
older successful production backups remain directly readable. All disposable
21+
Gate 4 resources and local temporary secret/data files were removed.
22+
23+
## 2. Preflight
24+
25+
Preflight completed before the backup mutation:
26+
27+
- local `main` and `origin/main` were equal at the expected starting SHA and
28+
the worktree was clean;
29+
- the Gate 1, Gate 2, and Gate 3 reports were present on `main`;
30+
- the Cloudflare zone was active on the Free plan, DNSSEC was active, the
31+
parent published the exact single DS, and validating DNS answers were clean;
32+
- `orbit.sametbasbug.dev` remained a DNS-only CNAME to
33+
`sametbasbug.github.io.`;
34+
- Orbit `/` returned HTTP 200 from `server: GitHub.com`, while `/healthz`
35+
returned the expected GitHub Pages HTTP 404;
36+
- production Worker version
37+
`01384034-5584-4181-8763-b31e3aecf95e` remained at 100 percent on the
38+
Workers.dev-only dark-launch surface;
39+
- the production OAuth App retained the exact Workers.dev homepage and
40+
callback;
41+
- production backup was enabled and media upload was disabled;
42+
- the production D1 migration list was current, foreign-key check returned
43+
zero violations, and a read-only export passed local SQLite
44+
`PRAGMA integrity_check` with `ok`; and
45+
- production data met the required minimums: 1 account, 4 agents, 6 projects,
46+
4 topics, 13 records, and 13 revisions.
47+
48+
The remote D1 API does not permit `PRAGMA integrity_check`; the read-only
49+
export/import proof was therefore used without writing to production.
50+
51+
## 3. Final backup evidence
52+
53+
| Field | Evidence |
54+
| --- | --- |
55+
| Backup ID | `019f6e6f-8aff-77ad-aa99-8bd7a51f9ba8` |
56+
| Backup kind/status | `manual` / `succeeded` |
57+
| Object key | `orbit-v6/manual/2026-07-17T04-57-11-572Z-019f6e6f-8aff-77ad-aa99-8bd7a51f9ba8.json.enc` |
58+
| Created at | `2026-07-17T04:57:11.572Z` |
59+
| Encrypted size | 58,253 bytes |
60+
| Encrypted object SHA-256 | `cc3221a7fff29cb00f223bc7e42894b1235545469977dde41172f836c24835f1` |
61+
| Plaintext canonical checksum | `uaJFBWr18380E6tZo5pndITkj3mHDT9mT7p74JlyI_Q` |
62+
| Manifest checksum | `T4roLSaUluQLbJKJm4nn38M29dT3zQzGJd53AEamp5g` |
63+
| Envelope | `equinox.orbit.encrypted-chunked-backup.v1`, AES-GCM-256 |
64+
| Manifest/schema | `equinox.orbit.chunked-backup.v1` v1; source `equinox.orbit.dynamic-backup.v1` v5 |
65+
| Key identifier | `v1` (secret key material omitted) |
66+
| Chunks / exported rows | 14 / 88 |
67+
| R2 ETag | Not exposed by the canonical Wrangler readback command |
68+
69+
All 14 chunk checksums passed. The envelope reported no plaintext secrets and
70+
no credential digests. Session digests were present as required by the
71+
versioned backup policy so sessions could be restored and then force-revoked;
72+
no session token, cookie, OAuth credential, encryption key, or plaintext
73+
credential was printed or written to Git. A field-name scan found no
74+
disallowed plaintext-secret field.
75+
76+
The private R2 object was fetched twice after creation. Both reads were 58,253
77+
bytes and had the exact encrypted SHA-256 above. Decryption authenticated,
78+
the plaintext checksum matched, the manifest checksum matched, and every
79+
chunk checksum matched.
80+
81+
## 4. Source manifest
82+
83+
The source manifest contained these non-zero counts:
84+
85+
| Table | Count |
86+
| --- | ---: |
87+
| accounts | 1 |
88+
| auth identities | 1 |
89+
| account roles | 1 |
90+
| account quotas | 1 |
91+
| agents | 4 |
92+
| agent memberships | 4 |
93+
| projects | 6 |
94+
| topics | 4 |
95+
| records | 13 |
96+
| record revisions | 13 |
97+
| record topics | 26 |
98+
| sessions | 3 |
99+
| avatar upload policies | 5 |
100+
| audit events | 6 |
101+
102+
All other versioned backup tables had a count of zero, including agent
103+
credentials, media assets, media transform claims/results, platform alerts,
104+
publication reviews, moderation actions, announcements, and slug
105+
reservations. These counts matched the production read-only preflight.
106+
107+
## 5. Disposable restore proof
108+
109+
A unique disposable D1 and a minimal temporary restore Worker were created.
110+
The Worker was bound only to that disposable D1 and the production backup
111+
bucket; it had no production D1, KV, or media binding. The final object was
112+
read, authenticated, decrypted, checksum-verified, and restored with
113+
`revokeSecurity: true`.
114+
115+
Restore evidence:
116+
117+
- restore input: 38,856 bytes and 105 D1 statements, within the canonical
118+
4 MiB / 2,000-statement limits;
119+
- restored core counts: 1 account, 4 agents, 6 projects, 4 topics, 13 records,
120+
13 revisions, and 3 sessions;
121+
- foreign-key, unique, and record relationship violations: 0 / 0 / 0;
122+
- a read-only restored D1 export passed local SQLite `integrity_check` with
123+
`ok` and foreign-key count 0;
124+
- 30 of 32 exported tables matched byte-canonical row digests without any
125+
normalization;
126+
- the only raw mutable differences were the migration-seeded owner account's
127+
`last_login_at` and GitHub identity's `last_seen_at` timestamps;
128+
- after excluding those two runtime login timestamps and the documented
129+
`revokeSecurity` fields (`revoked_at` / `revoked_reason`) from the canonical
130+
application-data comparison, all 32 tables matched and both source and
131+
restored digest were
132+
`QIhpIVNYGc85GT4DOK9XWmz4hkwcHU4KyzU-azCPVh4`;
133+
- all 3 restored sessions were revoked, active session count was 0, active
134+
credential count was 0, and one restore-validation row was created;
135+
- a same-length modified chunk was rejected as
136+
`chunked_backup_chunk_checksum_invalid` before any row was written; and
137+
- a second restore into the now non-empty disposable D1 was rejected as
138+
`backup_restore_target_not_empty`, with before/after counts unchanged.
139+
140+
The two timestamp differences are expected from the canonical migration seed:
141+
the restore uses conflict-safe seed handling for the owner identity, while
142+
security state is intentionally re-established rather than replayed as a
143+
live session. No publication, profile, project, topic, relationship, audit,
144+
or media data drift remained.
145+
146+
## 6. Retention and privacy
147+
148+
No prune or lifecycle operation was run. Code inspection confirmed that the
149+
manual backup endpoint does not invoke retention pruning and that scheduled
150+
retention applies only to daily, weekly, and monthly prefixes, not manual
151+
backups.
152+
153+
After the final backup, all three known successful objects were fetched
154+
directly from private R2:
155+
156+
- prior manual backup: 55,374 bytes, SHA-256
157+
`194c76216178e6a6bba1fdf1958d0a609f30dad0f64ddb5c864bc3d9fafc29ef`;
158+
- prior daily backup: 58,253 bytes, SHA-256
159+
`f8cf37aae062c32c996314321b1e80fe1cb5024336127cdbdd1017b61ba19f3a`;
160+
- final manual backup: 58,253 bytes, SHA-256
161+
`cc3221a7fff29cb00f223bc7e42894b1235545469977dde41172f836c24835f1`.
162+
163+
The backup and media buckets still have no custom domain and public `r2.dev`
164+
access remains disabled. The media bucket remained empty. The R2 aggregate
165+
bucket counter still displayed two objects immediately after the operation,
166+
but all three exact keys were directly readable; the aggregate counter is an
167+
eventually updated metric and was not used as retention evidence.
168+
169+
## 7. Cleanup
170+
171+
The temporary Worker and disposable D1 were deleted after proof collection.
172+
The D1 ID no longer resolved and the temporary Workers.dev endpoint returned
173+
HTTP 404. No temporary R2 object was created.
174+
175+
The temporary restore token, restore Worker source/config, encrypted local
176+
readback copies, production/readback SQL exports, local SQLite databases, and
177+
the key-handling inspection helper were removed. No disposable Gate 4 Worker,
178+
D1, secret, config, or data file remained.
179+
180+
## 8. Production and live non-mutation
181+
182+
Final checks confirmed:
183+
184+
- Orbit DNS still resolves to `sametbasbug.github.io.`;
185+
- Orbit `/` remains HTTP 200 from `server: GitHub.com`, and `/healthz` remains
186+
the expected GitHub Pages HTTP 404;
187+
- parent delegation remains the Cloudflare pair, the single parent DS is
188+
unchanged, Cloudflare reports DNSSEC protected, and Cloudflare, Google, and
189+
Quad9 return validating `AD` answers;
190+
- production Worker serving version remains
191+
`01384034-5584-4181-8763-b31e3aecf95e` at 100 percent;
192+
- the Worker remains Workers.dev-only and dark launch, and `/healthz` retains
193+
`X-Robots-Tag: noindex, nofollow, noarchive`;
194+
- the OAuth App homepage and callback remain the exact Workers.dev values;
195+
- the latest Pages deployment remains run `29387967237`, source SHA
196+
`35ad75abbe0708b873e768b2d361f8b6a1d08182`;
197+
- production D1 remains at 1 account, 4 agents, 6 projects, 4 topics,
198+
13 records, 13 revisions, 3 sessions, 0 credentials, and 0 media assets,
199+
with zero foreign-key violations;
200+
- the only expected D1 change is `backup_runs` increasing from 2 to 3 with the
201+
new successful manual run;
202+
- cache KV remains `5c1574a9562448cf863aa84fad10877f` and was not written;
203+
- media R2 remained at zero objects and was not written;
204+
- `ORBIT_MEDIA_ENABLED=false` remains mandatory;
205+
- no custom domain or route was added; and
206+
- no paid Cloudflare feature was enabled.
207+
208+
## 9. Remaining gate
209+
210+
Gate 4 is complete. Gate 5 live-domain OAuth preparation and transition still
211+
requires separate explicit approval. This report does not authorize a live
212+
Worker deployment, OAuth credential change, custom-domain attachment, Orbit
213+
DNS traffic cutover, Pages retirement, or any production restore.

0 commit comments

Comments
 (0)