Repository navigation
Conversation
CamWight
force-pushed
the
coedit-wire-5184
branch
3 times, most recently
from
October 30, 2026 12:47
a63d8c9 to
e84db5e
Compare
This was referenced Oct 30, 2026
CamWight
force-pushed
the
coedit-wire-5184
branch
from
November 1, 2026 05:53
e84db5e to
90d2b5b
Compare
CamWight
force-pushed
the
coedit-wire-5184
branch
2 times, most recently
from
November 5, 2026 16:35
8d3825e to
38461fc
Compare
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
CamWight
force-pushed
the
coedit-wire-5184
branch
5 times, most recently
from
November 8, 2026 17:57
8cf42e9 to
3e0bf6c
Compare
…elta (tangency-labs#5184) `solidcraft-collab-wire` (L1: pure, no I/O, builds for wasm) sends a display mesh as one chunk per B-rep face, keyed by the face's persistent name and a SHA-256 content hash: positions on a 1 µm grid as zig-zag delta varints, octahedral 2 x 16-bit normals, delta-coded corners, deflated. Each face is written in one canonical form (triangles from their least corner, sorted, equal corners welded), so a face that comes out of the mesher the same on the grid keeps its hash. A shape keeps its faces in name order and is keyed by the hash of their hashes, so its hash doesn't follow the B-rep's face numbering; a body is a shape hash and an exact f64 placement. A shape message is whole or a delta: the hash of a shape the receiver holds, the names of the faces it loses, and the faces that are new or changed. Unchanged faces cost nothing, and faces the sender `knows` the receiver holds (`Held`: its shapes and chunks) go as their hash. A receiver without the base refuses the delta, so the sender sends the shape whole. On the sensor enclosure, moving the USB cut-out costs the Case 5.3 KB instead of 9.9 KB (reference mesh), and the unchanged Lid 40 bytes instead of 1.2 KB. The crate doc says which mesh each audience gets: the reference mesh for collaborators who hold the design, the Normal display mesh for Viewers; a body imported as a mesh goes as one face, as its mesh already comes. Every decoder takes hostile bytes: caps on faces, vertices, triangles, inflated size (a decompression bomb stops at 64 MiB) and face names (the plan's 4 KiB), counts checked against the bytes left before anything is reserved, varints in their shortest form, coordinates within geom's 1e12 mm, corners in range, what the receiver's store hands back checked against the hash asked for, removed names its base lacks refused, as are names out of order or twice and a face both removed and changed. Cutting a face reserves room for at most the vertex cap. Fuzzed with testkit's mutator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…angency-labs#5184) A box, the box filleted and a short modelled thread, at reference and display quality: the triangles come back, and each edit sent as a delta rebuilds the shape after it. The sensor enclosure measurement stays ignored, now printing its longest face name, and a second ignored measurement prints what an imported 10k-triangle mesh costs as one face, a face per triangle and without its normals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…checks; a face can travel alone (tangency-labs#5184) The combined network and security review's changes to the mesh codec: - every shape message and face blob starts with its inflated length; nothing inflates past it (one byte past at most) and anything but exactly that length is refused, so a receiver knows what a message costs before inflating it (`declared_size`); - at most 4 MiB of face names in one shape; - a display bound of 1e9 mm for positions and placements (the GPU path's own), a triangle that repeats a corner is refused, and the encoder leaves out triangles with no area on the 1 um grid (the M6 thread's reference mesh has 144); - a face can travel alone as the blob a receiver pulls by id (`FaceChunk::to_blob` / `from_blob`). Cutting a blob longer than one frame into pieces is the blob layer's rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CamWight
force-pushed
the
coedit-wire-5184
branch
from
November 9, 2026 00:27
3e0bf6c to
fc4a9d0
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Live co-editing: a compact way to send a body's display mesh to the others in a session, whole or as changes (#5184)
Nothing changes for the person using SolidCraft yet: nothing sends it. Live co-editing needs to show everyone the model as it changes, so a body's display mesh has to travel between computers quickly. This adds a compact format for that mesh, sent whole or as only what changed.
A live co-editing slice (#5184, claim #7547): how a body's display mesh travels to the other people in a session. Nothing sends it yet.
#7682 (the testkit crate) has landed, so this PR holds only its three own commits: the crate, its acceptance checks in CI, and the review's changes to the wire (sizes, names, coordinates, triangles, single faces).
Changes a default: no
The codec
solidcraft-collab-wireis in layer L1: pure, no I/O, and it builds for wasm.Chunks: it sends a display mesh as one chunk per B-rep face, keyed by the face's persistent name and a SHA-256 content hash.
Shapes and bodies: a shape keeps its faces in name order and is keyed by the hash of their hashes, so its hash doesn't follow the B-rep's face numbering. A body is a shape hash plus an exact f64 placement.
Deltas: a shape message is either whole or a delta. A delta carries:
Unchanged faces cost nothing. Faces the sender knows the receiver holds go as their hash. A receiver without the base refuses the delta, and the sender then sends the shape whole.
On the sensor enclosure: moving the USB cut-out costs the Case 5.3 KB instead of 9.9 KB (reference mesh), and the unchanged Lid costs 40 bytes instead of 1.2 KB.
One face alone: a face can also travel by itself as a blob (
FaceChunk::to_blob,from_blob), so a receiver can ask for one face it lacks. Splitting a blob longer than one frame into pieces is the transport's job (W1).Which mesh goes where: the crate doc says which mesh each audience gets. Collaborators who hold the design get the reference mesh; Viewers get the Normal display mesh. A body imported as a mesh goes as one face, as its mesh already comes.
Hostile bytes
Every decoder takes bytes from someone else:
Tests
Checks
Latest, on this head
38461fce6over main8312bf0cb, local, Windows,--profile ci:fmtandxtask layerspass; the workspace builds with all targets; clippy-D warningsoncollab-wireandengine, all targets, passes;solidcraft-collab-wire: 16 passed, 0 failed; the engine's size checks on real bodies: 1 passed, 2 ignored (the two measurements that only print). No full gate on this head.What this rebase changed:
Cargo.tomlandCargo.lock: main pinned solidcore's crates beside this crate's line; both are kept, the crate at the workspace's 0.40.0-rc.2.xtask layersanddocs/architecture.md: main addeddynamicsat L1 besidecollab-wire; one L1 row names both.Vec3: the crate takes it fromsolidcore_record, where it now lives, withsolidcraft_geom's methods through its prelude, and depends onsolidcore-recordfor it.Session::world_state()now returns aResult; the size checks on real bodies unwrap it, as tests do.Before, on
8d3825e10over main6cee7a91b, local, Windows,--profile ci:fmtandxtask layerspass;cargo check --lockedoncollab-wireandenginewith their tests passes; clippy-D warningson both, all targets, passes;solidcraft-collab-wire: 16 passed, 0 failed; the engine's size checks on real bodies: 1 passed, 2 ignored (the two measurements that only print). No full gate on this head.What this rebase changed: the testkit commits went, as #7682 landed, and the crate's line in
Cargo.lockis at the workspace's 0.30.1, in the commit that adds it. Nothing else conflicted.Before:
Local gate (Windows) over the whole co-editing stack (#7682, #7683, #7684 and this PR together) on main 66bd64c:
Then each PR's branch was rebased onto main ab67126. The only conflict was two new tests side by side in
doc/src/tests.rs; both are kept. The new crates' Cargo.lock lines are at the workspace's 0.27.1. On that main, each branch builds with its lock as committed (cargo check --locked --tests), and each slice's own tests pass again:solidcraft-doclibrary, 517 passed;collaborationtests, 33 passed;solidcraft-collab-wire, 16 passed, and the engine's size checks on real bodies.