Skip to content

feat(land): rebuild a conflicted lockfile from the base's copy - #410

Merged
kixelated merged 4 commits into
mainfrom
quest/m0/land-fixer/lockfile
Nov 3, 2026
Merged

kixelated merged 4 commits into
mainfrom
quest/m0/land-fixer/lockfile

Conversation

@kixelated

@kixelated kixelated commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Completes quest/m0/land-fixer/lockfile.md.

Summary

The fixer's only lockfile rule was "regenerate lockfiles/generated files", which didn't say which side to start from. On moq-dev/moq#7318 a fixer merge rebuilt bun.lock from the PR's side and reverted moq-dev/moq#7443's glob/minimatch advisory fix.

  • assets/land-fix.md gets a ## Lockfiles section, linked from the allowed-fixes list. When merging the base leaves a lockfile conflicted or stale, the fixer:

    1. resolves the manifests;
    2. runs git checkout base -- <lockfile>;
    3. runs the package manager's minimal resolve (bun install, cargo update --workspace or a build, uv lock, go mod tidy), and never cargo generate-lockfile, bun update, uv lock --upgrade or a bare cargo update;
    4. reapplies the PR's lockfile-only bumps with a pinned update;
    5. checks that every lockfile change, and every manifest change the tool makes itself, traces to the PR.

    The reason names the rebuilt lockfiles. The fixer hands back, quoting the output or diff, when the rebuild fails, a change doesn't trace to the PR, or the two sides' versions disagree (for example, the PR pins below the base's security bump).

  • flake.lock stays protected. Now that moq-dev/quest#409 lets the fixer make a protected edit and hands it back as a ready commit, the section says such an edit to flake.lock follows the same rule: rebuild it from the base's copy, with nix flake lock as the minimal resolve. This is what the quest's Plan on main asks for.

  • test/land.test.ts asserts the new prompt wording and checks that the old "regenerate lockfiles" rule is gone.

  • Deletes the quest. The epic README now records where the decision landed. The m0 listing drops "lockfile merges", and also "protected edits as ready commits", which feat(land): hand back a fixer's protected edit as a ready commit #409 finished.

Choices made without asking

  • The PR's lockfile-only changes. The quest only said to "apply the PR's manifest changes". Rebuilding from the base's copy would silently drop a change the PR made to the lockfile alone, such as a targeted cargo update -p. Step 4 reapplies it with a pinned update. If the base also moved that package, the base's version wins when it is at or past the PR's; otherwise the fixer hands back.
  • Scope. The rule covers a lockfile that is conflicted or out of date with the merged manifests after a base merge. A clean, consistent merge is left alone.
  • moq-dev/quest#409 (protected-commit) landed first. Its protected-path paragraph is kept as is, with this PR's "rebuild lockfiles as Lockfiles says" in the allowed-fixes list. moq-dev/quest#406's ## Flaky tests section follows ## Lockfiles.

Review

  • Reviewer: Codex, gpt-6.1-sol, medium effort (quest review --base origin/main --branch quest/m0/land-fixer/lockfile, round 1 of a new session)
  • Head: 2f136d4, a merge of origin/main (d7ef15e) resolving conflicts with moq-dev/quest#409 and moq-dev/quest#406 in assets/land-fix.md and quest/m0/land-fixer/README.md, plus a modify/delete conflict on the quest file, which stays deleted. The resolution also rewords the flake.lock line and drops the stale m0 listing phrase (see Summary), and adds a test assertion for the new wording. Since that changes the diff, the head was reviewed again rather than exempted.
  • Findings: none

Earlier rounds (Codex, gpt-6.1-sol, medium) covered e24581a and 08b8fa2, with no findings either time.

Local checks on 2f136d4: just check and just test pass (995 passed, 2 skipped; 505 passed). quest check --base origin/main is OK.

Follow-ups

None.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 2 commits November 2, 2026 18:54
The fixer's only lockfile rule was "regenerate lockfiles", with no side
to start from, so a fixer merge on moq-dev/moq#7318 rebuilt bun.lock
from the PR and reverted the base's advisory fix. The prompt now gives
a Lockfiles procedure: take the base's copy, run the package manager's
minimal resolve against the merged manifests, reapply the PR's own
lockfile-only bumps with a pinned update, check every change traces to
the PR, and hand back when it cannot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title The fixer rebuilds a conflicted lockfile from the base's copy feat(land): rebuild a conflicted lockfile from the base's copy Nov 3, 2026
@kixelated
kixelated marked this pull request as ready for review November 3, 2026 03:01
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a42d7b2f-4ca3-4815-8db5-02a3bdf8c60d
Commits

Reviewing files that changed from the base of the PR and between d7ef15e and 2f136d4.

Files selected for processing: 5
  • assets/land-fix.md
  • quest/m0/README.md
  • quest/m0/land-fixer/README.md
  • quest/m0/land-fixer/lockfile.md
  • test/land.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@kixelated
kixelated added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 4c259ba Nov 3, 2026
9 checks passed
@kixelated
kixelated deleted the quest/m0/land-fixer/lockfile branch November 3, 2026 17:23
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