diff --git a/README.md b/README.md index ed9557bd..119c02c1 100644 --- a/README.md +++ b/README.md @@ -510,8 +510,12 @@ The wrapper starts an ephemeral container and runs `quest land fix `, exposes the log read-only, waits for `quest land fix`, preserves its exit status, and returns diff --git a/quest/m0/land-fixer/README.md b/quest/m0/land-fixer/README.md index 73786284..2d5fa05b 100644 --- a/quest/m0/land-fixer/README.md +++ b/quest/m0/land-fixer/README.md @@ -34,7 +34,7 @@ moq-dev/rust2, moq-dev/rind and moq-dev/quest. | ~75 | "requeued unchanged": collateral of a batch another PR broke | [Batch triage](/quest/m0/land-fixer/triage.md) | | 36 | picked again while fixing; the newer pick is kept, so nothing is lost | not planned | | 17 | conflicts in protected paths (`flake.nix`, `.github/`), mostly mechanical; resolved by hand on moq-dev/moq#7344, #7315, #7318 | [Protected edits](/quest/m0/land-fixer/protected.md) | -| 17 of the last 40 jobs | `cargo` fails offline ("failed to get `uniffi`"), so Rust fixes were requeued uncompiled: moq-dev/moq#7357 sank three batches, and #6985's lockfile could not be regenerated | [Registry network](/quest/m0/land-fixer/network.md) | +| 17 of the last 40 jobs | `cargo` fails offline ("failed to get `uniffi`"), so Rust fixes were requeued uncompiled: moq-dev/moq#7357 sank three batches, and #6985's lockfile could not be regenerated | fixed by [moq-dev/quest#356](https://github.com/moq-dev/quest/pull/356): the prompt allows dependency fetches and requires a build and test | | 2 | GitHub refused the push to a fork because the merge touches workflows: moq-dev/moq#7439, #7467 | [Fork commits](/quest/m0/land-fixer/fork-commit.md) | | several batches | a flaky ffmpeg timeout ([moq-dev/moq#7480](https://github.com/moq-dev/moq/pull/7480)) ejected whole batches | [Flaky tests](/quest/m0/land-fixer/flaky.md) | | ~15 | design conflicts, correctly handed back | none | @@ -48,7 +48,14 @@ Decision prompts, selected options marked ✅: and [Local mergeability](/quest/m0/land-fixer/mergeability.md) into this epic - How attempts count: see [Attempt budget](/quest/m0/land-fixer/attempts.md). -- How the fixer gets dependencies: see [Registry network](/quest/m0/land-fixer/network.md). +- How the fixer gets dependencies: + - Host prefetches the job's lockfile dependencies and mounts them read-only + - ✅ Allow registry network. The host already gave the fixer container + public egress; `assets/land-fix.md`'s "never contact GitHub" made it + build `--offline`. [moq-dev/quest#356](https://github.com/moq-dev/quest/pull/356) + allows fetches from package registries and `github.com`/`codeload.github.com` + and makes the fixer build and test what it reports. + - Leave it - Protected paths: see [Protected edits](/quest/m0/land-fixer/protected.md). - Fork pushes GitHub refuses: see [Fork commits](/quest/m0/land-fixer/fork-commit.md). - Flaky tests: see [Flaky tests](/quest/m0/land-fixer/flaky.md). @@ -67,7 +74,6 @@ resolves itself and what it hands back; that docs update finishes the epic. ## Required - [Attempt budget](/quest/m0/land-fixer/attempts.md) - only a fix that fails again spends a pick's single attempt -- [Registry network](/quest/m0/land-fixer/network.md) - the fixer fetches dependencies, so it builds and tests what it requeues - [Batch triage](/quest/m0/land-fixer/triage.md) - the fixer blames the failing PR before ejection, and a red base halts the queue - [Flaky tests](/quest/m0/land-fixer/flaky.md) - the gate reruns a failed module, disables a flaky test in the next batch, and files a follow-up - [Local mergeability](/quest/m0/land-fixer/mergeability.md) - `quest land` merges with the quest driver instead of ejecting on GitHub's conflict flag diff --git a/quest/m0/land-fixer/network.md b/quest/m0/land-fixer/network.md deleted file mode 100644 index f1dda70c..00000000 --- a/quest/m0/land-fixer/network.md +++ /dev/null @@ -1,46 +0,0 @@ -# [S] The fixer reaches package registries - -## Goal - -The fixer container can fetch dependencies from the package registries a -repository's lockfiles name, so `cargo`, `bun`, `uv`, and `go` build and test -a fix before the fixer reports `fixed` or `requeue`. It does not use GitHub's -API or push, and the only credential in the container stays the gate's -CLIProxyAPI client key ([Fixer proxy access](/quest/m0/host-land/fixer.md)). - -## Plan - -Decided 2026-11-01 (user, /quest-plan of the land fixer audit; see the -[epic](/quest/m0/land-fixer/README.md)). In 17 of moq's last 40 fix jobs, -`cargo` failed offline with "failed to get `uniffi` as a dependency", a git -dependency the container cannot fetch. The fixer requeued Rust fixes it never -compiled ([moq-dev/moq#7357](https://github.com/moq-dev/moq/pull/7357) sank -three batches), and could not regenerate -[moq-dev/moq#6985](https://github.com/moq-dev/moq/pull/6985)'s lockfile. - -- How the fixer gets dependencies: - - Host prefetches the job's lockfile dependencies and mounts them read-only - - ✅ Allow registry network - - Leave it - -Found while starting the work (2026-11-01): the host is not what blocks it. -kixelated/nixos `modules/ci-egress.nix` gives the fixer container -(`qland-fix`) the same egress as the check containers, the public internet -without private ranges, and the fixer runs Codex with -`--dangerously-bypass-approvals-and-sandbox`. The fixer chooses `--offline` -itself because `assets/land-fix.md` says "Never push or contact GitHub", and -a git dependency's fetch from `github.com` is contact. So the change is the -prompt: fetching dependencies from package registries and from -`github.com`/`codeload.github.com` for git dependencies is allowed, while -GitHub's API, pushing, and any other contact stay forbidden. -[Fixer proxy access](/quest/m0/host-land/fixer.md)'s "network access only to -CLIProxyAPI" describes the intent, not the host as built; correct it in the -same PR. - -`assets/land-fix.md` then tells the fixer to build and test the packages its -fix touches, and to report what it ran in the result's reason. A fix it could -not verify hands back with the command's output. - -## Related - -- [Fixer proxy access](/quest/m0/host-land/fixer.md) - the container's existing network rules diff --git a/test/land.test.ts b/test/land.test.ts index f2199028..f0995368 100644 --- a/test/land.test.ts +++ b/test/land.test.ts @@ -2174,6 +2174,18 @@ ${requeueScript} ]) expect(fixerPrompt).toContain(text); }); + test("lets the fixer fetch dependencies and requires it to verify what it reports", () => { + for (const text of [ + "from `github.com` and `codeload.github.com` for git", + "Do not build with `--offline`", + "never call GitHub's API yourself", + "or reach any other host", + "Before reporting `fixed` or `requeue`, build and test", + "name the commands", + "quoting the command and the output", + ]) + expect(fixerPrompt).toContain(text); + }); test.each(["deleted branch", "gitfile", "symlink", "corrupt objects", "oversized"])( "hands back %s and keeps collection usable", async (kind) => {