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
add generic JsonArrayRegionSpec / with_json_array_region support for repository-owned JSON object paths and arrays
preserve unrelated JSON/JSONC structure, comments, entries, and formatting while adopting each required string exactly once
fail closed on malformed JSON, wrong/duplicate property shapes, ownership drift, unsafe migration, ambiguous hosts, and structural dependencies
support schema-1-compatible regeneration, retirement, and selector-aware catalog checksums
document the shared TOML/JSON array-region contract and cover the CloudBuild EnlistmentRootPaths.SourceRootDirs scenario
Validation
just anvil-pr-fast
cargo test -p cargo-anvil --lib
cargo test -p cargo-anvil --doc
cargo package -p cargo-anvil --list --allow-dirty
full cargo test -p cargo-anvil reached one timing-sensitive pre-existing recipe test failure; the exact failed test passed on immediate rerun: cargo test -p cargo-anvil --test recipe_contracts examples_run_honors_default_exclusions_and_explicit_selection -- --exact --nocapture
The fast tier is partial; the pull-request checks should run the remaining complete Anvil groups.
❌ Patch coverage is 99.80861% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.4%. Comparing base (6912269) to head (5de06f6). ⚠️ Report is 6 commits behind head on main.
Non-Path selectors bypass this check, but region_host_paths (run.rs:632–649) expands them to Cargo manifests, not JSON hosts. The catalog therefore accepts a specification that either selects no files or sends Cargo.toml through the JSON planner. Reject manifest selectors during catalog validation, add regression cases for all three variants, and clarify that the design doc's manifest-selector support applies only to TOML.
Validate marker topology for array and neighboring regions
An ordinary region planned after the array can introduce nested or unpaired sentinel comments in its generated body. The generic planner returns the splice without checking its marker topology (managed_region.rs:252–259), and this validator accepts it if JSON properties and array bounds remain unchanged. For example, a settings body containing a separate nested marker pair can be written, but the next run refuses it in validated_regions. Validate the proposed marker topology here and add an array-first, neighbor-second composition regression.
Disambiguate allocator-api2 edges introduced by the latest rallocator update so full locked Cargo metadata and Anvil impact analysis succeed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88b757e4-6a54-4e4f-8610-8513b39e6e41
Keep host-level JSON scanner provenance for edited ownership records that survive empty-catalog retirement, and normalize JSON array templates before indentation so emitted bytes and checksums agree across mixed line endings.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8376a896-87c7-4843-9294-13c381602580
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
An unresolved incomplete-scan defect and cross-cutting ownership transitions require correction and final human review of data-preservation guarantees.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Source-span editing and persistent ownership changes need human review, with preservation and retirement defects still unresolved.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Handle bare CR separators in shared region helpers
crates/cargo-anvil/src/region.rs:1434
Bare-CR detection needs matching support in the shared separator helpers. separate_region (line 822) still checks only LF, while leading_newline_len and trailing_blank_line_len recognize only LF/CRLF. Appending an ordinary region to user\r therefore adds two CR separators, and retirement leaves user\r\r\r because neither separator is recognized. The equivalent LF and CRLF lifecycles restore the input. Update these helpers together and add an append/retire regression; the new bare-CR test starts with existing markers and does not exercise insertion separators.
Use suffix-based TOML history classification, make the missing JSON host test explicitly absent, and add structural dotfile retirement coverage.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8376a896-87c7-4843-9294-13c381602580
Restore a fallible XML stack-pop path so unmatched closing tags produce a repository diagnostic instead of panicking, with direct regression coverage.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8376a896-87c7-4843-9294-13c381602580
A splice failure here does not establish that the template is invalid on its own. For example, a tracked ordinary region can contain "old" with a repository-owned comma immediately after its closing sentinel. Opting it into the structural API with the valid body "new", leaves two adjacent commas. Refusing the write is correct, but InvalidGeneratedJson makes run.rs:1231–1233 tell the user that the template is invalid independently of repository content, even though it passed validate_spec. Classify this as a composition/ownership conflict, retain the parser detail, and direct the user to reconcile separators at the ownership boundary rather than repair the standalone template.
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
JsonArrayRegionSpec/with_json_array_regionsupport for repository-owned JSON object paths and arraysEnlistmentRootPaths.SourceRootDirsscenarioValidation
just anvil-pr-fastcargo test -p cargo-anvil --libcargo test -p cargo-anvil --doccargo package -p cargo-anvil --list --allow-dirtycargo test -p cargo-anvilreached one timing-sensitive pre-existing recipe test failure; the exact failed test passed on immediate rerun:cargo test -p cargo-anvil --test recipe_contracts examples_run_honors_default_exclusions_and_explicit_selection -- --exact --nocaptureThe fast tier is partial; the pull-request checks should run the remaining complete Anvil groups.