feat: Refresh reused checkouts from remote mirrors - #4162
Conversation
There was a problem hiding this comment.
I didn't find a concrete issue to flag inline. This adds a credentialed mirror fetch and persistent promisor reconfiguration to reused checkouts, so it still needs a human sanity-check.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10780, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
About buildsworth
Model: gpt-5.6-sol with xhigh thinking.
How to request a review: Comment @buildsworth-bk review on the PR, or request buildsworth-bk as a reviewer.
Risk labels (how buildsworth classifies risk) — buildsworth classifies risk itself from the diff. To let it approve, grant L2 approval by mentioning @buildsworth-bk (see L2 approval grant):
- L1 — Low risk (dep bumps, docs/copy, lockfiles, small presentational fixes). buildsworth may approve by default.
- L2 — Standard risk (new UI, additive API fields, refactors). Approved only with an L2 grant; otherwise comment-only.
- L3 — High risk (auth, migrations, payments, secrets, perf-critical paths). Human review always required.
|
Propagated the implementation-derived plan correction in merge |
There was a problem hiding this comment.
I didn't find a concrete issue to flag on the updated head. The change still adds a credentialed network path and rewrites persistent promisor state in reused checkouts, so it remains one for human sanity-checking.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10797, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
|
Merged the reviewed foundation and on-host fixes through |
|
Added the red-step regression in |
|
Fixed the remaining reused-checkout logging gap in |
|
Propagated the recursive-submodule eligibility foundation through |
There was a problem hiding this comment.
I didn't find a concrete issue to flag on the current head. This changes the credentialed fetch path and persistent promisor ownership in reused checkouts, so it still needs a human sanity-check.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10829, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
|
Propagated the final plan alignment through |
There was a problem hiding this comment.
I found two blocking edge paths in the new promisor and filter handling; details are inline.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10849, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
|
Added the re-review red step in |
|
On it! Follow along with my review here: https://buildkite.com/buildkite/buildsworth-review-pull-request/builds/10853 |
|
Implemented reused-checkout re-review fixes in |
There was a problem hiding this comment.
Two earlier concerns are still open, and I found one additional cleanup-failure issue inline.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10855, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
There was a problem hiding this comment.
The three earlier concerns remain open on the current head; I didn't find a separate new issue this pass.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10864, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
|
On it! Follow along with my review here: https://buildkite.com/buildkite/buildsworth-review-pull-request/builds/10870 |
|
Final reused-checkout fix |
There was a problem hiding this comment.
One earlier concern is fixed. The credential-bearing config failure path and the cancellation-plus-cleanup-failure path remain open in their existing threads; I didn't find a separate new issue this pass.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10878, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
There was a problem hiding this comment.
The credential-redaction path is fixed. The cancellation-plus-cleanup-failure case remains open in its existing thread, and I found one new PATH-resolution issue inline.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10893, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
|
@buildsworth-bk review @buildsworth-bk approve L2 |
There was a problem hiding this comment.
The two earlier concerns remain open in their threads. I also found that the new config fast path rejects checkouts where .git is a gitfile; details inline.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10898, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
There was a problem hiding this comment.
The Git path and gitfile concerns are fixed. The cancellation-plus-cleanup-failure case remains open in its existing thread; I didn't find a separate new issue this pass.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10900, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
There was a problem hiding this comment.
The cancellation-plus-cleanup-failure concern is still open on the unchanged head; I didn't find a separate new issue this pass.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 10906, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
There was a problem hiding this comment.
The cancellation-plus-cleanup-failure concern is still open in its existing thread; I didn't find a separate new issue on the current head.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 11125, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
There was a problem hiding this comment.
The existing gitfile cleanup concern is still open in its thread; I also left one documentation correction inline.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 11291, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
|
Addressed the follow-up gitfile edge in |
There was a problem hiding this comment.
The gitfile exclusion fixes the earlier unsafe-cleanup case. The documentation note remains open in its thread, and I found a separate teardown regression in the cleanup branch.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 11293, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
3cbb0c2 to
68407df
Compare
|
Addressed both latest findings and force-pushed them as one clean follow-up commit ( |
68407df to
d29842a
Compare
|
Folded the Windows CI follow-up into the cleanup commit ( |
Previous concerns have been addressed.
There was a problem hiding this comment.
The two open concerns are fixed, and I didn't find a new issue on this head. This remains a credentialed fetch path that rewrites persistent promisor state, so it still needs human review.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 11298, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
Co-authored-by: Paul Annesley <pda@users.noreply.github.com>
Co-authored-by: Paul Annesley <pda@users.noreply.github.com>
d29842a to
cf1af47
Compare
Previous concerns have been addressed.
There was a problem hiding this comment.
The previously open documentation and teardown concerns remain fixed, and I didn't find a new issue on this head. The reused-checkout feature files are unchanged from the last reviewed head; this still changes a credentialed fetch path and persistent promisor ownership, so it needs human review.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 11421, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
Review: regression risk for jobs with no remote mirror configuredTL;DR: Overall risk to existing no-mirror behaviour is low. The new mirror fetch/cleanup machinery is unreachable without a mirror URL, but three pieces of changed code do run on every job regardless of mirror configuration. Each has a narrow, mostly benign impact, detailed below. CI is green (the full pipeline exercises the extensive pre-existing no-mirror checkout integration tests), and the fetch/filter/mirror tests in Why the main path is safe
Three changes that do affect the no-mirror path1.
2. 3. Verification
If any of the three findings are worth hardening before merge, the cheapest wins would be gating |
Co-authored-by: Paul Annesley <pda@users.noreply.github.com>
|
Implemented the promisor-repair ownership gate in
Focused reused-checkout mirror tests pass locally, including the new ownership, crash-window, privacy, and fail-open cases. @buildsworth-bk review |
Previous concerns have been addressed.
There was a problem hiding this comment.
The earlier cleanup concerns remain fixed. I found one narrow ownership edge inline. This still changes a credentialed fetch path and persistent promisor state, so it remains one for human review; the current agent CI run is also failing.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 11449, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
Co-authored-by: Paul Annesley <pda@users.noreply.github.com>
Previous concerns have been addressed.
There was a problem hiding this comment.
The same-URL ownership edge is fixed: the mirror path now checks for existing local remote config before marking, and the regression preserves the full user-owned section. I didn't find another concrete issue. This still changes a credentialed fetch path and persistent promisor ownership, so it needs human review; agent CI is still running.
Want to dig deeper?
Paste this into your agent to explore the findings from this review's Buildkite build:
Download the buildsworth logs from build 11453, then answer my questions about the findings.
Install the reading-buildsworth-logs skill to run this.
| } | ||
|
|
||
| e.shell.Commentf("Fetch commit from remote Git mirror") | ||
| // C21: preserve the caller's effective fetch flags. Explicit ref-mutating |
There was a problem hiding this comment.
yep…
agent/docs/remote-git-mirrors.md
Lines 1445 to 1452 in 01c20f6
maybe shouldn't be cited from a code comment, although that plan does exist on main for now.
Description
Fetch the immutable build commit from the remote mirror into a reused checkout before falling back to canonical. This is PR 3 based on #4161.
A mirror miss never deletes the checkout. Unsafe promisor-cleanup failure quarantines the checkout's Git state, recreates an empty workdir for teardown hooks, and lets the next mirror-ineligible attempt clone canonically.
Context
The explicit mirror URL makes the bounded source deterministic despite customer
insteadOfrules. That requires filter inheritance and one-shot promisor cleanup without mutating user-owned promisor configuration.Changes
--fi*and--no-fi*abbreviations.Filtered Git fetches can transiently write URL-named promisor keys. Completed fetches remove the keys and marker; the next fetch repairs only matching marked state left by process interruption.
F2 mirror-routed lazy materialisation remains outside this stack; lazy reads use canonical
origin.Testing
Real Git-over-HTTP tests cover hit, lag, failure, timeout, cancellation, automatic/inherited/abbreviated filters, marked repair after URL removal, preservation of unmarked user promisors including an exact-URL section with extra keys, marker-only crash recovery, marker privacy and setup failure, canonical materialisation, credential-safe config failures, checkout PATH, state preservation, and debug suppression. Regression tests additionally force cancellation plus config-lock cleanup failure, verify unsafe Git state is removed while the teardown workdir remains, and keep real
--separate-git-dircheckouts mirror-ineligible.Disclosures / Credits
Implemented with Cursor under human direction. Independent review drove all-outcome and restart recovery, scoped ownership marking, exact-URL collision handling, option parity, safe retry, gitfile/PATH correctness, teardown invariants, and logging hardening.