Pixel Labdeveloper docs

Design record · 2026-10-rust-engine

The port queue (PR 2)#

The queue plan.md step 7 runs from (Workflow, "The queue"). A unit is ready when everything in its Needs is merged into feat/rust-engine-port. The main session updates this file in each unit's merge commit, so the branch shows where the port stands.

Status: ready, running, merged, escalated (an S unit taken over by the main session). Tier: S is a Sonnet subagent, O the main session (or an Opus subagent when two O units are ready at once).

A unit's checks: cargo fmt --check, cargo test for its crate, its ported suite with every test name kept, and for the units that produce outputs (compile, preview, the commands) PIXELLAB_GOLDENS=<dir> cargo test --test corpus with no differences. The goldens come from node scripts/goldens.mjs --out <dir>.

UnitNode → RustTests portedNeedsTierStatus
U1iso.mjs → iso.rsiso cases of engine.test.mjsPR 1Smerged
U2svg.mjs, starter.mjs, starter-palette.mjs → svg.rs, starter.rs, starter-palette.jsonsvg and starter casesPR 1Smerged
U3engine.mjs → engine.rs (validate, resolve, sceneAt)validation casesPR 1Omerged
U4depth.mjs → depth.rsdepth.test.mjsU1, U3Omerged
U5motion.mjs → motion.rsmotion cases of engine.test.mjs and depth-motion.test.mjsU3Omerged
U6edit.mjs → edit.rsedit cases of engine.test.mjsU3Smerged
U7compile.mjs → compile.rs (budgets, lossless, git subprocess)compile.test.mjs, corpus SVGsU2–U5Omerged
U8preview.mjs → preview.rspreview cases of render.test.mjs, corpus PNGsU1, U3Smerged
U9the rest of engine.test.mjs→ tests/engine.rs, in two units by describe blockU3–U6Smerged
U10errors.mjs, argv.mjs, params.mjsparams.test.mjsPR 1Smerged
U11jsonrpc.mjsits cases in servers.test.mjsPR 1Smerged
U12state.mjs, activity-summary.mjsactivity-and-proposals.test.mjsU10Smerged
U13document.mjs → document.rs (resolution, manifest, R9's problem)document.test.mjsU10Smerged
U14session.mjs, open-docs.mjs, context.mjssync.test.mjsU3, U6, U12, U13Omerged
U15merge.mjs, diff.mjsmerge.test.mjsU3Omerged
U16watch.mjs → watch.rs (polling, D2)its cases in sync.test.mjsU13Smerged
U17scene-ops.mjsscene-ops.test.mjs, groups.test.mjsU3, U4Smerged
U18layer-ops.mjslayers.test.mjsU17Smerged
U19motion-ops.mjsmotion-commands.test.mjsU5Smerged
U20render.mjsrender.test.mjsU7, U8Smerged
U21registry.mjs, cli.mjs, help.mjs, bin/pixellab.mjs → registry.rs, cli.rs, help.rs, main.rshelp.test.mjs, commands.test.mjsU10Smerged
U22commands/scene.mjs, scene-edit.mjsscene parts of edit-commands.test.mjsU14, U17, U21Smerged
U23commands/scene-layers.mjs, scene-motion.mjsU18, U19, U21Smerged
U24commands/object.mjs, object-edit.mjsmap-set.test.mjs, object parts of edit-commands.test.mjsU14, U21Smerged
U25commands/doc.mjs, document.mjs, proposal.mjs, check.mjs, art.mjs, common.mjsart-commands.test.mjsU7, U14, U15, U21Smerged
U26commands/chat.mjs, chat-context.mjschat.test.mjsU14, U21Smerged
U27depth-edit.test.mjs, the program parts of depth-motion.test.mjs→ program testsU22–U24Smerged
U28serve.mjs, server-stdio.mjs, server-mcp.mjsservers.test.mjs, transcripts replayedU11, U14, U16, U21Omerged
U29migrate.rs, document migrate (D3, R8)new tests: every refusal, notes, colorNotes, the legacy source/ folder, the SVG check refusing, --to, in place; its output equals the bootstrap's for the corpus apart from notesU7, U13, U25Omerged

Signatures settled by the main session#

  • U3 settles engine.rs's render internals before U4, U5 and U8 start on them.
  • U14 settles context.rs (Ctx) and session.rs (Session) before the command units (U22–U26) start; their briefs give the final methods.
  • The main session wrote commands/common.rs and commands/object.rs (object.list, show, render) as the pattern for the command units; U24 is left with object-edit.mjs. crates/pixellab/tests/corpus.rs compares every read command with the Node goldens.
  • U10 took the core of registry.rs (new, groups, call); U14 took sortScene, stayed and pathChanges (sorting.rs).
  • U21 settles registry.rs, argv.rs, params.rs and help.rs; U22–U26 add their commands to the files in commands/ only.