Repository navigation
feat: Phase 2 portfolio tracks P2, P4-P8 with shared local-path guard (R4-F1 fixed via #147; Opus+Sol approved f40a18d) - #140
Merged
Conversation
Refuses UNC/device paths in any slash style, links to them and oversize files before a track opens a user-supplied path. Best-effort, not a sandbox: validation and use are separate steps (documented in the module). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reads 3MF-family containers from creative tools and reports what Studio can and cannot verify. Fixture-tested; DitherForge, Kromacut and SindriCAD have no reader yet. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Imports calibration results into a local store and compares runs. Fixture-tested. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Local library of multi-part assemblies with hashed members. Fixture-tested. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Compares sliced outputs (3MF/gcode) as advisory differences. Fixture-tested. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Records which files a job came from and verifies them against the bytes that exist now. Registers the passport group in u1convert/cli.py. Documents the export -o output-directory race as a known limit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Checkpoint and restore of workspace state with expected_revision conflict detection, plus bounded GET-only monitoring context. Mock-service-tested; no hardware. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Tests that exercise several tracks together (creative, calibration, variants, passport, localpath); kept together because they import across tracks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The source-independence check flags /home/<name> literals. The fixture is synthetic; the path now sits under /mnt/vault. Test-literal only, made after the round-5 freeze and disclosed in the PR. 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
|
…and assemblies tracks The routes make no network request of their own, but a mapped network drive or a path redirected as described in PASSPORT.md is read through the operating system; say so instead of "never touches the network". Narrow the PASSPORT.md evidence label to what the tests exercise. Docstrings and docs only; the passport export directory race stays open and documented. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
…ect the write (R4-F1) export -o validated the path, then created the temp file and published it by path, leaving a window in which the directory or an ancestor could be swapped (for example for a link to a network share). snapstudio_core/safe_publish.py now opens the directory once and publishes through that pin: dir_fd-relative create + no-replace link on POSIX (real path checked from the descriptor); on Windows a directory handle without FILE_SHARE_DELETE, final path read from the handle and checked, then create + no-replace rename. Tests: tests/passport/test_export_publication.py swaps the directory at the moment of first file creation and fails on the previous write path (passport lands in the swapped-in directory); the legacy appears-before-publication test now targets the new primitive on each platform. Full backend suite: 5241 passed expected (one test updated), run before the test edit 5240 passed + that test. Only the Windows pin was exercised locally; POSIX is covered by Linux CI. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n export publication (R4-F1 review) Sol BLOCK on 082af75: (HIGH) an actor with write access to an empty pinned directory could install a junction in place; (MEDIUM) unresolved /proc/self/fd paths passed the network check; (MEDIUM) temp names grew with the destination name and backslashes were rejected on POSIX. Windows now creates the final name exclusively with sharing off, re-checks the pinned directory for a reparse point, verifies the file handle's own final path equals the verified directory plus name, and discards the empty file on a mismatch. Linux reads the descriptor path with readlink and fails closed. Temp names are bounded and independent of the destination; separator rejection is platform-aware. Tests: in-place junction and ancestor-swap regressions (fail on the old write path); obsolete no-hard-link rename test removed (path gone), covered by the retargeted destination-appears test. Verified: tests/passport + review-fix tests 82 passed on Windows; full backend 5242 passed before removing the obsolete test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t failed cleanup (R4-F1 review round 2) Sol BLOCK on c824bf0: case-folded final-path comparison could accept a junction to a differently-cased sibling on a case-sensitive volume (HIGH); POSIX name test still required a backslash to be rejected (MEDIUM); discard ignored a failed disposition (LOW). Compare exact canonical paths; make the separator test platform-aware (POSIX accepts a backslash); raise when the empty file cannot be removed. Verified: passport + review-fix tests 82 passed on Windows. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…path (R4-F1 review notes) Opus/Sol approved 3e89141 with notes: no test reached the file-handle final-path check, because the junction test fires before the directory re-check, and the docs wrongly called the window untestable. Add a no-op _before_create seam and two Windows tests (junction set exactly before the create is refused and leaves the decoy empty; a failed disposition is reported). Correct the docs. Verified: tests/passport 62 passed on Windows. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…its of export publication Opus and Sol approved f84829a with this note. Doc-only; no code or test change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(passport): pin the export output directory (R4-F1)
… conflicting TD (approved Codex lane applied onto #140) Applies the Opus+Sol approved Calibration tree c5c1052 (PR #148) to the #140 branch. Resolves Sol SOL-F1 on the #140 aggregate: the synthetic default physical readings and owned filaments are no longer submitted or saved as observations. Verified: byte-identical to the approved manifest (8 files); backend calibration 34 passed; desktop 1485 passed; tsc clean. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Opus review OP140-1 on the #140 aggregate: the unsafe_xml guard was a byte-substring check, so UTF-16/UTF-32 (NUL-interleaved, auto-detected by expat) bypassed it and entities were expanded. The model is now decoded as UTF-8 (BOM allowed), any NUL is refused, DOCTYPE/ENTITY are refused case-insensitively on the decoded text, and the parser gets UTF-8 bytes. Verified: new tests fail on the old guard (6 of 12) and pass now; tests/creative + test_scene_hostile 86 passed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DVOpenLabs
marked this pull request as ready for review
November 14, 2026 18:00
DVOpenLabs
added a commit
that referenced
this pull request
Nov 14, 2026
This was referenced Nov 14, 2026
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. Opus APPROVE-WITH-NOTES (rounds 5 and 6); Sol BLOCK on the documented passport export output-directory race (rounds 5 and 6). Maintainer authorized this draft PR with the finding open. Merge and release are not authorized.
What this is
Phase 2 portfolio tracks P2, P4, P5, P6, P7 and P8 plus the shared local-path guard and cross-track tests, on one branch. Base is
integ/phase2at 5d4a27b (the head of #138). #138 and #139 are untouched. It is one PR becausetest_review_fixes*.pyimports several tracks at once; commits are ordered (guard, then one commit per track, then cross-track tests, then one test-literal fix) and only the head is claimed green. Intermediate commits were not run individually.Unresolved blocking finding (Sol, round 5, still open)
backend/snapstudio_core/passport_cli.py:143, R4-F1, severity HIGH, BLOCK:Sol's suggested fix: platform-appropriate directory-handle operations that stop path substitution redirecting creation, publication and cleanup. Rechecking the pathname alone would narrow the window, not close it.
Opus rates the same point LOW (same-user, CLI only, the HTTP routes write no passport, final publish never overwrites, the written data is file names and hashes). Fable and Astra both advised accepting the documented limit for development PRs. The maintainer chose to document it (Option A) and to open this draft with the finding open. This is risk acceptance for a draft, not a fix. The limit is stated in
passport_cli.py(module docstring),localpath.pyanddocs/internal/PASSPORT.md("Path checks are not a sandbox"). Not implemented: Fable's optional post-mkstempre-check (_reaches_network(tmp)plusst_devcomparison); its Windows volume-id behaviour is unverified.Remaining review notes (all carried, none fixed here)
Opus, round 5: O5-1 drive-letter check is not strictly ASCII (
localpath.py:37); O5-2 no test for a folder or trailing-separator-o(bad_output); O5-5 names containing:or a separator need an explicit--path; O5-6 on Windows-o input.3mf:streamis unverified (pre-existing). Addressed in 0c1a8c6 (docs/docstrings only, reviewed in round 6): O5-3, O5-4 and Sol R5-F2. Round 6 (Opus APPROVE-WITH-NOTES; Sol BLOCK = R4-F1 only, delta clean) adds optional notes: O6-1localpath.py:81,102docstrings still sound absolute about leaving the machine; O6-2CREATIVE_COMPAT.md:36and the CLI messageStudio reads local files only.(passport_cli.py:47;test_review_fixes_r2.py:78asserts that substring) are not yet aligned; O6-3 two reflowed lines are long. Earlier Opus LOW notes: no per-request hashing budget (O2-5), an invalid gradient row is still emitted as a recipe (O2-7), tool-numbering and copy polish (O2-9).Known accepted limits: mapped drive letters and mounted network filesystems look local; a file growing during hashing is not interrupted; real Windows symlink/junction behaviour is untested (simulated-link tests cover the walk).
Verified environments and limits
.gitand pass in a real checkout. Counts differ from Windows only through platform skips.tests/passport/test_passport_chain.py(/home/...to/mnt/vault/...) to satisfycheck-source-independence, which now reports 0 violations; the 20 tests in that file pass. That commit and the wording commit 0c1a8c6 were reviewed in round 6 (Opus APPROVE-WITH-NOTES; Sol BLOCK only on R4-F1, no new delta finding). CI on 0c1a8c6 is checked separately.Portfolio inventory (from the plan and the code)
Product tracks P1 to P8; foundations and this integration are supporting work. Entry points are in the desktop Studio+ navigation group (Advanced mode) unless noted.
POST /creative/inspectu1convert passport export/import/verifyThe portfolio is not complete: the creative readers and P8 cross-track coverage remain gaps.
🤖 Generated with Claude Code