Skip to content

test(firmware): keep producer fixtures within supported Node limits - #7048

Merged
morluto merged 2 commits into
morluto:mainfrom
Plastic-time:codex/fix-firmware-fixture-node-compat-20261024
Oct 28, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
Plastic-time:codex/fix-firmware-fixture-node-compat-20261024

Conversation

@Plastic-time

@Plastic-time Plastic-time commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep the synthetic firmware producers reliable on the supported Node 22/24/26 lines without changing production resource limits or weakening test assertions.

Related to #5672: these failures were found while rerunning its cancellation fix after @CassieFox23 requested fresh verification. The recorded findings reproduced on unchanged upstream. This PR is independently based on 238914974; #5672 is the discovery context, not a dependency.

Problem and expected behavior

  • Node 22.23.4 prepends a V8 flag-conflict warning when the fixture starts with --jitless, breaking the two exact missing-report stderr assertions.
  • Node 26.12.1 intermittently aborts the oversized-child producer with Worklist::Segment::Create out-of-memory under the existing 1 GiB address-space limit, before the intended publication/continuation assertions run.

The synthetic producer should finish within the real limiter and emit its intended diagnostics.

Change and scope

  • Pass --no-expose-wasm only on Node 22, where it prevents the startup warning. Newer tested versions do not accept this option.
  • Hash the actual oversized file with one reusable 64 KiB buffer and a file handle closed in finally, reducing chunk-allocation pressure.
  • Preserve the 128 MiB + 1 byte child, actual digest, existing assertions, and production limits. Only two fixture files change.

Contribution scope: not applicable — ordinary test-fixture maintenance within the existing boundary.

Contract and boundary impact

  • Owner: synthetic firmware producer launch and report generation.
  • CLI/MCP, provider contracts, evidence semantics, generated metadata and package behavior: unchanged.
  • Test effects: launch the existing synthetic Node processes; read and write disposable fixture files. No real firmware engine or target execution, new network access, or containment relaxation.

Evidence and regression coverage

Linux matrix, exact candidate 15c9c975:

Node Six existing boundary/MCP files
22.23.4 66 passed
24.22.1 66 passed
26.12.1 66 passed

Unchanged 238914974 reproduces the two Node 22 failures. The Node 26 failure is intermittent: its suite passed in this matrix, but two of three standalone producer repeats aborted; the earlier baseline suite also failed the oversized-child case.

A same-runner Node 26 comparison then ran each revision 20 times under the unchanged 1 GiB limit: baseline 14 aborts/20, candidate 0/20. Every successful output was independently checked with Python for size 134,217,729 and SHA-256 matching its report. This is a bounded sample, not a failure-rate estimate.

For completed standalone Node 26 runs on that runner, peak RSS was 64,824–65,036 KiB on baseline versus 49,852–50,272 KiB on the candidate; elapsed time was 0.12–0.13 s versus 0.14–0.15 s, and user+system CPU was 0.15–0.16 s versus 0.13–0.14 s. These are /usr/bin/time -v producer-process measurements, not full extraction benchmarks or cold/warm cache comparisons. Agent-token costs were not measured.

Validation performed

  • npm run test:focused -- the five firmware boundary files plus tests/boundary/mcp/firmwareMcp.test.ts — 66 passed on each Node version.
  • npm run check on Node 24/Linux — passed, including typecheck, built lint, formatting, knip, metadata and architecture guards; lint reported 0 errors and 2744 warnings.
  • git diff --check — passed.

Compatibility, safety, and release

No production or release changes. The temporary verification workflows stay on separate fork branches. Real Unblob/Binwalk and other operating systems were not exercised by this change; the MCP test uses the synthetic producer. Full-suite coverage remains with upstream CI.

Author readiness

Human owner: @Plastic-time

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The fixture changes appear safe to merge.

Summary

Updates the synthetic firmware producers without changing production limits or test assertions.

  • Node 22 firmware fixtures start without an extra warning.
  • Oversized firmware fixtures hash their files with bounded memory.

Review limits: tests were not rerun. Superseded status could not be checked because GitHub authentication was unavailable.

Reviews (1) · Last reviewed commit: "test(firmware): apply the Wasm flag only..." · Reviewed by Greptile

@Plastic-time
Plastic-time marked this pull request as ready for review October 24, 2026 22:51
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-24T22:51:16.690001Z 15c9c97 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Contributor Author

Additional Linux validation for 15c9c975f04b7ebe55ea8caf4b8214fd017b21c5 on 2026-10-27, in assistant-cloud Debian 13.6 x86-64 with npm 11.16.0:

  • After fresh builds, the six firmware boundary/MCP files passed 66/66 on each of Node 22.23.4, 24.22.1 and 26.12.1. Tested main baec375c347f129cb109823cff31831e906039f0 plus this patch passed 68/68 on Node 22; unpatched main failed exactly the two missing-report stderr assertions because of the Wasm warning.
  • Standalone oversized producers ran under the real 1 GiB address-space, CPU and file-size limits: 20/20 baseline and 20/20 candidate runs passed on each Node version. All 120 files were independently checked for 134,217,729 bytes and SHA-256 matching their reports. The historical Node 26 abort did not reproduce on this machine.
  • Fresh check:fast, changed-file formatting and diff checks passed. Main plus this patch and fix(artifacts): handle ASAR cancellation before output consumption #5672 also passed 165 tests in 19 files. Combined changed-file typed lint had 0 errors / 5 warnings, including two nested-loop-depth warnings in this producer.

Environment caveat: ambient NODE_USE_ENV_PROXY=1 caused an unrelated Node 22 jitless/Undici bootstrap failure on both revisions. Matching offline runs unset only that flag; the original failures were retained.

No full repository suite, full npm run check / check:pr, other-OS, or real Unblob/Binwalk validation was performed in this pass. Firmware MCP coverage uses in-memory transport and limited synthetic subprocesses.

@morluto
morluto merged commit b75419b into morluto:main Oct 28, 2026
46 of 49 checks passed
@morluto morluto added the area: tests Test suite and verification label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants