Skip to content

feat: shared tar module and copy operations#297

Merged
DorianZheng merged 5 commits intomainfrom
feat/shared-tar-copy-ops
Feb 25, 2026
Merged

feat: shared tar module and copy operations#297
DorianZheng merged 5 commits intomainfrom
feat/shared-tar-copy-ops

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Summary

  • Extract ~630 lines of duplicated tar pack/unpack logic from box_impl.rs and guest/files.rs into a shared boxlite-shared::tar module
  • Add copy_in/copy_out operations to the Node.js SDK (SimpleBox)
  • Add comprehensive integration tests for copy operations (Rust + Node.js)
  • Remove #[ignore] from VM integration tests; split Node.js test config into unit/integration projects

Test plan

  • cargo test -p boxlite-shared — 472 tests pass
  • cargo test -p boxlite-ffi — 7 tests pass
  • CI integration tests (copy, clone/export/import)
  • Node.js SDK integration tests (copy.integration.test.ts)

…ode SDK

- Extract duplicated tar pack/unpack logic into boxlite-shared::tar
- Add copy_in/copy_out to Node.js SDK (SimpleBox)
- Add comprehensive integration tests for copy operations
- Remove #[ignore] from VM integration tests
- Split Node.js test config into unit/integration projects
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 93.76731% with 45 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
boxlite-shared/src/tar.rs 93.76% 45 Missing ⚠️

📢 Thoughts on this report? Let us know!

- Add install_node_sdk_deps() to setup-common.sh, called from macOS
  and Ubuntu setup scripts after Node.js installation
- Add prettier-missing guard to fmt:node, fmt:check:node targets
- Add node_modules-missing guard to lint:node target
- Apply prettier formatting to Node SDK (copy.integration.test.ts)
Merge install_python_dev_tools into install_python_sdk_deps to install
ruff, pytest, and pytest-asyncio via `pip install -e ".[dev]"` from
sdks/python/pyproject.toml. Fixes pre-push hook failure where
`make test:unit:python` could not find pytest.
Cloned boxes have a multi-level COW backing chain (clone → source → base
image). The seatbelt sandbox only granted read access to the immediate
backing file, missing deeper levels. This caused libkrun EINVAL when
starting cloned boxes on macOS.

Also fix copy test paths from /tmp to /root (tmpfs hides rootfs files).
BoxliteRuntime::new() wipes temp_dir on startup. When all parallel
nextest processes shared the same target/boxlite-test/tmp/ directory,
one test's cleanup would delete another test's in-progress export files
(ENOENT). Create a unique subdirectory per test via tempfile::tempdir_in
on the same device, avoiding cross-device rename issues.
@DorianZheng DorianZheng merged commit 846ad55 into main Feb 25, 2026
21 checks passed
@DorianZheng DorianZheng deleted the feat/shared-tar-copy-ops branch February 25, 2026 05:29
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