Repository navigation
feat(land): the quest watcher bumps quest's pin in other repositories - #550
Conversation
Quest-Claim: 53fc21a70e48944d
…haned builds when pruning Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quest-Claim: 7268442731a54c2f
…' into quest/m0/pin-sync
quest land watch --bump <owner/repo> keeps each target's flake input on the watched repository at the watched base: it opens or updates one quest-bump PR per target as the App, with the input unpinned from flake.nix, locked by Nix, and quest init and quest check --fix run with the new quest, then lands it through quest merge's path. requirements() reads no rules from a private repository on GitHub Free instead of failing on its 403. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # quest/m0/queue-watcher/own-queue.md
… finishes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ungated bases Run the bump's quest from a directory of its own with --root, refuse a checkout with a symlink that leaves it or dangles, require every check suite that ran a check to complete before merging an ungated bump, and unpin a URL in any case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Design change: Continue. Judge only the latest workflow run per workflow and event, so a run cancelled because a newer run replaced it counts as replaced, not failed. The maintainer picked this at the round-3 design checkpoint through /quest-unblock on 2026-11-08 (rejected: stop merging bumps on ungated bases; rethink the targets; merge as is). (Written by Claude Opus 5.5) |
…s replaced Resolves conflicts with the per-base watcher and log pruning. settle now judges only each workflow's latest run per event, and a cancelled run yields to a newer run of its workflow from another event (a shared cancel-in-progress group across push and pull_request), along with that run's check runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…llows its PR - contained() splits each ls-files entry at its first tab, so a symlink whose name holds a tab is checked under its own path. - A bare cache per target holds the base's whole history, which quest check --fix reads for deleted quests, and makes later fetches incremental. - The open bump PR is re-read before the push, and a PR that closed during the Nix work fails the pass, which starts over next time. - An open bump PR is retargeted when the target's default branch moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 10 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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Found one P2 issue in the lifetime of the cached Nix-built executable. Please keep the cached output rooted while it is in use, or rebuild when the cached executable disappears, with a regression test for retrying the same source commit after the cached output is removed.
Reviewed the pin-bump implementation and tests, watcher/CLI integration, branch-rules fallback, and the existing landing/check helpers. This was a GitHub-only static review: no checkout, shell commands, builds, or tests were run. The supplied tests fake Nix and quest, so they do not exercise hostTools' output lifetime.
(Written by review (OpenAI))
nix build --no-link roots nothing, so a retry for the same source commit could find the cached executable gone and fail until the watcher restarts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Follow-up to #550 (review). The base is unchanged; the only intervening commit changes hostTools' cache check and adds its regression test.
The earlier P2 is addressed: hostTools.quest now rebuilds when the cached executable is absent, so a later call for the same source SHA can recover after garbage collection. The new test exercises the real hostTools with a fake nix on PATH, verifies reuse while the output exists, removes the output, and verifies recreation with exactly two builds. No new actionable findings in this follow-up; no further change requested for the reported cache issue.
GitHub-only static review of the incremental diff and surrounding hostTools/environment code. No checkout, shell commands, builds, or tests were run; the test was inspected, not executed, and actual Nix garbage collection was not exercised.
(Written by review (OpenAI))

Part of quest/m0/pin-sync.md: every push to quest's
mainnow reaches each repository that pins quest without anyone touching it. The host half (the watcher's--bumpflags andsystem.autoUpgrade) is a kixelated/nixos PR. This PR rewrites the quest to that remaining host work and the maintainer-only steps.Builds on moq-dev/quest#540, now merged into
main.Decisions
main; merge as is). As implemented, a cancelled run also yields to a newer run of its workflow from the other event, since the case that raised it is acancel-in-progressgroup shared across push and pull_request, and the replaced run's check runs are dropped with it, so a later job it never started can't fail the bump.What changed
quest land watch --bump <owner/repo>(repeatable, newsrc/cli/land-bump.ts). After its queue pass, each pass reads the watched base's commit. For each target that doesn't pin it yet, the watcher opens or updates that target's onequest-bumpPR as the App:flake.lockon its default branch and finds the one root input that locks the watched repository. A target already at the commit gets nothing, and an open bump PR there is closed with a comment.quest check --fixsees deleted quests, and later fetches are incremental), it unpins the URL inflake.nix(github:moq-dev/quest/<rev>becomesgithub:moq-dev/quest), so later bumps change only the lock. It then locks the input to the exact commit withnix flake lock --override-input.questwithnix build, then runs itsquest initandquest check --fixin the checkout.Skipped: pin bump, no repository code changed; CI's quest check is the gate.).--fixcan't resolve leave the PR a draft with a## Waitingitem. Otherwise the PR lands throughquest merge's own path (land()): GitHub's merge queue, thequest landgate or own queue, or auto-merge.land()would merge immediately. There the bump first waits for every check on its head to pass (only each workflow's latest run per event counts, and a run a newer one cancelled counts as replaced), then merges directly if the repository has no auto-merge (kixelated/nixos, a private repository on GitHub Free). A failed check or a refused landing gets a comment and is left for a maintainer.bump.jsonin the state directory records each step, so a restart repeats nothing, a failed landing never re-pushes, and a bump someone closed isn't reopened for the same commit. One target's failure doesn't hold up the others; the pass reports it and the daemon retries.requirements()(used byquest merge): a private repository on GitHub Free answersGET /rules/brancheswith a 403 upgrade notice. That now reads as "no rules" instead of failing. On kixelated/nixos,quest mergenow gives its usual "auto-merge disabled" refusal instead of an HTTP 403.Public API
quest land watch --bump <owner/repo>option. The watcher refuses to start with it whennixisn't onPATH, or when it names the watched repository itself. Nothing else changes for existing invocations.quest mergeon a private repository on GitHub Free: refusal message instead of an HTTP 403 (above).contents: write,pull_requests: write,merge_queues: write, and read access toadministration,checks, andstatuses, plusworkflows: writeonly for a push that carries a workflow change. All of these are within moq-bot's existing moq-dev installation. Nix reads GitHub with the watched repository'scontents: readtoken.Choices made without asking
--bumpflags. The nixos module derives it from the enrolled land repositories, plus studio, kixel.ai, and nixos.flake.nixtoday.main. That code runs as the daemon user, which can read the App key. It's the same trust the daemon already places in reviewedmain.maineven if a target pins a commitmaindoesn't contain), and a timeout on Nix commands (repository rule: no timeouts as workarounds).Validation
just checkandjust testpass (1219 passed and 5 skipped, plus 562 passed), after merging origin/main.--root(a target'sbunfig.tomlpreload never loads); a checkout with a tracked symlink that leaves it or dangles is refused; an ungated bump waits for the head's workflow runs and for other apps' check suites; unpinning matches case-insensitively. The target token now also asks foractions: read.test/land-bump.test.tsruns the pass against a fake GitHub and a local target repository with Nix and quest faked. It covers:latestRuns's choice per workflow and event;quest check --fix, a PR that closes mid-bump, and retargeting to a new default branch, and rebuilding a cached quest that Nix's garbage collection removed;requirements().hostToolsagainst a shallow clone of moq-dev/studio (nothing pushed): it found inputquestat1c3cf6apinned inflake.nix, unpinned it, locked it to6f20c25(flake.lock4 lines added and 5 removed), built quest, and ranquest init(nothing to change) andquest check --fix(35 documents ok).Suggested follow-ups
Review
Rewritten by
quest reviewafter each round.01a1b980-e3ee-7eb2-958a-fd82f75b9c42, round 4The cache rebuild change introduces no findings; targeted read-only checks and diff checks passed, while full suites were not run in the read-only sandbox.Models
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)