Repository navigation
Conversation
…gs and the git:read routes Add a deviation row for the 422 that the git heap cap answers on the git:read routes, on POST branches/create and POST tags (#929), and on POST merge with a pin that is not the source tip. Change-Id: I7e735dd35a1dd7785bc7b60e436e34a15b16cd10 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…tion Verifier round 1: 100,000 unreferenced commits fit under the heap cap (500,000 do not), the pinned merge walk never meets an unreferenced history, and http-api.md said the write endpoints are not covered by the git read limits. Change-Id: I53030284a193dbdaf6996ce279f71607a11af5a2 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…nder Verifier round 2 (CLEAN, one low finding): the walk runs under the concurrency, time and memory limits, not every limit of the table, and it frees its slot when the walk ends. Also use the section's own name for its link and say that branches, branch, notes/refs and repo run no git. Change-Id: Ide939952cbfc1bfdbf75baa57d0f329eba8bc49d Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6fed63bba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - **Platforms.** The memory limit needs `RLIMIT_DATA`, which only Linux enforces. On other server platforms, such as macOS, git runs without a memory cap, and the concurrency, time, output and file-size limits still apply. No endpoint refuses a request because the memory cap is unavailable. For deployments where untrusted users can push, run the server on Linux. See [ADR-49](../adr/049-read-side-git-children-run-under-one-per-request-budget.md). | ||
| - `archive` streams its response. An error after the response has started (for example, the time limit, or a delta-compressed file whose base object does not fit in memory) closes the connection, so the client sees a truncated, invalid gzip stream instead of a status code. | ||
| - Not covered by these limits: hydrating the cache repository before the git reads (serialized per repository), git clone and fetch over the git protocol (`upload-pack`, which has its own request-size limits), and the write endpoints. | ||
| - Not covered by these limits: hydrating the cache repository before the git reads (serialized per repository), git clone and fetch over the git protocol (`upload-pack`, which has its own request-size limits), and the write endpoints. The exception is the history walk of `POST /repos/branches/create`, `POST /repos/tags` and a `POST /repos/merge` whose `expected_source_sha` is not the source tip, which runs under the concurrency, time and memory limits above and frees its slot when the walk ends ([which commit the base and the tag target can name](#which-commit-the-base-and-the-tag-target-can-name)). |
There was a problem hiding this comment.
Limit the cap claim to the closure check
When branches/create performs a guarded move or merge receives an off-tip expected_source_sha, an ancestry walk runs before the capped registered-pack closure check: wrefIsAncestor uses plain wrefGit, while wmSourceContains uses wcScratch.git with no gitread.Budget on write requests. Those walks therefore have none of the stated concurrency, time, or memory limits and can exhaust resources or return 500 before the documented 422. Name the RegisteredClosure validation specifically instead of claiming that the endpoint's history walk is covered.
Useful? React with 👍 / 👎.
Why
Since #929,
POST /repos/branches/createandPOST /repos/tagswalkthe history of the commit they name under the git heap cap and answer
422when the walk needs more memory. The upstream spec lists422onno operation, and the deviation table in
docs/explanation/wire-compatibility.mdrecorded a422only for thefile size limit of
fileandarchive. Docs only.What changed
answer the heap cap's
422: eachgit:readroute that runs git(
fileGET and HEAD,files,files/metadata,branches/diff,commits,commit,diff, GETtags,tag,blame,notes,merge/preview,grep,archive),POST .../branches/create,POST .../tags, andPOST .../mergewith anexpected_source_shathat is not the source tip (fix(api): refuse a branch or tag at a commit whose history the packs cannot walk #929 walks that pin too).
docs/reference/http-api.md: "100,000 unreferenced commits need morethan the heap cap" was false. With one new blob and three new trees
per commit, 100,000 fit and 500,000 did not. The "Not covered by
these limits" bullet now names the write routes' walk as the
exception.
Verification
writeGitLimitErr(internal/api/git_budget.go) mapsgitread.ErrMemoryLimitto 422.gitread.Runcaps the heap onlyunder a request budget, which the git:read middleware and
wrefWalkBudget(create, tags, merge pin) set.failing, each listed route answered 422 and
branches,branch,notes/refsandrepoanswered 200. With only the history walkfailing, only create, POST tags and the pinned merge answered 422.
ulimit -d 262144(git 2.55): 100,000unreferenced commits exit 0, 500,000 exit 128 "Out of memory".
check-doc-links.py0 broken,test_check_doc_links.pyOK.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high