Skip to content

feat: integrated Phase 2 build - Creative/Prepare (#141), cross-track recovery (#142), Lumina (#139+#143), Recovery/Passport slice - #144

Merged
DVOpenLabs merged 39 commits into
mainfrom
integ/demo-20261102
Nov 14, 2026
Merged

DVOpenLabs merged 39 commits into
mainfrom
integ/demo-20261102

Conversation

@DVOpenLabs

Copy link
Copy Markdown
Owner

Draft: integrated Studio+ demo build (do not merge)

Combines, on top of #140 (feat/portfolio-integration), the reviewed stacks #141 (Creative to Prepare), #142 (cross-track recovery) and the Lumina chain #139 + #143, then adds one product slice and two small test-scope fixes. Component PR heads are untouched. Draft only; the passport BLOCK R4-F1 on #140 and its draft-only exception are unchanged and this PR does not close it.

What is new here (beyond the component PRs)

  1. test_ext_routes fix: the broken-module test only passed on feat: Phase 2 portfolio tracks P2, P4-P8 with shared local-path guard (R4-F1 fixed via #147; Opus+Sol approved f40a18d) #140 because routes_engines was absent; with all eight track modules it raised nothing. It now drops the package attribute first and pins the failing module.
  2. Runner scope: CliRunner resolved its executable with resolve(strict=True), which raises WinError 1920 on the Microsoft Store python.exe alias; the pin tests also could not copy that alias. Fixed in the runner (_resolve_existing) and the test helper, with new tests that fail on the old runner. The generic runner is still not used by the Lumina HTTP journey.
  3. Product slice: Recovery checkpoints the open job's real files (original, prepared; sliced only when linked) with a visible list and explanations, sample data kept separate and a failed checkpoint never shown as success. Passport keeps its fields and report across sidebar navigation in memory only (no localStorage, not kept across a restart), tied to the project, marked stale on input change, cleared when another project opens, and in-flight builds/checks are cancelled on every project change. Creative Prepare links its copy to the job (output.local_path is the one response field that names a location), guarded by a job-ownership epoch so a late or overtaken Prepare cannot replace a newer link.

Evidence labels

fixture-tested (synthetic archives) and mock-service-tested (loopback printer and Lumina stand-ins). No genuine export, no Orca run, no real Lumina, no hardware. Not all eight tracks are complete.

Verification

Desktop tsc clean, vitest 1526 passed / 0 failed (22 new interaction tests in workspaceContinuity.test.tsx, mutation-checked); engine tests pass on Store Python 3.13; source independence 0 violations; privacy scan clean. Journey B run entirely through the UI against synthetic files on head 22de807: 12/12 steps, 0 page errors. Paired Opus + Sol delta reviews, five rounds on the product slice; final round (22de807): Opus APPROVE-WITH-NOTES, Sol APPROVE-WITH-NOTES.

Known limitations (tracked): job record and the session's open file can differ when Creative prepares a project that is not the session's open file; Prepare paths are not canonicalised (relative vs absolute spelling); re-linking the identical prepared path of an unverified saved job keeps its old sliced entry.

🤖 Generated with Claude Code

DVOpenLabs and others added 30 commits October 31, 2026 13:51
Review repairs: timeout/cancel return within a finite allowance even if a descendant holds
the pipes; an unexpected poll exception stops the owned child; output scan refuses OSError,
junction/reparse points, and is bounded (10000 entries, depth 32); script entry points refused;
single-pass placeholder substitution; real loopback boundary test.
Test environment note: os.kill(pid, 0) is not a liveness probe on Windows (it calls
TerminateProcess and raises OSError); the test now uses a non-signalling probe.

Verified: backend/tests/engines 17 passed, 1 skipped (symlink creation not permitted for this account).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…root

Review R1 (Sol): the output root itself was never checked before traversal, so an engine could
swap its empty output directory for a link and have outside files reported as job artifacts.
The root is now checked like every entry; a non-directory root is refused as a failed scan.

Verified: backend/tests/engines 18 passed, 1 skipped (symlink creation not permitted for this account).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review M1 (Opus): the placeholder validator had the (a*)+ shape; 24 characters took 1.1 s and
each two more characters quadrupled it. Validation is now linear, with a timing-bounded test.
Review M2/L1/L6/P1: documented as known limits with the usability label.

Verified: backend/tests/engines 19 passed, 1 skipped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ing port

Test 11 runs inspect -> Prepare -> passport CLI verify -> recovery checkpoint -> mutation -> restore preview on synthetic archives, with a loopback sentinel that fails on any non-GET or unapproved request. The monitoring UI now takes a validated port (default 7125; integer 1-65535, server-side check unchanged). Mock-service-tested; no hardware.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… formats, and Prepare with export verification

Readers written from the exporters' documented output shape (read on 2026-11-01; formats only, no AGPL/GPL code or samples copied). Explicit supported-format table with manual-only ImageMap and Lumina. POST /creative/prepare writes a new file through the existing Prepare path, never next to the original, and verifies the export (kept/changed/dropped/added parts) and that the original is unchanged. DitherForge and Kromacut synthetic files are refused by the existing structure check; reported, not relaxed. Fixture-tested only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 11 scope; capture refuses a visible local path

The shared host mock now records the real verb (including HEAD and OPTIONS) and a test proves the sentinel sees write verbs and unapproved paths. RECOVERY.md lists what test 11 does not cover. The recovery capture fails if the page text shows a temp or user path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cy, and Lumina-compatible service route and view

CliRunner stops the whole tree it started (POSIX process group; Windows kill-on-close Job Object), removes the job directory after a failed run, and refuses a slicer-named executable. POST /engines/lumina/{formats,status,generate} and a Studio+ view with an explicit format choice; output is a new file, no path is returned. Mock-service-tested against a synthetic loopback service; no real Lumina exercised. Depends on #139 only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rding and docs from review

Prepare now returns the output file name and a generic location label only. Export bucket headings show totals and say when a list is capped. Restores the narrowed network wording, aligns the 400 text with the UI label, says what a manual-only format choice means, reconciles the DitherForge provenance and distinct screenshots.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…CE, CONNECT, extensions)

Review follow-up: parse_request records any parsed request whose verb has no do_<VERB> handler before the server refuses it, so the test 11 sentinel cannot miss it; a test sends TRACE, CONNECT and an extension verb.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ecutable, not by name alone

Sol HIGH: a renamed copy of a slicer passed the basename check. Name rail kept;
unpinned executables now refused (executable_not_approved). Tests: renamed copy
refused, pin admits, wrong/malformed pin refused, name rail wins over pin.
Verified: engines+ext_routes+routes_engines_lumina+foundation 865 passed/2 skipped (py3.14).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…imits

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ckage

O1 refuse the NT passthrough prefix (\??\ and /??/) in the local-input guard.
O2 refuse the Windows launcher in a frozen (packaged) build instead of starting the sidecar.
O3 match slicer names by token (Snapmaker_Orca, bambu-studio, UltiMaker-Cura, AppImage names).
O10 run the launcher with -I. O6 evidence-label wording in ENGINES.md.
Deferred, not fixed: O4 close race, O5 default-folder edge, O7 timeout flake, O8 magic bytes, O9 partial file.
Verified: engines+ext_routes+routes_engines_lumina+foundation 872 passed/2 skipped (py3.14).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…N2 (path-leak test can fail on Windows)

N1 chooser no longer says 'detected automatically' next to a manual-choice refusal.
N2 inspect route test uses assert_no_local_path (JSON-escaped and slash forms).
Verified: creative+journey+ext_routes backend, vitest 1488, tsc clean (py3.14).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…orms (N3)

Masked path-labelled inputs are accepted only when computed transparent; needles add work/files dirs, /Users/, /home/ and a drive-letter pattern. Syntax-checked; capture not re-run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test_noop_when_stdin_is_not_a_pipe replaced os.fstat for the whole process and
test_noop_on_non_posix / the EOF test replaced os.name / os._exit the same way, so any
other caller of os.fstat during the test (pytest, the runtime) saw a stub with no
st_size. CI hit "AttributeError: 'RegularFileStat' object has no attribute 'st_size'".

The tests now give the lifeline module its own os view (a module-local shim) and use a
real temporary regular-file descriptor through start_parent_lifeline(fd=...). The
no-watcher assertion and the real pipe/EOF coverage are unchanged. Test-only; no
product code, skip or suppression.

Verified: py -3.13 -m pytest tests/test_lifeline.py -> 4 passed, 1 skipped (Windows
local). The original CI failure did not reproduce locally, so the process-wide stub is the
cause by inspection, not by reproduction; the Python patch version is not established as
the trigger. Linux and CI results come from this PR's checks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…test

Review of the first fix found the shim raised TypeError when an override repeated a key
(`_exit`), so the Linux EOF test errored before running. Attributes are now merged into a
dict first. The non-POSIX test passes a real pipe fd so only the os.name check can stop
the watcher.

Verified: Windows py -3.13 pytest tests/test_lifeline.py -> 4 passed, 1 skipped. Linux
(WSL Ubuntu, Python 3.12.3, _lifeline.py + this test in an isolated directory, pytest) ->
5 passed, so the pipe/EOF test ran.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…DitherForge's generic export is inspect-only

Kromacut writes its colour layers as mesh objects in the root model and builds its assembly from components
without p:path, which 3MF Core allows. multipart.validate_archive only looked for mesh objects in p:path files,
so Prepare refused every Kromacut file with "reference an object that no file defines". It now also counts mesh
objects the root model defines: a component without p:path needs a root mesh object, one with p:path still needs
one in that file. A root object with a mesh but no triangles is refused.

DitherForge's generic-path exporter writes part id 1 under a component with objectid 2 or more (also for a single
mesh). The check that part ids match component ids is unchanged and has no producer exemption, so that shape stays
refused. The format table now carries prepare_limits and the chooser shows them. The Bambu-path export (outer
object 2, component objectid 1, part id 1) is accepted and prepared.

Evidence is fixture-tested: all archives are synthetic, built from bambu.go, export3mf.go and export3mf.ts at the
commits in PROVENANCE.md. No genuine export was available.

Verified: backend 5299 passed, 51 skipped (Python 3.14); vitest 1490 passed; tsc clean; source independence 0
violations. New tests cover input, inspection, Prepare and exported archive for Kromacut and the DitherForge Bambu
path, the unchanged generic-path refusal, and four validator negatives.

Screenshots: the two stale format-chooser images were recaptured with the conditional wording (N1), and three new
journey screens were added; kromacut-prepare-refused.png is replaced by kromacut-prepare-result.png. Captured with
capture.mjs against the parent 1e6fdfe plus the source changes in this commit; later edits were tests and docs only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The runner docs said the name rail matched only the basename or "slicer". The code also matches any token of the name
(split on - _ . and space), refuses before identity admission, and exempts sys.executable from the pin. State that,
and state what a pin does and does not mean: bytes not behaviour, read at construction only, never derived from an
untrusted request, and the packaged-Windows and frozen-POSIX cases. List the optional runner changes that are still
not done (re-hash before each run, a start test for a pinned non-interpreter binary, narrowing sys.executable in a
frozen POSIX build). Documentation only; the Lumina HTTP routes still do not call the runner.

Verified the name examples against _executable_policy_refused (orca_v2 and my-cura.bin refused, mycuracao allowed).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…efuses nested root objects

Review of d48d568 found two holes in the new root-model scan. Root and p:path-file objects shared one id-to-type
map, so a root mesh with the same id could hide a real role mismatch in a file or cause a false refusal. The type
check now resolves each part through its own component: a component without p:path uses root types, otherwise file
types. The root scan also credited a mesh nested inside an object to the outer object; 3MF Core does not nest
objects, so a root object that contains another object is now refused and not counted as geometry.

Tests: two collision regressions, a nested-object validator test and a Prepare test that refuses it and writes
nothing; all four fail against d48d568's validator. The namespace test now scans a real external file, the
assembly-reference test uses the assembly's real id, and the exported archive is re-validated. The formats contract
test allows the optional prepare_limits key. CREATIVE_COMPAT.md no longer says the p:path check is per file (ids
are pooled across the referenced files, as before).

Correction to d48d568: its message quoted the backend full run (5299 passed) from before prepare_limits was added to
the format table, which broke test_supported_formats_contract. This commit fixes that test. Full backend run on this
tree: 5302 passed, 1 failed (that test, since fixed), 51 skipped, Python 3.14; creative tests re-run after the fix:
84 passed. Source independence 0 violations.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e root model and a file

Round-5 review of a3b52e8 found that namespace selection was per numeric id: one assembly with a pathless and a
pathed component of the same id made every matching part resolve through root types, which hid a type mismatch in
the file. A part record names a number, not a namespace, so Studio cannot tell which component it describes. The
validator now refuses that shape ("referenced both from the root model and from a file") instead of guessing, which
makes the per-component type resolution unambiguous.

Test: the reviewer's scenario as a regression; it fails without the change. CREATIVE_COMPAT.md states the refusal and
that the p:path file scan did not receive the nested-object and unclosed-object handling the root scan has (carried,
older behaviour).

Verified: full backend run on this tree 5304 passed, 51 skipped, 0 failed (Python 3.14); creative and multipart
subsets re-run after the change: 117 passed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…onent references by (file, id)

The validator's p:path file scan lacked the nested-object and unclosed-object handling the
root scan had, counted an empty <triangles> container as geometry, ignored duplicate ids and
pooled object ids and types across files. One shared scan (_scan_objects) now reads the root
model and every p:path file, references resolve by (file, id), repeated ids, non-numeric ids,
truncated object tags and components without an objectid are refused, and tag text inside
an XML comment is ignored. The root/file same-id refusal is kept; several files that
disagree on an id's type in one assembly are refused too.

Verified: 13 of 27 new tests fail on the previous implementation (the rest pin valid shapes);
full backend 5331 passed, 51 skipped; source independence 0 violations. Synthetic fixtures only;
no genuine export, Orca run or hardware.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… effective object types; refuse unreadable object tags

Sol R7-F1: a commented-out component reached the root component reader and refused a valid archive.
Sol R7-F2: an omitted type (3MF default model) disagreed with an explicit model across files.
Opus O-R7-F1: an object whose id is not the first attribute was never scanned.

Verified: new regressions fail on 2cfcf94 source (3 of 4 checked); full backend 5336 passed, 51 skipped;
source independence 0 violations. Synthetic fixtures only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… all eight track modules exist

The test passed on #140 only because routes_engines was absent there (the patched find_spec made that import
raise). With every track module present, 'from . import routes_passport' returns the package attribute and never
reads sys.modules, so nothing raised. Drop the attribute first. Verified: 59 passed; the test fails when
_missing_ok swallows the ImportError.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…correct the comment (review notes F1-F3)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the interpreter's real file

CliRunner resolved its executable with Path.resolve(strict=True), which raises a raw OSError (WinError 1920) on the
Microsoft Store python.exe alias although it stats, opens and runs. _resolve_existing falls back to ordinary
resolution and requires the link to stat to a real target; a missing path still raises FileNotFoundError.
The pin tests copied sys.executable with copy2/copyfile, which cannot read the alias at all; they now copy the real
interpreter file (sys.base_prefix) and raise, never skip, when none is readable.

Verified: tests/engines + route tests 89 passed, 2 skipped on the Store 3.13 (was 21 failed) and on a regular 3.14
install; the three new alias tests fail on the previous runner. The generic runner is still not used by the Lumina
HTTP journey.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…port across navigation, tied to its project

Recovery: the primary action checkpoints the open job's files from the existing job record (original, prepared copy,
sliced G-code only when linked), lists what will be tracked and why anything is unavailable, and reports a failed
save as a failure. The made-up sample checkpoint is a separate, labelled section. Creative Prepare links its copy to
the project's job (output.local_path is the one response field that names a location; the UI uses it only to link).
Passport: fields and report live in an in-memory session store (no localStorage), record the project they were built
for, are marked stale when the file fields change, and are cleared when a different project is opened.

Verified: desktop tsc clean, vitest 1512 passed (8 new jsdom interaction tests over the real views and a fake local
service; two mutations of the new behaviour were caught); backend creative route suites 60 passed; source
independence 0 violations; privacy scan of the diff clean.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DVOpenLabs and others added 4 commits November 2, 2026 09:33
…ce slice

- Prepare links the normalised path that was actually sent (quoted 'Copy as path' input), only validated copies, and
  only while no newer Prepare or project change has taken over the job; a skipped link is said on the page.
- Recovery and Passport offer a saved job only once it is active this session (verified), not just read from storage.
- Passport: fields are owned by the project they were typed under; builds and checks carry generations so a late
  older answer never overwrites a newer one (also across leaving and re-entering the page); stale also covers
  recipes and mappings; the checkpoint caveat is skipped when the preview refresh failed.
- Runner docstring states what the alias fallback does and does not detect.

Verified: desktop tsc clean, vitest 1520 passed (new tests mutation-checked: five behaviours each fail a test when
removed); engines + ext-routes + creative routes 135 passed; source independence 0 violations; privacy scan clean.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…port invalidation independent of the page

- A Creative Prepare links only if the job has not changed hands since it started (project, prepared copy or sliced
  file changed by anything else, A -> B -> A included) and no later-started Prepare has already linked; a newer
  Prepare that failed or was refused no longer suppresses an older valid copy. Copies that were written but not linked
  are listed on the Creative page. Re-preparing the same saved job activates it.
- Passport clears and cancels in-flight work from a store-level subscription to the project, so a change that happens
  while the page is not open (A -> B -> A) cannot leave a report or fields behind.
- Runner inline comment aligned with its docstring.

Verified: tsc clean, desktop vitest all passed; 5 new interaction tests; mutations (epoch check, newer-linked check,
off-page clear) each fail tests; source independence 0 violations.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…restore test resets

Sol R3-F1: a build started from fields typed with no project open was not
cancelled by A -> B -> A off-page. The store subscription now bumps the
build/verify generations on every project transition (owned content is still
cleared only when it belongs to another project).
Tests: delayed-build regression (build gated independently, mutation-checked),
ordinary-Prepare test starts from an existing project so only the prepared path
changes, and the beforeEach resets that a trailing comment had swallowed run again.
Verified: tsc clean, vitest 1526 passed / 0 failed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d test reaches the generation bump

Opus R4 O4-1: useSession kept the previous test's open file, so trackJob saw no
file change, no project opened, and the build was dropped by the old project
identity check instead of the bump. beforeEach now resets useSession; the test
asserts the project is open and the typed fields are unowned. Mutation check
(restoring the old hasContent guard) now fails the test in a full-file run.
Verified: tsc clean, vitest full suite passed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@DVOpenLabs DVOpenLabs changed the title Draft: integrated Studio+ demo build (do not merge) feat: integrated Phase 2 build - Creative/Prepare (#141), cross-track recovery (#142), Lumina (#139+#143), Recovery/Passport slice Nov 14, 2026
DVOpenLabs and others added 2 commits November 14, 2026 13:47
…guard (OP144-1)

generators._xml used a byte-substring DOCTYPE/ENTITY check that UTF-16/32 documents
bypass. container.parse_xml is now the single guard (decode, refuse NUL, check decoded
text) and generators uses it. Tests: object part / config in every encoding, plus a
structural test that no creative module parses XML outside the helper.
Verified: backend 5545 passed, 53 skipped (full history).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…SOL-144-2); doc local_path exception

An unreadable DitherForge/other object part may hold the only painted geometry, so
triangle/paint totals from the remaining parts are reported as unknown (None) with an
unknown entry, not as a measured absence. Docs name the output.local_path exception.
Verified: backend 5545 passed, 53 skipped (full history).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant