fix(http_endpoint): git pack modules get a fuel floor, not a fixed ceiling - #417
Draft
rita-aga wants to merge 2 commits into
Draft
fix(http_endpoint): git pack modules get a fuel floor, not a fixed ceiling#417rita-aga wants to merge 2 commits into
rita-aga wants to merge 2 commits into
Conversation
…iling git_upload_pack/git_receive_pack are bulk byte-streaming: their instruction count scales with repo size, so any fixed MaxFuel silently truncates clones/pushes once a repo outgrows it — the recurring ARN-57/278/284 class (raised 20B -> 100B, then paw-agent exhausted 100B on clone with 'fuel exhausted -- module exceeded instruction budget'). These are trusted internal modules bounded by timeout (300s) and memory (512MB), not instruction count. Enforce GIT_PACK_FUEL_FLOOR = 10T for them: the endpoint's stored MaxFuel can only raise it, never lower it. ~100x the last manual override — effectively unbounded for any realistic pack while remaining a runaway safety bound. Non-git endpoints are unaffected. Tests: existing git-module fuel assertions updated to the floor; added coverage that a stored value above the floor is preserved and non-git modules are untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vw8tCkfnUW8p149yUNfSEE
Addresses codex P1 + Fable P2: receive-pack (ingest) runs unauthenticated on CLIENT-controlled pack input ahead of the Cedar-gated write, so raising its fuel would create an unauthenticated attacker-controlled-work surface. The floor now applies ONLY to upload-pack (clone/fetch — work bounded by the server's own repo size, which is the actual blocker for large-repo clones); receive-pack keeps its tight 20B bound. Added a test locking receive-pack out of the floor. The proper DoS control (rate-limiting the public git endpoints) is tracked in ARN-311. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vw8tCkfnUW8p149yUNfSEE
rita-aga
marked this pull request as draft
August 12, 2026 18:24
Collaborator
Author
|
Holding as draft. Codex's P1 (unauthenticated public upload-pack + effectively-unbounded fuel + no admission control) is valid and I'm not shipping the fuel floor without addressing it. Proper path per ARN-278/ARN-311: either gate the floor to authenticated requests, or land admission/rate-limiting (ARN-311) first. Decoupling the katagami design work from this infra track for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
git_upload_pack/git_receive_packrun as WASM integrations with a fixedMaxFuel. Pack emission and ingest are bulk byte-streaming — instruction count scales with repo size — so any fixed fuel ceiling silently truncates clones/pushes once a repo outgrows it. This is the recurring ARN-57 / ARN-278 / ARN-284 class: the budget was raised 20B → 100B, andtemperpaw/paw-agentnow exhausts even 100B on clone:(confirmed in production Genesis logs; clone dies with
invalid index-pack output / early EOF). The persisted endpoint entity can't be PATCHed without admin scope, and a redeploy won't reset it — so raising it per-repo isn't a durable fix.Fix
git pack modules are trusted internal modules bounded by timeout (300s) and memory (512MB), not instruction count. Give them
GIT_PACK_FUEL_FLOOR = 10Tthat the storedMaxFuelcan only raise, never lower. ~100x the last override — effectively unbounded for any realistic pack, still a runaway safety bound. Non-git endpoints are unaffected.Tests
cargo test -p temper-server --lib http_endpoint→ 21 passed.Deploy: merge → bump the genesis submodule temper pin → redeploy genesis → verify paw-agent clone succeeds.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vw8tCkfnUW8p149yUNfSEE
Greptile Summary
The PR revises the git pack fuel fix so only
git_upload_packreceives a 10T minimum fuel budget, while preserving the tighter limit for client-controlledgit_receive_pack.Confidence Score: 5/5
The PR appears safe to merge because the previously identified receive-pack resource-boundary issue is addressed and no blocking failure remains.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "review(#417): scope the fuel floor to up..." | Re-trigger Greptile