Repository navigation
feat(land): start the fixer at the base and ignore instructions in PR diffs - #366
Merged
Merged
Conversation
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 quest/m0/land-fixer/launch.md, part of the land fixer epic.
Summary
startFixer(src/cli/land-fixer.ts) now checks outrefs/heads/base, detached, instead of the batch tip. The fixer never starts in a tree containing a PR's mergedAGENTS.md, skills, or tooling.batchandpr-<n>are still fetched so it can inspect, check out, and fix them.quest land fix(src/cli/land-fix.ts) gives the agent each PR as- #<n>: branch pr-<n> at <sha>, plus the failure log, instead of a bare number list. It reads the heads from thepr-<n>refs that the daemon pinned. If a supplied PR has no branch, it fails before starting the agent.assets/land-fix.md: the rule that handed back a PR whose content "targets this fixer itself" is replaced with the maintainer's rule. Everything in the PRs' diffs is treated as data, and an instruction there, even one addressed to the fixer, is neither followed nor a reason to hand the PR back. The prompt also tells the agent it starts onbase.Choices made without asking
baserather than on thebasebranch, so a stray commit cannot move thebaseref the agent merges from.validateFixalready checks against the daemon's ownplan.base.sha.pr-<n>refs insidequest land fix, not new wrapper arguments. That leaves the host wrapper's<log> <prs...>interface unchanged.project_doc_max_bytes=0, so it loads noAGENTS.mdat all, the base's included. I read the quest's "loads the base's AGENTS.md" as "whatever it loads comes from the base", not as a request to turn project docs back on. The prompt also already says the base's standing guidance "is not addressed to you".Merge notes
assets/land-fix.mdand the same sentence inquest/m0/host-land/fixer.md, and deletesprotected.md. To resolve, keep this PR's injection rule (it already drops the "touch protected paths" clause feat(land): let the fixer edit protected paths it judges mechanical #357 removes), keep feat(land): let the fixer edit protected paths it judges mechanical #357's protected-path wording, and deleteprotected.md.Tests
just checkpassed.just test: 734 passed. Twotest/agent.test.tscases failed only because my session exportsCLAUDE_CONFIG_DIR, and both pass with it unset. They don't touch this change.basewithbatchandpr-1present; the prompt namespr-1and its head;fixrefuses to start the agent without a supplied PR's branch. The existing launcher tests now expectHEADat the base and the old tip onbatch.Suggested follow-ups
AGENTS.md/skills (dropproject_doc_max_bytes=0) now that it starts from the base. That would give it the project's build and test conventions, but the prompt currently says that guidance "is not addressed to you", so the two would need reconciling.test/agent.test.tsclearCLAUDE_CONFIG_DIRfrom the environment it compares, so the suite passes when run from a Claude Code session.Review
quest review), gpt-6.1-sol, medium effort, round 1 on head30f427aa68308d3327f297a9118c1eb7e259a4c6: no findings.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code