Repository navigation
fix(node-sea): bound duplicate blob verification work - #11736
Conversation
…it-open-11215-20261116
…al-open-11215-20261116
…file
The Windows-only case at `clientConfigurationEnvironment.test.ts:226` wrote
`rea_mcp_input_schema_profile: "full"`. That profile was retired: the reader
now refuses it ("REA_MCP_INPUT_SCHEMA_PROFILE accepts only \"compact\" …"),
so `configureClientConfiguration` returned `failed/readback` before writing
and the case failed on every Windows run, including main's own
`Windows capability and package lane`.
The case has no Windows dependency — it passes an explicit `configPath` and
the Kimi write dialect is the same everywhere — so it now runs on every
platform, which is what let the stale value rot unnoticed. The fixture keeps
the lowercase explicit key the case is about, with the supported value.
Verified on `main` `d6bcfc10`: the same fixture driven through
`configureClientConfiguration(..., "win32")` on this host reproduced
`{"status":"failed","reason":"readback"}` with the retired value and now
returns `{"status":"configured"}` with `compact`. The file's 75 cases pass
here (66 run, 9 platform-conditioned skips) and `check:fast` passes.
…alue-11215 # Conflicts: # src/artifacts/nodeSea/NodeSeaLocation.ts
Codex Review Summary: ❌ FailedThis 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 PR appears safe to merge. SummaryBounds duplicate Node SEA blob checks by the carrier file size before hashing starts.
No actionable issues found. Tests were not rerun. The PR replaces #11215 according to its description; no newer replacement could be verified from the available context. Reviews (2) · Last reviewed commit: "test(node-sea): assert duplicate-blob re..." · Reviewed by Greptile |
|
@morluto Could you please review this PR when you have time? As the author, I am finding the ongoing work of keeping these pending branches synchronized and revalidated a substantial maintenance burden. The current head's CI has passed, there are no unresolved inline review threads, and the PR description records the evidence and remaining validation limits. If this change is outside the project's priorities or scope, a clear direction would also help me avoid further unnecessary maintenance. Thank you. |
Co-authored-by: morluto <[email protected]>
Merging main reapplied the morluto#11732 case beside the copy already on main. Co-authored-by: morluto <[email protected]>
The CLI coverage already checks the truncated code and limit details. Co-authored-by: morluto <[email protected]>
Summary
Bound Node SEA duplicate-blob verification before hashing native payloads. A crafted Mach-O with eight overlapping section declarations makes a 17,135-byte file trigger 131,072 bytes of payload hashing and return a candidate location on main. Increasing the declaration count multiplies this work even when each blob satisfies the selected per-blob limit.
The shared
collapseRangesowner serves Mach-O, ELF and PE. It deduplicated exact ranges but had no aggregate hash-work allowance. This is distinct from merged #8031's ELF note-header scan bound; the reproduction uses Mach-O and reaches the later payload-hashing stage. The Deno sibling already enforces a carrier-size duplicate-verification allowance.Resubmission and prerequisites
Replaces #11215 at the human owner's request after repairing its inherited CI failures. Bound cumulative duplicate Node SEA blob verification work. The original feature commits are preserved; prior review and baseline reproduction evidence remain available in #11215.
Qualified head
29c3e4162incorporates main552d1c710, including the merged shared CI repair #11727. It also explicitly includes the missing-installation JVM-probe repair #11732; that prerequisite requires review. The new comparison drops the shared fixes already accepted upstream.The Node SEA allowance error is migrated to the current shared resource entry point and typed work-allowance facts, preserving its original carrier-byte work bound and acceptance controls.
Executed validation
Linux, Node 24.22.1 / npm 11.9.0:
npm run test:focused -- src/artifacts/nodeSea/NodeSeaHashWork.test.ts tests/boundary/cli/nodeSeaHashWork.test.ts— Test Files 2 passed (2); Tests 5 passed (5); required build passed.npm run check:fast, normal commit/pre-push hooks, andgit diff --checkpassed.Hosted CI is running for this replacement. Native Windows/macOS and the complete monolithic suite were not run locally. Checked-in independent producer witnesses were exercised by the selected tests; producer generation was not rerun unless named above.
Author readiness
Human owner: @ShuaixinHuang
The initial readiness declaration is carried from #11215; the repository permits later corrective pushes without a new initial declaration.
Summary
Bound Node SEA duplicate-blob verification before hashing native payloads. A crafted Mach-O with eight overlapping section declarations makes a 17,135-byte file trigger 131,072 bytes of payload hashing and return a candidate location without this bound. Increasing the declaration count multiplies this work even when each blob satisfies the selected per-blob limit.
The shared
collapseRangesowner serves Mach-O, ELF, and PE. It deduplicated exact ranges but had no aggregate hash-work allowance. This is distinct from merged #8031's ELF note-header scan bound; the reproduction uses Mach-O and reaches the later payload-hashing stage. The Deno sibling already enforces a carrier-size duplicate-verification allowance.Change and scope
Replaces #11215. Head
2257f126cis a merge of currentmain(6a5d77bf2) plus the Node SEA bound.NodeSeaLocation.tskeeps main's reader, including the Mach-O segment admission from #12156, #12193, #12263, and #12288, and adds this PR's carrier-byte duplicate-verification bound. Unequal lengths still fail as a format error before hashing. Overlapping equal-length copies whose total hashed bytes exceed the carrier file size fail with the fixed work allowance (reason: "limit",boundary: "capacity").The Ghidra absent-installation hunks duplicated merged #11732. The merge had reapplied that test beside the copy already on main; that duplicate is removed. The diff against main does not touch
GhidraInstallation.The public CLI regression asserts
code: "truncated"anddetails.reason/details.boundary. It does not check stdout prose.Contribution scope: ordinary fix inside the existing Node SEA reader. A new provider or target-execution capability is not applicable.
Validation performed
Linux, Node 22.23.4 / npm 11.16.0. Engines allow
^22.23.4..nvmrcpins 24.22.1; that exact build was not the Node used here.oxfmton the touched Node SEA sources, tests, and docs — no further edits.npm run test:focused -- src/artifacts/nodeSea/NodeSeaHashWork.test.ts tests/boundary/cli/nodeSeaHashWork.test.ts— Test Files 2 passed (2); Tests 5 passed (5). The required build passed.npm run check:fast— typecheck, lint, and architecture guards passed. The pre-push hook ran the same check from cache.Native Windows/macOS and the complete suite were not run. The selected tests exercised the checked-in fixtures; producer generation was not rerun.
Author readiness
Human owner: @ShuaixinHuang
The initial readiness declaration is carried from #11215; the repository permits later corrective pushes without a new initial declaration.