Repository navigation
copper-cloud 0.11.0: canvases served by a linked Canvas Cloud (link proxy + migration) - #3
Merged
Merged
Conversation
…nvas crate
copper-cloud no longer stores canvases itself. crates/canvas (now the engine of the
standalone copper-browser/canvas-cloud server, history preserved there) is removed and
replaced by crates/canvas-link:
- reverse proxy for the unchanged /v1 canvas API (canvases, invites, canvas-links,
mentions, people) inside the instance gate, acting as the signed-in Copper user via the
app key + X-Canvas-User; upstream 401s are never forwarded (clients would sign out),
outages are 502 canvas_upstream / 503 canvas_unavailable, never 404 or empty lists
- WebSocket pipe for /v1/canvases/{id}/ws: upstream handshake first, binary-exact frames,
close codes and reasons forwarded both ways, 1001 on shutdown
- event bridge from /v1/apps/self/events into the per-user SSE (event: canvas)
- user provisioning (batch on link, JIT on unknown_user, 10 min reconcile, outbox for
disable/delete), optional SHA-256 leaf pin for a self-signed Canvas Cloud
- admin API /admin/api/canvas-link (+ /test), canvases list/delete and overview counts
sourced from the link, doctor check, CLI copper-cloud canvas link|unlink|status|sync-users
- migration 0030_canvas_link.sql; 0100-0103 stay byte-identical for existing installs
- /v1/info features gains canvas_link
copper-cloud canvas migrate [--dry-run] [--only ID]... [--replace] [--concurrency N] [--json] streams every legacy canvas (snapshot + updates unsealed with the Copper KEK, members, invites, share-link digests, mention excerpts) as import format v1 to the linked Canvas Cloud, with canvas ids, user ids and share tokens preserved. Each import is verified by document digest and recorded in canvas_migrations; legacy tables are never modified, so rolling back is reinstalling the previous release.
New console page to link, test, re-key and unlink a Canvas Cloud, with event-bridge status and the migration ledger summary. The Canvases page and the Overview tiles show an explicit not-linked / unreachable state instead of numbers.
…ds null names The 10-minute reconcile used to delete Canvas Cloud app users whose Copper account was gone, with their canvases. Restoring an older copper-cloud backup would have wiped newer users' canvases on Canvas Cloud. Reconcile now only counts and logs orphans; deleting them is an explicit operator action: copper-cloud canvas sync-users --prune. canvas migrate provisions empty display names as null, like the link does. The migration test database follows the repo's naming (COPPER_CLOUD_TEST_MIGRATE_DATABASE_URL, copper_cloud_test_migrate).
…Canvas Cloud New docs/canvas-link.md (architecture, proxy and error mapping, WebSocket pipe, event bridge, provisioning, TLS, admin API, CLI, security) and docs/canvas-migration.md (what is preserved, runbook, re-runs, ledger, troubleshooting, rollback). canvas.md and canvas-protocol.md become pointers to Canvas Cloud with their anchors kept; architecture, api, admin-api, operations, security, install, README and deploy/aws updated.
….0 + release notes
…y process; outbox polled every 5 s); pass Canvas Cloud resync on to every Copper stream; migration docs: pre-0.11 dump, digest-500/unverifiable rows, rollback drops the trigger; people scope
…un fails (not 'already') a canvas edited on the old release since its import
…0.1.0 installer inputs; RDS DATABASE_URL; set ops.extra_url_schemes in place
…canvas {kind: resync} (Copper for Mac refreshes its canvas list and invites only on canvas events)
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.
Draft — based on 0.10.0 (addons, merged); this is 0.11.0. Release notes: docs/v0.11.0.md.
Canvases move out of copper-cloud into a linked, standalone Canvas Cloud server.
crates/canvas-link): copper-cloud proxies the unchanged canvas API (/v1/canvases…,/people,/invites,/canvas-links,/mentions, the y-websocket room) to the linked Canvas Cloud as the signed-in user (app key + acting-user header). Coppers need no update. Users are provisioned lazily and by a reconcile loop/outbox; reconcile never deletes (canvas sync-users --prunedoes, explicitly). Canvas Cloud events are bridged into/v1/sync/events. Errors: never forwards an upstream 401; 502canvas_upstreamwhen unreachable, 503canvas_unavailablewhen unlinked; WS keepalive + 1011 on upstream loss.crates/canvasremoved (it lives on in Canvas Cloud, with history).crates/canvas-migrate,copper-cloud canvas migrate): copies legacy canvases (ids, members, user ids, invites, share-link digests, mentions, full update history) into Canvas Cloud via its import API, verified per canvas by document digest; idempotent,--dry-run,--only,--replace. Legacy tables are left untouched (rollback documented).canvas link|unlink|status|sync-users|migrate; doctorcanvas-linkcheck.0030_canvas_link.sql.Validation: fmt, clippy
-D warnings, full workspace tests (native PostgreSQL), portal tsc/eslint/prettier. End-to-end rehearsal on a copy of dev1 (old → link → migrate → diff every user's view → rollback drill) in progress.