fix(install): regenerate conflicted lockfiles#843
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds detection for Git merge conflict markers in on-disk lockfiles, registers a new warning code, and updates install to warn once and regenerate the lockfile (skipping the conflicted file) while preserving prior error reporting for other parse failures. ChangesLockfile Conflict Marker Recovery
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
a00e403 to
c2f6007
Compare
Greptile SummaryThis PR makes
Confidence Score: 5/5Safe to merge — the conflict-marker recovery path is narrowly scoped to Fix/Prefer modes and The detection logic is correct and appropriately conservative (requires the standard No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(install): regenerate conflicted lock..." | Re-trigger Greptile |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/install.bats (1)
33-64: 💤 Low valueConsider verifying warning emission.
The test successfully verifies the behavioral outcome (lockfile regeneration), but doesn't confirm that the warning code
WARN_AUBE_LOCKFILE_CONFLICT_MARKERSwas actually emitted.For integration-level testing, the current approach is reasonable. If you want stronger coverage, you could add an assertion on the warning output.
💡 Optional: Add warning verification
run aube install assert_success + assert_output --partial "conflict markers" run grep -E '^(<<<<<<<|=======|>>>>>>>)' aube-lock.yaml🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/install.bats` around lines 33 - 64, The test "aube install regenerates lockfile with merge conflict markers" verifies lockfile cleanup but doesn't assert the warning was emitted; update the test to capture/install command output and assert that the warning identifier WARN_AUBE_LOCKFILE_CONFLICT_MARKERS (or its human-readable message) appears in stdout/stderr after running `aube install` (the second run that triggers regeneration) so the integration test verifies both behavior and the expected warning emission.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/install.bats`:
- Around line 33-64: The test "aube install regenerates lockfile with merge
conflict markers" verifies lockfile cleanup but doesn't assert the warning was
emitted; update the test to capture/install command output and assert that the
warning identifier WARN_AUBE_LOCKFILE_CONFLICT_MARKERS (or its human-readable
message) appears in stdout/stderr after running `aube install` (the second run
that triggers regeneration) so the integration test verifies both behavior and
the expected warning emission.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3b6c219d-8ff2-454b-aad5-ec0324e2c18d
📒 Files selected for processing (6)
crates/aube-codes/src/warnings.rscrates/aube-linker/src/materialize.rscrates/aube-lockfile/src/io.rscrates/aube-lockfile/src/lib.rscrates/aube/src/commands/install/resolve.rstest/install.bats
c2f6007 to
b893ea1
Compare
|
Addressed the review feedback:
Validation after the change:
This comment was generated by Codex. |
b893ea1 to
75e2d41
Compare
|
Fixed the failing Validation:
This comment was generated by Codex. |
Summary
WARN_AUBE_LOCKFILE_CONFLICT_MARKERSfor the regeneration pathaube installrewriting a conflictedaube-lock.yamlfixtureTesting
cargo fmt --checkcargo test -p aube-codescargo buildBATS_NUMBER_OF_PARALLEL_JOBS=1 test/bats/bin/bats -j 1 --filter 'aube install regenerates lockfile with merge conflict markers' test/install.batscargo clippy --all-targets -- -D warningscargo test -p aube-linker package_name_testsNote:
mise run test:bats test/install.batscould not run in this environment because GNUparallelis missing, so the focused BATS regression was run directly with-j 1.This PR was generated by Codex.
Note
Medium Risk
Changes prefer-frozen lockfile parse behavior on merge artifacts; other parse errors still fail, but wrong marker detection could mask corruption or trigger unintended re-resolve.
Overview
Install now treats a lockfile that still has Git merge conflict markers (
<<<<<<<,=======,>>>>>>>) as recoverable in Fix/Prefer frozen modes instead of failing parse: it emitsWARN_AUBE_LOCKFILE_CONFLICT_MARKERS, skips using the broken file asexisting, and continues so the lockfile is regenerated frompackage.json. Detection lives inaube_lockfile::active_lockfile_has_conflict_markers;--lockfile-onlydedupes the warning when pre-parse already warned.Linker:
is_safe_package_componentis moved above thepackage_name_testsmodule (clippy / module order only).Tests: BATS covers full install and
--lockfile-onlyrewriting a conflictedaube-lock.yamlfixture.Reviewed by Cursor Bugbot for commit 75e2d41. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Warnings
Tests