You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cargo-each): generalize JSON record execution - #351
Add a strict cargo-artifacts file mode that replays rendered diagnostics and executes test-profile artifacts from their package roots.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The parser can schedule artifacts from an unfinished trailing build and accepts paths that are relative on the host, causing execution from the wrong working directory.
Adds Cargo artifact input as a fifth execution mode for cargo-each, reusing its existing command executor to run test artifacts from their owning package directories.
Changes:
Adds --cargo-artifacts-file with message parsing, metadata validation, and rendered diagnostic forwarding.
Adds artifact-specific placeholders and integrates concurrency, timeouts, and failure handling.
Documents the new contract and adds fixture-backed parsing, validation, and execution-plan tests.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.5%. Comparing base (8181344) to head (1ab66cc). ⚠️ Report is 4 commits behind head on main.
Replace the Cargo-specific artifact adapter with nested JSON placeholders, Boolean JSON filters, and record-derived working directories.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The native-test example uses the wrong runner, and several new negative tests rely on partial error assertions that do not verify the intended diagnostic or rejected input.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Malformed quoted filters can silently select no records and report success, while a new filesystem-dependent test remains enabled under Miri isolation.
name="a""b" survives tokenization as one atom, and the reused decoder treats its unescaped interior quotes as literal text instead of rejecting the malformed value. This can silently select no records and report success. Validate that the value is one complete quoted string before decoding the supported escapes, and add regression coverage for interior quotes and valid escaped quotes.
Use an embedded JSON fixture to avoid filesystem access under Miri
crates/cargo-each/src/run.rs:1381
This new test goes through json_lines::load to File::open (src/json_lines.rs:39), introducing runtime filesystem access into an otherwise in-process filtering/planning test. The crate's other file-backed JSON tests explicitly exclude that path under Miri isolation (for example, file_only_json_mode_returns_input_context_before_loading_cargo below), but this one remains enabled. Feed the checked-in fixture through include_str! and --json-lines so the same assertions remain available under Miri without filesystem access.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because the filter parser silently accepts malformed quoted values, potentially turning a configuration error into a successful no-op.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because malformed quoted filter values can silently exclude records and produce a successful no-work run instead of a usage error.
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
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.
🤖 ## Summary
{json:target.name}--json-filterBoolean expressions with typed scalar equality and presence checks--json-work-dirand--json-work-dir-parentfor record-derived invocation directoriesCargo artifact example
Validation
cargo test -p cargo-each --quietcargo clippy -p cargo-each --all-targets -- -D warningsjust anvil-pr-fast