Skip to content

fix: Separate action source object and file budgets - #70

Merged
idy merged 1 commit into
mainfrom
fix/action-source-file-bound
Nov 17, 2026
Merged

idy merged 1 commit into
mainfrom
fix/action-source-file-bound

Conversation

@idy

@idy idy commented Nov 17, 2026

Copy link
Copy Markdown
Member

The trusted action-source collector refused a legitimate, complete source set before any model work. A caller PR (idy/yesman#59) added two workflows that newly use four ordinary pins already present in its base: actions/checkout@3d3c42e5, actions/download-artifact@d3f86a10, actions/setup-go@b7ad1dad and actions/upload-artifact@ea165f8d. Their complete committed snapshots have 605 logical file entries but only 484 distinct blobs (27,331,008 unique bytes, largest blob 5,051,718 B). The collector already fetches, hash-checks and stores each distinct blob once, and its byte budget already counts unique content, but files: 512 counted every path binding. Admission therefore failed with Action source file/size bound exceeded (run 44004176834, action-sources.mjs:151), although every resource that bound protects was within budget.

This change separates the two dimensions instead of loosening the expensive one:

  • objects: 512 — distinct blobs fetched (one getBlob request each), hash-checked and stored. Unchanged from today's effective worst case: at most 4 repository + 8 commit + 8 tree + 512 blob requests per run. Enforced before the extra request during acquisition and before reading the extra object during offline verification.
  • files: 2048 — logical path entries across snapshots, which only reference already verified objects. 2048 matches the existing per-snapshot tree-entry bound. The measured real manifest is 342,646 B for 605 entries plus 678 tree records (about 267 B per record).
  • manifestBytes: 4 MiB — the verifier's existing manifest limit, now also enforced by the collector so that an oversized manifest is refused before it is written.

All identity, hash, path, mode, symlink/submodule, truncation, duplicate, per-blob/total byte, graph and fail-closed controls are unchanged. The workflow and the caller interface are unchanged too, so action-source refusal still stops the job before Codex bootstrap, model use or publication.

Validation:

  • Real replay of the failing admission: Git discovery on the actual caller diff f00655a9..0e139c43 yields the same four refs. The exact old ad01395 FAILs with the same Action source file/size bound exceeded. The new code PASSes from the same recorded API responses: 4 snapshots, 605 entries, 484 objects, 496 API calls, digest 709845c2de3119aba59f376c2ecf47b05c86b947606f0b9e1634d6d4cbc0d012. The old verifier also refuses the new manifest (file bound exceeded).
  • Independent git-protocol fetch of the four commits: trees equal, and all 605 entries match path/mode/blob/size. All 27,614,090 bound bytes are byte-equal with matching SHA-256, and there are no symlink/submodule entries.
  • Real-data negative controls (mutated recorded responses) are all refused with no manifest written: truncated tree, duplicate path, symlink mode, ../ path, flipped blob byte, truncated base64, private repository, commit identity mismatch.
  • action-sources-test.mjs: 79/79 PASS. New tests cover distinct-object exact/+1 (512 accepted, 513 refused before the 513th request and by the verifier), entry exact/+1 across old/new snapshots (2048/2049 on both sides), repeated bindings costing entries but not requests, a shared manifest-byte exact/+1 (collector refuses before writing), and the measured 605/484 shape under defaults. The new test file against the old implementation fails 6 of 79.
  • All 11 review-script suites listed in test-review-scripts.yml PASS locally (Node 24.22.1). git diff --check is clean.

Not done here: publication/latest retagging, caller changes, or a new caller review. Adoption needs an independent review of this exact head, the normal merge, then the normal update of refs/tags/latest. After that, one fresh review of the caller PR can be requested. The review of this PR cannot itself exercise the fix (bootstrap gap): the caller reviewer runs latest.

The action source collector fetches, hash-checks and stores each distinct
blob once, and its byte budget already counts unique content, but the
512 `files` bound counted every logical path binding. Complete snapshots
of four ordinary first-party actions (checkout, download-artifact,
setup-go, upload-artifact: 605 entries over 484 distinct blobs,
27,331,008 unique bytes) were therefore refused before review although
every resource the bound protects was within budget.

Keep the expensive dimension unchanged: at most 512 distinct objects
(one getBlob request each) on both acquisition and offline verification.
Bound logical entries separately at 2048, matching the existing
per-snapshot tree-entry bound, and share the verifier's 4 MiB manifest
limit with the collector so an oversized manifest is refused before it
is written. All identity, hash, path, mode, truncation, byte, graph and
fail-closed controls are unchanged.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ OpenAI PR Review: FAIL

Conclusion: Not ready. 1 readiness blocker must be resolved before merge.

Review checks

Check Result
PR format ❌ FAIL
Issue design ✅ PASS
Code & plan conformance ✅ PASS

Scope: 57a9b035e7 · ad01395354..57a9b035e7 · full · 1 diff chunk

Usage: 31s · 187,817 tokens · 57.8% cache hit · credits unavailable

Blockers

  • pr-format Pull-request title must use the lowercase prefix: Subject format.

Summary

Aggregated the completed native chunk review and inspected its full diff, listing, linked-Issue context, and discussion. No actionable findings were reported. No closing Issues were supplied, so Issue-plan conformance checks do not apply.

Review metadata
  • Commit: 57a9b035e7
  • Range: ad01395354..57a9b035e7
  • Mode: full
  • Diff chunks: 1
  • Model: gpt-6.1-sol
  • Reasoning effort: low
  • Session: repo-1309321116-pr-70-v2
  • Generation: 923334f7506afdc45511e2725890793d5b68beebb9ee907b2d99addc76032988
  • Evidence: 684321edeaf667c7e5c13c3f08bf4c365577a32b6aed66c78bfe6d1cd26e53ca

Totals

  • Input: 186,670
  • Cached input: 107,931
  • Cache write: 78,709
  • Output: 1,147
  • Reasoning: 32
  • Total: 187,817
  • Estimated credits: unavailable for this model
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 N/A
code full chunk 1/1 12s 63,434 39,887 62.9% 433 63,867 N/A
pr full pr 12s 66,640 43,097 64.7% 471 67,111 N/A
code full aggregate 7s 56,596 24,947 44.1% 243 56,839 N/A

@idy idy changed the title fix(review): count action source objects separately from file entries fix: Separate action source object and file budgets Nov 17, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ OpenAI PR Review: PASS

Conclusion: Ready from the OpenAI review perspective. PR format, linked Issue design, and code/plan conformance passed with no actionable findings.

Review checks

Check Result
PR format ✅ PASS
Issue design ✅ PASS
Code & plan conformance ✅ PASS

Scope: 57a9b035e7 · 57a9b035e7..57a9b035e7 · incremental · 1 diff chunk

Usage: 8s · 65,086 tokens · 49.6% cache hit · credits unavailable

Summary

Aggregated the completed native chunk review and inspected its full diff, listing, linked-Issue context, and discussion. No actionable findings were reported. No closing Issues were supplied, so Issue-plan conformance checks do not apply.

Review metadata
  • Commit: 57a9b035e7
  • Range: 57a9b035e7..57a9b035e7
  • Mode: incremental
  • Diff chunks: 1
  • Model: gpt-6.1-sol
  • Reasoning effort: low
  • Session: repo-1309321116-pr-70-v2
  • Generation: ca4a993e0fc02b56888ab15276ffbb433d72c03455bea0528e03a26755f9bb18
  • Evidence: 9586b4e20be0bb6dd302ab0b31dfc1389f709420107011a4ff06a08e6d2b41f1

Totals

  • Input: 64,897
  • Cached input: 32,173
  • Cache write: 32,718
  • Output: 189
  • Reasoning: 0
  • Total: 65,086
  • Estimated credits: unavailable for this model
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 N/A
pr incremental pr 8s 64,897 32,173 49.6% 189 65,086 N/A
code reused cached evidence 0s 0 0 0.0% 0 0 N/A

@idy
idy merged commit b3c5b9c into main Nov 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant