test(e2e): make snapshot tests self-contained#302
Merged
branchseer merged 2 commits intomainfrom Mar 28, 2026
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ad91c93 to
786331f
Compare
c4118ad to
e185c1a
Compare
Replace shell string steps with structured argv format in all e2e test
fixtures. Steps now use `argv` arrays instead of shell command strings,
with optional `comment` and `envs` fields:
```toml
# Simple:
steps = [["vt", "run", "build"]]
# With metadata:
steps = [{ argv = ["vt", "run", "test"], comment = "cache miss", envs = [["MY_ENV", "1"]] }]
# Stdin piping via vtt helper (no shell):
steps = [["vtt", "pipe-stdin", "from-stdin", "--", "vt", "run", "read-stdin"]]
```
Processes are spawned directly without a shell wrapper, avoiding shell
interference with signal handling and exit codes. Programs are resolved
from `CARGO_BIN_EXE_<name>` env vars. Shell redirects are replaced with
`vtt write-file` and `vtt pipe-stdin` helpers.
Also documents Conventional Commits format for PR titles in CLAUDE.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e185c1a to
ef2c4b4
Compare
Replace all `node` usages in e2e test fixtures with vtt subcommands: - `node -e "process.exit(N)"` → `vtt exit N` (new subcommand) - `node read_node_fs.js` → `vtt print` (test only needs a successful command) - Remove `replay-logs-chronological-order` fixture (complex node script) This eliminates the dependency on `node` being in PATH for e2e tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ef2c4b4 to
80980a2
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.

Why
Enable cross-compiling e2e snapshot tests and running them on another
machine (e.g. Windows VM via cargo-xtest). The target machine has no
guarantees about installed tools — no bash, no node, no system PATH.
Tests must be fully self-contained, relying only on the
vtandvttbinaries built by cargo.
Summary
Make e2e snapshot tests fully self-contained by removing all external
dependencies (bash, node, system PATH). Tests now spawn
vt/vttdirectly without a shell wrapper.
argvarrays in all fixturescommentandenvsfields to step config for metadata and env varsCommandBuilderinstead ofsh -cpipe-stdin,write-file,cp,mkdir,rm,exitnodeusage in fixtures with vtt equivalentsreplay-logs-chronological-orderfixture (required node)INSTA_REQUIRE_FULL_MATCH(incompatible with remote execution)🤖 Generated with Claude Code