Skip to content

Add atomic stack render command - #5

Merged
konojunya merged 1 commit into
mainfrom
jj/add-stack-render
Sep 3, 2026
Merged

Add atomic stack render command#5
konojunya merged 1 commit into
mainfrom
jj/add-stack-render

Conversation

@konojunya

Copy link
Copy Markdown
Member

背景

Task 18 completes the initial native CLI surface by exposing deterministic standalone SVG rendering through the same pinned Stack Engine used by check and fmt.

実装方法

  • add stack render <FILE> for SVG-only standard output
  • add stack render <FILE> -o <OUTPUT> for same-directory atomic file output
  • preserve existing output permissions and support atomic creation of new output files
  • keep all diagnostics on stderr and preserve SVG for warning-only source
  • return exit 1 without creating or replacing output for Stack errors
  • return exit 2 for argument, input, output, stream, or engine operational failures
  • reject identical input and output paths
  • reuse the bounded, exclusive temporary-file writer shared with stack fmt

テスト方法

  • cargo +stable fmt --check
  • cargo +stable test --locked
  • pinned specification formatter conformance
  • cargo +stable clippy --all-targets --all-features --locked -- -D warnings
  • RUSTDOCFLAGS="-D warnings" cargo +stable doc --no-deps --locked
  • coverage: 91.10% regions, 98.48% functions, 93.12% lines
  • stable release build and command help/version smoke
  • Python standard-library XML parse of release-binary SVG
  • Rust 1.85 tests and Clippy
  • process tests for native-engine byte equality, warning output, existing/new atomic files, compiler-error no-output, missing paths, and read-only output cleanup

Review 視点 / 懸念点

  • confirm stdout remains an SVG-only machine-readable stream
  • confirm an existing output must remain unchanged on source or host failure
  • atomic replacement currently relies on same-directory rename, matching the initial macOS/Linux delivery scope

@konojunya
konojunya merged commit 56c869e into main Sep 3, 2026
2 checks passed
@konojunya
konojunya deleted the jj/add-stack-render branch September 3, 2026 08:17
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