Repository navigation
factory: organization canvases on the server, through canvas-core (E4) - #2638
Merged
Merged
Conversation
santoshkumarradha
force-pushed
the
w2/e4-canvas
branch
2 times, most recently
from
November 13, 2026 22:06
61c1ddb to
36ec7db
Compare
…s-core
/v1/canvases*: list, make, rename, trash, delete, share, snapshot, ops
since a seq, write ops, versions and restore, marks, assets, and moving a
laptop canvas in once. Every read and write goes through canvas-core's
`canvas rpc` (factory/canvasrpc), so nothing about a canvas is
re-implemented in Go; the server decides who may (the access core: view,
comment, edit, full) and stamps every op as person:<handle>. Two people
never write one frame at once: a write into, or a hand on, a frame another
person's hand is on answers 409 with who and the ops not yet seen.
canvas.changed {id,seq,by} and canvas.removed reach only those who may
view. A server with no `canvas` program keeps no canvases and leaves the
routes off.
Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
… in hello
Seventeen methods, one request each, built from checked ids; canvas-core
shapes pass through unchanged. An asset's bytes travel raw to the server
and base64 to the desk; a canvas answer may be up to 64 MB. A write into
another person's frame is conflict whose detail carries frame, holder,
seq and the ops not yet seen. canvas.changed {id,seq,by} and
canvas.removed are relayed as factory.org_changed.
Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
The deploy builds a static linux/amd64 `canvas` from the desk repository (cargo-zigbuild off linux/amd64) or takes CANVAS_BIN, and install.sh puts it at /usr/local/bin/canvas, where the server looks for it. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
… tests' itoa Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
…ho may view it The canvas registers its presence kind with E3a's presence (part = frame id) once presence routes exist; canvas-core's program path is read through internal/env. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
A frame's document (canvas/<id>/frame/<fid>, E7) is found when the caller may view the canvas and the frame is on it, read with view, written with edit, and dropped when a batch, a restore or a canvas delete removes it. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
E1's #2637 brought OrgShare and orgShareList into appwire; the canvas methods now use them instead of a second copy. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
santoshkumarradha
force-pushed
the
w2/e4-canvas
branch
from
November 13, 2026 22:16
36ec7db to
381550c
Compare
Member
Author
|
Gate on 381550c against work/teams c3f8fb1 (checked with ls-remote): |
santoshkumarradha
marked this pull request as ready for review
November 13, 2026 22:16
santoshkumarradha
added a commit
that referenced
this pull request
Nov 16, 2026
…operator plumbing Both pins reached the tree without a registry line (#2638, #2609), which left TestRegistryCoversEveryUserFacingEnvironmentPin red on santosh/work. Each is a path an operator sets for one server or one launch, never a row a project file could write. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
santoshkumarradha
added a commit
that referenced
this pull request
Nov 17, 2026
…operator plumbing Both pins reached the tree without a registry line (#2638, #2609), which left TestRegistryCoversEveryUserFacingEnvironmentPin red on santosh/work. Each is a path an operator sets for one server or one launch, never a row a project file could write. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
santoshkumarradha
added a commit
that referenced
this pull request
Nov 17, 2026
…operator plumbing Both pins reached the tree without a registry line (#2638, #2609), which left TestRegistryCoversEveryUserFacingEnvironmentPin red on santosh/work. Each is a path an operator sets for one server or one launch, never a row a project file could write. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
ZeroPoint95
pushed a commit
that referenced
this pull request
Nov 24, 2026
…s-core (E4) (#2638) The server execs canvas-core's `canvas rpc` for every canvas read and write; routes /v1/canvases*, access through the E1 core, per-person frame hands with a 409 conflict, canvas.changed/removed events, Personal-canvas import, canvas presence, frame text as E7 documents, engine factory.org_canvas* and the org_canvases hello word; the demo server ships `canvas`. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
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.
What
Lane E4 (WAVE2 §3 E4, as amended by §4). With this, an organization's canvases live on its
codeaf factory serveserver. This is the demo's critical path./v1/canvases*. List, make, rename, trash, delete, share (owner, shares, private), snapshot, ops since a seq, write ops, versions and restore, marks, assets (PUT/GET by sha), and moving a laptop canvas in once (/import, idempotent per person and local id).canvas rpc(newinternal/factory/canvasrpc; desk PR Agent-Field/codeaf-desk#433, CONTRACT §10), one request at a time per canvas. The index of owner, shares and private isfactory-canvases.jsonbeside the workstreams. Each canvas is a canvas-core directory under<store>/canvases/.name_onlyrow.person:<handle>of the signed-in caller. A hand is{t:"lease",frame,actor:"",until:"hand"}; the server fills in the caller and wall clock + HAND_SECS. A hand for someone else,member/wait/proposal/suggestops, and reserved meta keys are refused with 400.{error:"<handle> is working in this frame", reason:"conflict", frame, holder, seq, ops}, whereopsare the records afterbase_seq.canvas.changed {id,seq,by}andcanvas.removed, filtered by view throughitemAudience.factory.org_canvases,_get,_create,_update,_delete,_snapshot,_ops,_apply,_versions,_version_create,_restore,_marks,_mark_create,_shares,_import,_asset_get,_asset_put, using the names the desk (W3) codes to. The hello word isorg_canvases. On a 409,error.detailcarries frame, holder, seq and ops.factory.org_changedrelays the canvas kinds with seq and by.OrgRequestgains a raw body and a larger answer bound (64 MB) for canvas answers.canvasprogram (beside codeaf, on PATH, or$CODEAF_CANVAS_BIN) logs it once and leaves the routes off.PATCH marksis absent because canvas-core has no mark update.scripts/demo-org-server-deploy.shbuilds a static linux/amd64canvasfrom the desk repo (cargo-zigbuild off amd64) or takesCANVAS_BIN.install.shputs it at/usr/local/bin/canvas.Contract
docs/design/app-v3/PROTOCOL.mdhas the method rows, a paragraph for them and the event kinds.~/work/teams-wave/WAVE2.md§4 has a new "E4 as built" section; that file is outside the repo and was edited in place.Proof
canvas(3.8 MB, about 45 s to build) runs headless, and a Go program execs it JSON-in/JSON-out, error shape included.canvasbinary (CODEAF_CANVAS_BIN=…), with santosh and abir signed in through the org fixture (newWSOrg):TestTwoPeopleWriteOneCanvasInDifferentFrames: each holds a hand on their own frame and both write. Each sees the other's ops, stamped with the writer. abir writing into santosh's frame gets 409 naming santosh, with the unseen ops. abir cannot take santosh's hand, and the refused write never lands.TestCanvasRolesAndPrivacy,TestCanvasEventsReachOnlyItsPeople,TestCanvasImportMovesALaptopCanvasInOnce, andTestCanvasOpsAreThePersonsOwn(no binary needed).TestOrgCanvasesForwardToTheServercovers routes, raw asset bytes in both directions, and the 409 detail.TestOrgCanvasMethodsRefuseBadParamsBeforeSendingcovers bad params.internal/appwirepasses, including the protocol-document gate.make pr-ready BASE=origin/work/teams: see the comment below.Not in this PR
presenceKinds["canvas"]): added when E3a lands.canvas/<id>/frame/<fid>.internal/e2e/org_two_people_test.go) exists onwork/teamsyet.