Repository navigation
feat(creative): P2 journey - DitherForge/Kromacut/SindriCAD readers, Prepare and export check (draft, depends on #140) - #141
Closed
DVOpenLabs wants to merge 10 commits into
Closed
DVOpenLabs wants to merge 10 commits into
DVOpenLabs wants to merge 10 commits into
Conversation
… 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>
…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>
…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>
|
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
|
…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>
…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>
Owner
Author
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 for review. Depends on #140; do not merge before it. Sol's unresolved BLOCK on #140 (passport export output-directory race, R4-F1) is inherited and still open; the maintainer's draft-only exception for #140 does not extend to this PR. Merge and release are not authorized.
What
P2 creative journey on top of #140: inspect -> Prepare -> exported project for creative-tool 3MFs.
backend/tests/fixtures/creative/PROVENANCE.md./creative/formats,/creative/inspect(refactored),/creative/prepare; Prepare usesservice.convert(..., "preserve")and verifies the exported archive (kept/changed/dropped/added parts by name and SHA-256, paint counts, settings delta). The original is never modified. Responses carry the file name and a generic location label, never a full path.docs/internal/screens/creative/.Prepare fix for Kromacut and DitherForge (latest commits)
Earlier drafts of this PR said Prepare refused both tools' files. Cause found by running Prepare and reading the pinned exporters:
p:path(valid 3MF Core).multipart.validate_archiveonly looked for mesh objects inp:pathfiles and refused with "reference an object that no file defines". The validator now also counts mesh objects the root model defines, keeps root and file object types in separate namespaces, and refuses a root object that contains another object or has a mesh with no triangles. This is a shared structure check (Prepare, Doctor, Ready Now, Model Connect, CLI), so it applies to any file, not only Kromacut.<part id="1">under a component with objectid 2 or more, which the unchanged "part ids match component ids" rule refuses. No producer exemption was added; such a file is inspect-only, the format table carriesprepare_limits, and the chooser shows it. Whether Orca loads that shape is not established.Metadata/plate_*.json(stale slice cache, existing behaviour); the DitherForge Bambu screenshot shows it as dropped.Review
Reviewed artifacts are tied to their commits; earlier approvals do not cover later bytes.
Opus F1 (two stale chooser screenshots recaptured) and F2 (wording test) from the earlier round are fixed in d48d568.
Carried, not fixed (all pre-existing, documented in CREATIVE_COMPAT.md): the
p:pathfile scan has no nested-object or unclosed-object handling and counts<triangles>as geometry (Opus O-R6-F1 / Sol R6-N1, MEDIUM); object ids and types are pooled across referenced files, not checked per file (Opus O-R7-F1, MEDIUM); duplicate root object ids are not refused (O-R7-F2); the nested guard matches the text<object, so a comment containing it is refused (fails closed); the mixed-namespace refusal fires even when no part carries a subtype (fail-closed); no/creative/preparetest for the mixed refusal (covered by construction througheligibility.structure_problems).Evidence labels
fixture-tested only; all archives synthetic, built from exporter source. Python 3.14 locally: full backend run on 8273e14: 5304 passed, 51 skipped, 0 failed (an earlier run at a3b52e8 had one contract-test failure for the new
prepare_limitskey, fixed there); vitest 1490; tsc clean; source independence 0 violations. Python 3.13 confirmation is CI's. No genuine generator export, Snapmaker Orca load, slicer or printer was involved.Known gaps
🤖 Generated with Claude Code