Repository navigation
feat(pe): inspect Rich header linker records - #8923
Plastic-time wants to merge 57 commits into
Conversation
Add inspect_pe_rich_header and the inspect-pe-rich-header command. They read the Rich header between the DOS stub and the PE signature without a provider. - Take the last DWORD-aligned Rich footer before the PE signature and walk back to its DanS marker. - Report each product ID, build and use count, the decoded padding and the record's file range. - Recompute the linker checksum and report whether it reproduces the stored key. - Report an absent record, and a footer without DanS or with a partial entry as malformed. The verifier compares key and entries with pefile 2024.8.26.
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The reviewed code appears safe to merge, subject to the maintainer scope decision Plastic-time has left pending. SummaryAdds
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A["CLI / MCP"] --> B["PeRichHeaderService"]
B --> C["PeRichHeaderProvider"]
C --> D["Hash file and retain prefix"]
D --> E["Read shared PE headers"]
E --> F["Fill one stub buffer and decode"]
F --> G{"File still matches?"}
G -->|Yes| H["Observed Evidence"]
G -->|No| I["Typed failure"]
Reviews (40) · Last reviewed commit: "fix(pe): read large DOS stub into one bu..." · Reviewed by Greptile |
- Scan aligned DWORDs for the Rich footer and DanS marker in one loop that yields and checks cancellation every MiB. A stub full of unaligned Rich strings no longer holds the event loop. - Declare the padding words with fixedTupleSchema and cover them in the tuple parity tests. - Import the binary diagnostics contract family in the focused CLI and MCP tests. - In the pefile verifier, exclude files only by pefile's own layout result, fail any other state difference, refuse a run that compares nothing, and give the CLI check the same read budget.
A PE whose e_lfanew points inside the 64-byte DOS header passes readPeHeaders, and the parser reports no Rich record for it. The service then refused the report as malformed provider output, because it required pe_header_offset to be at least 64. Drop that lower bound. The footer checks still reject any record reported before 0x40.
|
Very interesting! |
…ct-pe-rich-header # Conflicts: # docs/index.md
- Once the stable read completes, a later decoding failure or cancellation keeps the file's path, SHA-256 and byte count as a partial observation. - The pefile verifier now fails on a file that pefile reads but REA rejects. An input both reject, such as an empty file, is listed apart.
…ct-pe-rich-header # Conflicts: # .agents/skills/reverse-engineer-anything/SKILL.md # .agents/skills/reverse-engineer-anything/references/native-and-artifacts.md # docs/cli.md # docs/index.md # package.json # src/domain/investigationProviders.ts # tests/process-global/stableArtifactConsumers.test.ts
- Since main's 21ad5b1, readPeHeaders reports a valid DOS MZ image with no PE header as unsupported. The Rich header provider now maps that to unsupported_target instead of execution_failure. - PeUnsupportedTargets.test.ts and the CLI and MCP acceptance test now cover inspect_pe_rich_header.
…pect-pe-rich-header # Conflicts: # src/contracts/toolEffects.test.ts
…pect-pe-rich-header # Conflicts: # docs/.vitepress/config.ts # docs/index.md
`--max-file-bytes` and `--max-entries` on `inspect-pe-rich-header` now use `cliDecimalField`, like the other numeric CLI options since main's 99db80a. `0x10` and `1e3` are rejected instead of parsed.
- Add spec.md, plan.md and tasks.md under docs/specs/native/pe-rich-header/, as docs/development/documentation.md now requires for a new feature. - tasks.md says the specification was written after the first implementation. - The guide links to the three documents.
…pect-pe-rich-header
- docs/development/documentation.md puts analyst guides under docs/guides/<domain>/. - The public route stays /pe-rich-header. documentation.ts now lists the guide under Native binaries. - Links from the docs index, the docs README, the CLI guide, the spec plan and the skill follow the move.
|
TL;DR: I ran the PR's 11 changed test files on Node 22.23.4, 24.22.1 and 26.12.1. Every run passed all 256 tests. The head is 25 commits behind main c78c8ae, and I did not test a merge. Edit (20 Nov): I ran the new head, 9a0e6b2, in a VM, and the results are here.
The PR changes 41 files against the merge base 559083b. Eleven are test files and 30 are others, such as docs and CI on head 01fb8cb, read live with
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/application/binaryDiagnostics/PeRichHeaderService.test.ts src/contracts/tupleSchemaParity.test.ts src/native/pe/PeRichHeaderParser.test.ts src/native/pe/PeRichHeaderProvider.test.ts src/native/pe/PeUnsupportedTargets.test.ts tests/acceptance/applications/peUnsupportedTargets.test.ts tests/acceptance/peRichHeaderCli.test.ts tests/acceptance/tools/localToolContracts.test.ts tests/boundary/filesystem/peRichHeader.test.ts tests/boundary/mcp/peRichHeaderMcp.test.ts tests/process-global/stableArtifactConsumers.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
|
TL;DR: On head 9a0e6b2, the PR's 11 changed test files pass on Node 22.23.4, 24.22.1 and 26.12.1. CI run Edit (20 Nov): I ran the new head, 5aa1ccb, in a VM, and the results are here. My last comment tested head 01fb8cb. This run is on head 9a0e6b2. Thanks, Plastic-time, for the tests on the two gaps I listed. Results
The PR changes 46 files against the merge base 8c7977f. Of those, 11 are test files and 35 are other files. I ran only the 11 test files. The
The run tested this head merged into main 88f885a. The PR doesn't change any of those 3 test files. Main's own CI failed the same 3 tests that night: Main's CI on c0d3f2e passed today. So these failures look like main's, not this PR's. Check runs on the head:
GitHub shows the PR as mergeable true with state blocked. The head is 156 commits behind main c0d3f2e. Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/application/binaryDiagnostics/PeRichHeaderService.test.ts src/contracts/tupleSchemaParity.test.ts src/native/pe/PeRichHeaderParser.test.ts src/native/pe/PeRichHeaderProvider.test.ts src/native/pe/PeUnsupportedTargets.test.ts tests/acceptance/applications/peUnsupportedTargets.test.ts tests/acceptance/peRichHeaderCli.test.ts tests/acceptance/tools/localToolContracts.test.ts tests/boundary/filesystem/peRichHeader.test.ts tests/boundary/mcp/peRichHeaderMcp.test.ts tests/process-global/stableArtifactConsumers.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
|
TL;DR: On head 5aa1ccb, the PR's 11 changed test files pass on Node 22.23.4, 24.22.1 and 26.12.1, 381 of 381 on each. Since my last run, the only code change is in ResultsMy last comment tested 9a0e6b2. Two commits came after it. The merge 1e834e9 also edits
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/application/binaryDiagnostics/PeRichHeaderService.test.ts src/contracts/tupleSchemaParity.test.ts src/native/pe/PeRichHeaderParser.test.ts src/native/pe/PeRichHeaderProvider.test.ts src/native/pe/PeUnsupportedTargets.test.ts tests/acceptance/applications/peUnsupportedTargets.test.ts tests/acceptance/peRichHeaderCli.test.ts tests/acceptance/tools/localToolContracts.test.ts tests/boundary/filesystem/peRichHeader.test.ts tests/boundary/mcp/peRichHeaderMcp.test.ts tests/process-global/stableArtifactConsumers.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Conflicts: - src/composition/binaryDiagnostics.ts: main split each service factory into src/composition/binaryDiagnostics/<service>.ts and re-exports them. Take main's file, add the createPeRichHeaderService re-export and its own peRichHeader.ts, like peImports.ts. - src/cli/binaryDiagnosticsCommands.ts: main loads each service's composition lazily. Take main's file and register inspect-pe-rich-header the same way as inspect-pe-imports.
Conflicts: - src/composition/binaryDiagnostics.ts: main removed the re-export barrel (morluto#13839). Drop it and import createPeRichHeaderService from binaryDiagnostics/peRichHeader.js in capabilityServices, the filesystem boundary test and the verify script. - src/server/serviceToolBindings.ts: main moved the offline inspection bindings into offlineInspectionToolBindings.ts. Register inspect_pe_rich_header there next to inspect_pe_imports. - reverse-engineer-anything SKILL.md: main compacted the tool list. Add inspect_pe_rich_header and its guide to the PE tables entry. Follow main's malformed-target classification (morluto#14195): - Add inspect-pe-rich-header to the stable-artifact parser-failure CLI table and drop the command's own non-PE refusal case. - Drop the malformed-file row from the filesystem boundary test. - Expect a truncated MZ image to refuse as unsupported_target with format_failure malformed.
…ection Input parsing, the provider call, output validation and late-cancellation checks now come from the shared artifact inspection runner, like inspect_pe_imports. validReport and the Evidence locations stay as the runner's callbacks.
No conflicts. Brings in the main fix for the DirectoryArtifactReader non-file test (morluto#14242) that failed CI on the previous merge base.
… remediation with required_value
…header # Conflicts: # docs/getting-started/cli.md # src/domain/investigationProviders.ts # tests/fixtures/cli-parity/complete-nushell-described-commands.txt # tests/process-global/stableArtifactConsumers.test.ts
Summary
This adds
inspect_pe_rich_headerandrea inspect-pe-rich-header. They read the Rich header of a local PE32 or PE32+ image with no provider, and never run the target.The Rich header is the record Microsoft's linker writes between the DOS stub and the PE signature. It lists which compiler, assembler, linker and import-library builds produced the image, and how many objects each contributed. Today REA has no reader for it.
This is a proposed new read-only tool, and whether REA wants it is for maintainers to decide. An earlier revision exceeded the Grok client verifier's former 255-tool assertion. Main's verifier now discovers the catalog through bounded keyword queries (
e9c72dbd1). #10776 still tracks the catalog-size question.Problem and expected behavior
Use case: an analyst wants to know which Microsoft toolchain built a Windows binary, or whether its Rich header was copied or edited after linking. The binary has no DWARF to ask, so #8523 does not cover it.
Observable outcome:
rich_header.stateispresent,malformedorabsent.product_id,buildandcount.checksum.computedis the linker checksum recomputed from the DOS header, stub and entries.checksum.matchessays whether it reproduces the stored key.DanSmarker, or a record that ends inside an entry, ismalformedwith a reason. A missing record isabsentand carries a limitation saying absence does not show how the image was built.e_lfanewoverlaps the 64-byte DOS header is rejected asunsupported_targetby the sharedreadPeImageFromReaderadmission check.unsupported_target, notabsent.Change and scope
src/native/pe/PeRichHeaderParser.tsreads the record. It takes the last DWORD-alignedRichfooter before the PE signature and walks back to the nearestDanSencoded with that key. Only zero bytes may follow the key up to the PE signature, as the linker writes it. Otherwise the report isabsent.src/domain/native/peRichHeader.tsowns the report schema,PE_RICH_HEADER_ENTRY_BUDGET, andpeRichHeaderEntryLimit. The provider, service (executeArtifactInspection), and MCP tool (admission: "application"insrc/server/offlineInspectionToolBindings.ts) followinspect_pe_certificates. The CLI command is registered from the contract, likeinspect-pe-imports. Failures go through the sharedprojectPeBinaryFailure, reporting structureddetails.limitwithrequired_valueand adapter-aware recovery whenmax_entriesis exceeded.readPeImageFromReader. No existing reader changes.--max-file-bytesand--max-entriesaccept decimal integers only.docs/guides/native/pe-rich-header.md, at route/pe-rich-header, anddocs/reference/limits-and-recovery.mdlistsinspect_pe_rich_headermax_entries.Two choices differ from pefile, on purpose:
DanSsits at0x80. On this host it is at0x58in two third-party drivers and at0x200in a third.Richmarker.tcblaunch.exehas a custom DOS stub that is itself a PE image, with its own record at0xC0. The image's record is the last one, at0x2D20.Not included: names for product IDs or Visual Studio releases, the "rich hash", or any edit of the record.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
src/native/pe/PeRichHeaderParser.ts. It consumes the existingreadPeImageFromReader.inspect_pe_rich_header, and one new command,inspect-pe-rich-header.readStableArtifact. No resources are retained.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): one newverify:pe:rich-headerscript inpackage.json. No runtime dependency and no build output.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
PeRichHeaderParser.test.ts: 20 cases on synthetic PE32 and PE32+ images. The expected key comes from a separate BigInt checksum. Cases include an image embedded in the stub, unaligned markers, a 4 MiB stub that must yield, malformed records, and the entry budget (includingrequiredentry count reporting).PeRichHeaderService.test.ts: input validation, cancellation (a late cancellation keeps the abort reason and the completed Evidence), Evidence locations, omitted vs explicitparameters, and 5 kinds of malformed provider output.PeRichHeaderProvider.test.ts: after the read, an exhausted budget (preservingrequiredcount), a malformed header and a cancellation during decoding all keep the file's path, SHA-256 and size.PeUnsupportedTargets, unit and acceptance: DOS, NE, LE, LX and truncated images get the same codes as the other PE tools.tupleSchemaParityforpadding, CLI acceptance (peRichHeaderCli.test.ts, including--max-entriesrecovery below and above the 65,536 hard ceiling), MCP boundary (peRichHeaderMcp.test.ts, verifying omitted optional parameters are not stamped as caller-selected), filesystem boundary tests, and the sharedlocalToolContracts,stableArtifactConsumersandtoolEffectslists.rea inspect-pe-rich-headerisCOMMAND_NOT_FOUND.scripts/verify-pe-rich-header.mjscompares key and entries with pefile 2024.8.26. Over 17,896 PE files inC:\Windows\System32,C:\Program FilesandC:\Program Files (x86), 17,890 agree, 0 differ, and 5 fall outside pefile's0x80assumption. One 0-byte file is rejected by both.docs/verification/pe-rich-header-2026-11-04.mdholds the record. Third-party files on the test host are not named.tcblaunch.exe.rea inspect-pe-rich-header ... --json:For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
Windows 11 x64, Node 24.22.1, head
b9520bc25, merged with mainb3e769d97(verified zero conflicts against latestorigin/mainviagit merge-tree).28fcde234resolves the merge conflicts insrc/native/pe/PeBinaryFailure.ts(adopting main'sprojectPeBinaryFailureoptions andrequiredlimit propagation) andscripts/verify/fixed-ceiling-registry.json.ec0873c21fixes two issues found after the merge:src/server/offlineInspectionToolBindings.tsswitchesinspect_pe_rich_headertoadmission: "application"so MCP omits unselected default budgets fromEvidence.parameters(matching CLI andinspect_dwarf_units).src/domain/native/peRichHeader.ts,PeRichHeaderParser.ts, andPeRichHeaderProvider.tsnow definePE_RICH_HEADER_ENTRY_BUDGET/peRichHeaderEntryLimit, forwardunit: "entries"andrequired: count, and drop the hand-writtenremediationActionsoprojectPeBinaryFailureformats adapter-aware recovery (--max-entrieson CLI,max_entrieson MCP) and stops suggesting raisingmax_entrieswhenrequiredexceeds the 65,536 ceiling.docs/reference/limits-and-recovery.mdis updated to match.b9520bc25removes the three unused legacy constant aliases (MIN_INSPECT_PE_RICH_HEADER_ENTRIES,DEFAULT_INSPECT_PE_RICH_HEADER_ENTRIES,MAX_INSPECT_PE_RICH_HEADER_ENTRIES) superseded byPE_RICH_HEADER_ENTRY_BUDGET.b9520bc25:npm run test:focused -- src/native/pe/PeRichHeaderParser.test.ts src/native/pe/PeRichHeaderProvider.test.ts src/application/binaryDiagnostics/PeRichHeaderService.test.ts tests/acceptance/peRichHeaderCli.test.ts tests/boundary/mcp/peRichHeaderMcp.test.ts: 5/5 files, 41/41 tests passed.npm run check:fast(typecheck, lint,verify:architecture-guardsacross 3,171 source files): passed.ec0873c21(before removing the unused aliases inb9520bc25):npm run docs:check(6/6 + 8/8),npm run format:check, andnode scripts/verify/fixed-ceilings.mjs: passed.npm run test:focusedacross 13 files (Rich header unit/acceptance/boundary +localToolContracts,advertisedCatalogSummary,advertisedDialect,advertisedMcpTool,providerCapabilityConformance,providerLifecycleCoverage,typedResourceRefusalRule): 13/13 files, 193 passed / 4 skipped.tests/boundary/filesystem/peRichHeader.test.tswas not rerun in this merge update because Windows symlinkEPERMpersists on this host; CI runs it on Linux/macOS.Earlier validation (
5070cbd6f, merged with main0a145c842):849157483runsPeRichHeaderServicethroughexecuteArtifactInspection, likeinspect_pe_imports.validReportand the Evidence locations are its callbacks.parametersrecorded the default limits as if the caller chose them.5070cbd6fbuilds them withcallerAnalysisParameters(rawInput), asDwarfUnitsServicedoes. A new service test covers omitted and explicit limits on the completed result and on the late-cancellation partial observation. Without the fix the omitted case fails; with it the service file passes 13 of 13.binaryDiagnostics.tsre-export file (refactor(composition): prune binaryDiagnostics re-export barrel and migrate callers #13839) and moved the offline tool bindings tosrc/server/offlineInspectionToolBindings.ts. The service, the filesystem boundary test and the verifier importbinaryDiagnostics/peRichHeader.jsdirectly. The binding sits next toinspect_pe_imports.unsupported_target(fix(errors): refuse malformed target bytes as a target, not invalid input #14195) and checks that once per byte reader instableArtifactParserFailureCli.test.ts.inspect-pe-rich-headeris in that table. Its own non-PE CLI case and the malformed row of its boundary test are removed, as main did for the other PE readers.548b1c30dwasdirectoryArtifactReaderOpen.test.ts. It failed the same way on main57f4e3c4band was fixed by fix(tests): expect the path reason for a FIFO root and a symlinked ZIP #14242, which this merge brings in.typecheck,check:fastanddocs:checkpass. The zsh, fish and nushell completion goldens pass.npm run test:focusedon the Rich header tests,stableArtifactParserFailureCli,peUnsupportedTargets,localToolContracts,tupleSchemaParityand the capability conformance tests: 237 passed, 4 skipped. On5070cbd6f, the service, provider, CLI, MCP,stableArtifactParserFailureCli,peUnsupportedTargetsand capability conformance tests: 161 passed;stableArtifactConsumersfiltered to the Rich header: 9 passed;tscpasses.tests/boundary/filesystem/peRichHeader.test.tsfails on this host with a symlinkEPERM, aspeImports.test.tsdoes on main.Earlier merges:
ee449a5bd, merged with main69a691e05:src/composition/binaryDiagnostics/peRichHeader.tsbuilds the service likepeImports.ts, andinspect-pe-rich-headerimports it the same wayinspect-pe-importsdoes.discover_tools. I recomputed the advertised schema summaries while only the listing server reported a POSIX platform. All 265 match the committed files, this tool's included.typecheck,lint(with module boundaries),format:check,verify:architecture-guards,docs:checkandverify:test-discoverypass.src/contracts,src/native/pe,src/server,tests/conformance,tests/evaluation, the CLI parity and coverage tests andstableArtifactConsumers: 3,442 passed, 17 skipped, 4 failed. All four fail on this Windows host for reasons outside this PR:EPERMinpeRichHeader.test.tsand in the Hopper fixture test. The Rich header test's four other selections pass when run without the symlink.moduleBoundaries.test.tsexpects a forward-slash path in an error message.managedNativeVerificationfor an empty PE module filename fails the same way on clean main.cliParityGoldens.test.ts: 29 cases fail on this host, the count recorded on clean mainf7849cad3. None names the Rich header. The three completion goldens that listinspect-pe-rich-headerpass. Clean main69a691e05was not rerun.5aa1ccbf5, merged with main9c3ab4a0d:notepad.exeandcmd.exe, pefile 2024.8.26 agreed on both records and both checksums matched. The CLI result matched the service result for the first present record. Command:node scripts/verify-pe-rich-header.mjs C:\Windows\System32\notepad.exe C:\Windows\System32\cmd.exe.npm run check:fastandnpm run docs:checkpass.npm run verify:docs:routeschecked 178 HTML pages and 1,569 distinct internal targets and anchors.npm run test:focusedon the 11 test files this PR changes: 376 passed, 4 skipped, 1 failed. The failure is the symlinkEPERMintests/boundary/filesystem/peRichHeader.test.tson this host.docs/index.mdguide table with a link to the documentation directory and regroupeddocs/README.md. This merge takes main's version of both. The Rich header guide is listed under "Native binaries", next to the other PE guides.readPeHeadersfromsrc/domain/pe/peResourceLayout.ts.9a0e6b2d7reads the PE header offset, machine and format throughreadPeImageHeadersinsrc/domain/pe/peImageHeaders.ts, the shared reader that replaced it.cliParityGoldens.test.ts: 29 cases fail on this head, the same count as on clean mainf7849cad3on this host. None of them names the Rich header. Clean main8c7977f17was not rerun.472f6c0ceregisterstests/acceptance/peRichHeaderCli.test.tsas the capability's public-workflow case.providerCapabilityConformance.test.tsfailed 2 of 75 cases before and passes 75 of 75 after. All oftests/conformance: 527 passed, 14 skipped, 2 failed. One failure is a symlinkEPERMin the Hopper fixture test. The other,managedNativeVerificationfor an empty PE module filename, fails the same way on clean main552d1c710on this host.8efcfdd0efixes the two CI failures on472f6c0ce:providerLifecycleCoverage.test.tslackedrea-pe-rich-header. It now lists the provider as in-process, covered like the other PE providers. Before: 1 of 3 failed. After: 3 of 3 pass.cliParityGoldens.test.tslackedinspect-pe-rich-header. Only those three cases were re-recorded. Each file differs from the old one by that single entry, with LF endings.stableArtifactConsumerscovers the provider's read-cleanup, nested-owner and cancellation paths through the shared PE projection.presentwith the inner entries on6f3b15c84absentoncc3b002ceexecution_failureon2e1f23bf0unsupported_targeton5a912aea9unreadable_outputon4af9a5243absentonc03be56c4Richmarker4af9a5243--max-entries 0x10and1e3cliDecimalArgumentsfails onec62523bf0f412071dc1db5e5ecprovider155b2c700node scripts/verify-pe-rich-header.mjs C:\Windows\System32\driverswith pefile 2024.8.26 passed on1dd2dbe93.cc3b002ce, the zero-padding rule on real files, read-only: 18,451 PE files under the same folders, with some third-party folders skipped. All 11,427 records are followed only by zeros, so the rule changes no result there. The built parser on the files up to 64 MiB: 11,398present, 7,004absent, 0malformed.eae1409f3, throughscripts/rea.mjs:--helplists both options.--max-entries 2onnotepad.exefails withresource_constraint(11 entries). A relative path keepscaller_input_path.582fe9f80:typecheck,lint(with module boundaries),format:check,docs:check,verify:architecture-guards,verify:test-discoveryandverify:docs:routes(437 pages) passed.knipandlint:typedfail only on files this PR does not change: unused exports, an unusedsrc/cli/domainInput.ts, the duplicate export insrc/hopper/HopperReplyContracts.ts, and fourswitch-exhaustiveness-checkerrors.e9c72dbd1.eae1409f3also failedNative package baseline (darwin arm64). Hopper'slist_segmentsoutput misses its contract. Main2e1e6593ffails the same job with the same error.Compatibility, safety, and release
package.jsonscript. No new dependency.max_file_bytes(default 64 MiB), decoding bymax_entries(default 1024), and long scans yield and check cancellation every 1 MiB. Exhausted budgets fail without partial success.Author readiness
Human owner: @Plastic-time
Author checklist (completed by the PR author before requesting review)
type(scope): outcome.REA_runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.Left unchecked:
max_file_bytesandmax_entriesare caller arguments with fixed ceilings, notREA_runtime settings. The file budget (default 64 MiB, ceiling 512 MiB) is the oneinspect_pe_imports,inspect_pe_load_configandinspect_pe_certificatesuse. The entry ceiling (65,536) matchesinspect_pe_resourcesdirectory entries.AI was used for assistance.