Repository navigation
feat(land): hand back a fixer's protected edit as a ready commit - #409
Merged
Merged
Conversation
Quest-Claim: f897edf676c42097
When validateFix rejects a fixer result for editing protected paths beyond what the base merge carries, the handback now carries the validated resolution in the same form as a refused push, for `quest land apply`. The prompt lets the fixer make such an edit when the mechanical fix needs it, knowing quest land never pushes it. A fix that merges no base is carried as a patch on the PR head itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 3, 2026 03:07
|
Warning Review limit reachedYou'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 49 minutes. View limit details
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. CodeRabbit Verify
|
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.
Finishes and deletes
quest/m0/land-fixer/protected-commit.md.When
validateFixrejects a fixer result because it edits protected paths (.github/,nix/,flake.nix,flake.lock,shell.nix,default.nix,.envrc,.gitmodules, gitlinks) beyond what the base merge carries, the handback now includes the validated resolution as a ready commit. It uses the same format as a refused fork push from moq-dev/quest#358. A maintainer runsquest land apply <pr>, reviews the protected edits, pushes, and re-picks the PR. Protected edits still never land automatically.Changes
validateFixthrows a newProtectedEditerror for the protected-set check.importFixturns it into aFixerRefusalthat carries the resolution, but only while the PR is still at its pinned head, which is the only headquest land applycan rebuild on. The refused-push path inpublishHeadnow uses the sameready()helper. Both the host gate (src/cli/land-fixer.ts) and the queue watcher (src/cli/land-watch-fix.ts) pass the head the PR stands at.FixerRefusalcatch. Before, onlypublishHead's refusal stored one.Resolutionhas an optionalcause: "protected", which is kept in the job state and not in the comment marker. The comment uses it to say why the fix came back and to ask for a review of the protected edits. Thev1marker is unchanged, so existing handbacks still apply.baseset to the head. A head that already contains the base is treated the same way.quest land applythen makes a one-parent commit,Apply the quest land fixer's fix to <branch>, instead of a merge. A fix that merges only part of the base still gets a plain handback.assets/land-fix.mdlets the fixer make a protected edit when the mechanical fix needs one, such as a conflict inflake.nix. It says to prefer fixes that leave protected paths alone, to report the fix asfixed, and to name the protected paths in the reason, since quest land hands it back instead of pushing it. Before, the prompt said "never edit", so the fixer handed these PRs back unresolved and there was nothing to apply.quest land applyandquest land servehelp text.Choices made without asking
proposeFix) still refuses protected edits and opens the halt issue: its branch lives in the upstream repository, where an unreviewed workflow change would run with the repository's secrets.resolution()instead of only covering merges, so a protected fix to a failing check, such as a workflow lint fix, also comes back ready.Conflicts expected
Lockfile merges also edits
assets/land-fix.md. Its plan says a fixer-writtenflake.lockcomes back through this ready commit, which matches the prompt wording here.Checks
just checkandjust testpass locally onbe49fcf6.quest check --base origin/mainpasses.Review
quest review), gpt-6.1-sol, medium effortbe49fcf6fd7a46b3649e95a271d425340f9d922b, round 1Follow-ups
None.
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)