Repository navigation
Let integrations fetch authorized Git commits without receiving credentials - #769
Conversation
Preview:
|
|
LGTM! |
deregtd
left a comment
There was a problem hiding this comment.
Reviewed all 13 changed files at 3ba8e8b against 7b0ac75, including exact-commit framing, repository/project scoping, credential refresh/revocation and streaming transport. No actionable findings.
Validation: 13 kit tests (including an actual native Git shallow-fetch fixture), 4 GitHub Workers tests and 16 GitLab Workers tests passed. The current required Build and test, Lint and CLAssistant checks pass. Provider requests were mocked in the Workers tests; I did not exercise live GitHub or GitLab accounts.
|
LGTM! |
|
🤖 GPT bot comment P2 Preserve upload-pack errors across Workers RPC — packages/gatekeeper-kit/src/git-transport.ts:370 (packages/gatekeeper-kit/src/git-transport.ts#L370) |
|
kentonv
left a comment
There was a problem hiding this comment.
The agent-written bug report above seems worth fixing if it's easy but it's not clear to me whether it's easy.
Otherwise the change seems fine although in review I noticed some problems with our streaming pack decoding -- not introduced in this PR, so no need to fix here, but worth noting:
- We apparently still enforce
MAX_GIT_PACK_BYTESeven though we are streaming now. We shouldn't need to limit anymore. - Apparently any blob in the pack that exceeds the 8MB storage limit is held in memory instead, just in case a later file uses it as a reference. That seems... kinda backwards? Such later files are probably also over the storage limit, maybe they should all just be dropped? Or perhaps we should just implement chunking and solve the problem entirely...
|
LGTM! |
🤖 AI code review💬 Approved with comments — No blocking or warning findings. One INFO note: the raw upload-pack body cap was removed on the cache-ingestion path, and the DO decoder's pack-size limit does not count the non-pack bytes it discards. Findings: 1 info The decision is advisory: this comment never approves, blocks or requests changes on the pull request. 🔧 Fix with your agentPaste the following into your coding agent to investigate and fix these issues. 📋 Code Quality: 💬 1 commentThe refactor is sound. One low-impact note about the raw transfer cap removed from the cache-ingestion path. Recommendation: 💬 Optional Nits
View full reviewRaw transfer cap removed from the cache path (
Checks that found nothing
✅ All other checks passed🔒 Security: ✅ LGTMNo exploitable issues found in the changed code.
📖 AGENTS.md: ✅ LGTMNo AGENTS.md concerns. ⚡ Performance: ✅ LGTMNo performance concerns. The pack stream applies backpressure ( 📝 Documentation: ✅ LGTMThe README, USAGE and plans updates match the new 📘 How the review decision works
Reviewed commit: |
|
LGTM! |
|
LGTM! |
Eval resultsVerdict: ⚪ Unchanged. No task moved beyond what 10 runs can tell apart from noise.
Failed checks
|
|
LGTM! |
🔬 Eval runs reviewPerformanceWith 10 comparable runs per task, change-calendar, incident-desk and worker-logs each went from 100% to 90%, while chess went from 90% to 100%; comparison.json calls these pass-rate changes unchanged, with p=1 throughout. Approximate mean costs moved main → PR: calendar $0.022 → $0.025, incident desk $0.023 → $0.027, worker logs $0.023 → $0.017, and chess $0.051 → $0.052; worker logs also fell from 27.9 to 19.6 steps and 5.4 to 3.9 minutes, partly because one run stopped after turn 1. Chess remained the largest step/cost sink, including PGN escaping-repair detours, while worker logs alone showed significant cache deterioration: hits 95.62% → 94.40%, breaks 0.0108% → 0.0127%. ⚪ VERDICT: NO REGRESSION FROM THIS PRThe diff changes Git PACK transfer and ingestion, which neither side’s trajectories exercises through remote Git pulls, so the isolated model mistakes and mixed performance shifts do not establish a regression caused by this PR. TriageFailure modes
Tool errors
Prompt cache
What to do
|
User scenario
An agent needs to run tests against a GitHub or GitLab repository in a Linux container. The container needs the complete immutable base commit, but it must not receive the user's Git credentials or unrestricted repository access.
Today the DO can lazily fetch repository objects for individual file reads. That is useful in DO mode, but fetching a whole checkout that way is not the native Git bootstrap a container needs.
What changes
The existing typed
gitPull(oids, options)API now returns aGitPullTransfer: a one-shot, backpressured raw PACK stream and an independent terminalstatus(). GitHub/GitLab gatekeepers fetch and strip protocol framing using credentials they already own. The overseer consumes the stream through its bounded, validating DO cache decoder and checks requested-object presence. The transfer status preserves useful upload-pack errors across Workers RPC, which can otherwise replace stream exceptions with a generic disconnect.The same capability supports a complete, unfiltered depth-one pack for a native Git consumer without imposing the DO cache's size limit. This PR provides that capability, not the container consumer: container hydration ships separately. It does not itself create a container or synchronize later edits.
Boundary and dependencies
Gatekeeper.gitPullis kernel-facing, not exposed through gadget sessions. The existing kernel routes pulls from recorded provenance: advertised commits, objects referenced by objects populated by that gatekeeper, or previously populated objects evicted from cache. The shared composer checks oid syntax and composes typed options; it does not validate advertisement history. The authority boundary is the kernel's selection, not a shared advertised-commit validator.Verification
Before the latest push, 1,463 tests and five affected package typechecks passed. Real workerd RPC regressions cover upload-pack ERR, sideband-fatal, and truncated responses, in addition to provider, cache, and framing regressions. No manual deployment or CI rerun occurred.
Extracted from #729. This PR does not enable or deploy the Linux Container integration.