Repository navigation
docs(go): clarify cumulative build-info search budget - #2731
Conversation
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ec84d23da
ℹ️ 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".
[Low impact] The documentation-only change appears safe to merge. SummaryClarifies the cumulative Go build-info search budget in
Reviews (15) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
|
Addressed the overlapping-range findings and verifier cleanup finding in 43568cd. The record reader now deduplicates identical file spans with the same virtual alignment and charges each remaining span before scanning against a cumulative 256 MiB byte budget. Partial overlaps cannot multiply work by the program-header count indefinitely. Exhaustion returns the existing resource-constraint contract with The verifier now checks Validation: the new overlapping-span reader and public CLI regressions fail before the fix and pass afterward. Coverage also includes duplicate spans, the exact cumulative limit, different virtual alignments, the MCP resource diagnostic and a subsequent successful ping. All 151 focused Go tests pass (three existing Windows ELOOP exclusions); static/docs checks pass. The real Go 1.27.2 verifier passed again on Windows: 14 compiler-produced binaries and 28 CLI/MCP cases, including the sectionless PIE/non-PIE pairs and the corrected root-removal assertion. Produced target binaries are inspected offline, not executed. Whole-process lineage observation remains unavailable on this Windows verifier host; the report retains that limitation explicitly. |
* fix(comparison): preserve incomplete function call evidence Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty. Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls. * fix(comparison): recheck historical calls-only changes --------- Co-authored-by: morluto <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ce0f0345c
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28aa21f9fe
ℹ️ 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".
Share tagged readiness observations, retain partial provider facts, authenticate bridge identity, bound diagnostics, and preserve cancellation and lost-session reasons. Fail closed for unparsed MIPS ABI attributes and macOS saved Hopper databases without a script-capable bridge route. Reviewed fixes: #2010, #2108, #2513, #2695, #2731, #2771, #2828, #2867, #2868, #2870, #2880, #2919, #2945, #2961, #2981, #2998, #3000, #3002. Validation: 285 focused source/boundary tests passed. Real Ghidra, IDA, Linux Hopper, and Windows provider runs were not repeated. BREAKING CHANGE: MIPS targets with unresolved GNU ABI attributes and saved Hopper databases on macOS are refused rather than advertised as supported.
Preserve XML and Interface Builder identity at their parsing boundary, retain usable Objective-C slots with precise coverage, and keep native trace failures distinct from absence. Add caller-selected Interface Builder summaries backed by complete retained Evidence, and preserve comparison limitations. Reviewed fixes: #1969, #2088, #2108, #2513, #2639, #2684, #2731, #2759, #2875, #2888, #2889, #2970, #2971, #3002. Validation: relevant native/domain focused lane passed 142 tests; earlier Interface Builder/MCP checks passed 24 tests. Real native UI and Ghidra producer coverage was not repeated.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Updated in 7bf9be7 after merging current main and retaining its native-section facts. Main already incorporates the multi-load discovery and bounded-search implementation; the tool discovery description now also states the cumulative 256 MiB header-search budget, alongside the separate file bound. Revalidation passed: 154 focused reader/mapping/provider/module/CLI/MCP tests (3 platform skips), check, docs:check, and the Go 1.27.2 real verifier with 14 compiler-produced binaries / 28 public CLI/MCP cases. Sectionless PIE recovers complete metadata equal to its original producer image; the original PIE, original executable and sectionless executable retain their baseline metadata. No directly related cleanup is deferred. Cost evidence uses those four real ELF files (2.23–2.38 MiB), Node 24.18.0 on Linux, and the same bundled reader entry point at base 96fc84f and the current implementation. Each process reads and parses each file once, then three more times. The first read is distinguished from repeats; OS filesystem caches were not flushed.
For the sectionless PIE specifically, first-read parsing was 16.18 ms at base and 9.91 ms currently; subsequent reads were 10.01–10.11 ms and 9.81–10.51 ms respectively. Base returns no build information for this input; current returns the full compiler/module/dependency/settings record. The other three inputs have equal decoded metadata across versions. These observations describe the cost of metadata recovery; they are not a throughput estimate. The completed current-head public CLI workflow was also measured in two fresh-process passes over all four files: first-pass elapsed 5.28–5.54 s / CPU 1.66–1.72 s, second-pass elapsed 5.22–5.32 s / CPU 1.64–1.68 s, sampled peak family RSS 317–322 MiB across both passes. RSS was sampled every 20 ms and CPU includes the owned child process family. Before/after end-to-end CLI comparison, physical cold-cache cost and agent-token usage were not measured; these runs do not invoke an LLM. Functional CLI/MCP parity is covered separately by the verifier above. |
|
Heads up: main already has this change in 55dd21a. The code is in 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Compared this PR with main The current PR net diff is only the Go tool description's cumulative build-info header-search bound; the summary still describes the earlier later-segment parser fix. Please retitle and rewrite the body around the remaining documentation/contract wording, checking that the advertised cumulative bound matches the owning scanner's actual accounting. If another parser behavior remains missing, show that separately with its smallest fixture instead of leaving delivered implementation work in the pending summary. PR head reviewed: |
|
Retitled and rewrote the body around the remaining discovery-contract sentence. The parser and its delivered later-load behavior are no longer presented as pending work. Checked the wording against After synchronizing main, 143 focused Go reader/mapping/provider/CLI/MCP tests passed (3 platform skips), including the exact-limit, duplicate, overlap, alignment and public error-path checks. |
# Conflicts: # src/contracts/go/goToolContracts.ts
|
CI-track update: I merged latest |
Summary
Document the cumulative Go build-info header-search budget in
inspect_go_binarydiscovery. The remaining diff is one tool-description sentence; the later-load ELF parser fix and its regressions are already on main.Problem and expected behavior
The description names the 256 MiB file bound but omits the independent cumulative search budget. Overlapping load ranges can exhaust that budget even when the file itself is smaller.
Change and scope
Clarify that each distinct search span is charged in full before searching, and partial overlaps are charged separately.
readGoBinaryImageowns this accounting: identity is file offset, size and virtual-address alignment modulo 16. Identical identities are skipped; each remaining span consumes its full size, including a span in which a header is found early. Exactly 256 MiB is accepted; a next span that would exceed it raises the existing typed resource failure before scanning.Contract and boundary impact
inspect_go_binarydescription ingoToolContracts.ts, checked againstGoBinaryImage.tson mainc61c108b.Evidence and regression coverage
Source comparison confirms the scanner already enforces this budget. Existing executed coverage includes distinct overlapping spans, duplicate spans, the exact limit, different virtual alignments, public CLI resource diagnostics and subsequent MCP responsiveness.
Validation performed
On the branch synchronized with main
c61c108b, Node 24.18.0 / Windows:npm run check,npm run docs:check,git diff --check: passed.Compatibility, safety, and release
Documentation-only; no breaking changes or runtime cost change. Real Go producer runs from the earlier implementation remain historical evidence, not new runs for this wording update.
Author readiness
Human owner: @cyanseek