[PR #3291] [CLOSED] fix(test): keep capinfos fixture output byte-exact #5705

Closed
opened 2026-10-31 01:08:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3291
Author: @ShuaixinHuang
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: codex/fix-pcap-fixture-output


📝 Commits (1)

  • 1804dba fix(test): keep capinfos fixture output byte-exact

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 tests/boundary/pcap/pcapProvider.test.ts (+2 -1)

📄 Description

Summary

Keep the capinfos stub output and retained-cleanup assertion byte-exact. The stub emits a trailing newline, but CAPINFOS_OUTPUT omitted it. The exact raw-output assertion therefore fails before reaching cleanup recovery checks.

The failure is visible in CI #9195, test shard 5/5, in retains parsed output and cleanup ownership when capinfos cleanup is unresolved at pcapProvider.test.ts:214. The other shards were canceled and the aggregate required check failed.

Problem and expected behavior

The executed merge was 3dcf171c657c2de19b62e247a26c35a613986caa, merging resource PR #3236 into main 7375ab6e34e511095a74d5a67e57cec28d56fd10. This PCAP file and its provider are identical between that baseline and merge. The defect is also present in this branch's baseline e5791229f3d64e3b3ccc9d839b8e4c567e97cc98.

The capinfos fixture emits 222 bytes including its terminal newline; the assertion expects a 221-byte constant. Both should describe the same exact output.

Change and scope

Put the terminal newline in the canonical CAPINFOS_OUTPUT fixture value and emit that value with printf '%s'. The subprocess emits the same bytes as before, and the existing exact assertion remains intact. The tshark JSON fixture already uses this exact-value emission rule. The change is one file, two added lines and one removed line.

Routine test-fixture correction within existing contribution scope; a separate maintainer capability decision is not applicable. Output representation is owned by the test fixture. CLI/MCP contracts, schemas, dependencies, packaging and production provider behavior remain unchanged. Existing cleanup, ownership and partial-observation assertions are preserved; no further output-representation cleanup remains. The test launches only its existing local stub processes and uses temporary fixture files.

Evidence and regression coverage

Reconstructed the actual writeStubTools producer directly from each version's TypeScript source and executed its emitted capinfos script using the installed Git POSIX shell. Baseline exact comparison fails (221 expected bytes, 222 actual); fixed comparison passes (222 expected and actual). Raw subprocess output is byte-for-byte unchanged. This establishes the fixture drift, while Linux process supervision still requires remote CI.

Validation performed

Windows x64, pinned Node 24.18.0 / npm 11.16.0 and unchanged locked dependencies:

  • Actual shell fixture byte comparison: baseline mismatch reproduced, fixed output exact, emitted bytes unchanged.
  • npm run test:local -- src/pcap/PcapConfiguration.test.ts: 14 passed, including metadata parsing.
  • npm run check: all six tasks and architecture guards passed; zero lint errors.
  • git diff --check: passed.
  • Published commit tree compared to the locally validated tree: identical.

The Linux-only pcapProvider.test.ts workflow could not run on this Windows host. The original failing Linux CI is linked above; current-head Linux CI must verify cleanup recovery before merge. No real Wireshark or full-suite pass is claimed.

Current-head CI #9338, head 1804dba8471ff764c7ca4a02fc8ec522152584f2, executed merge f97e44b8353c6d7fedda0bc529e13950c6cd891e against main e5828596c50029e48feb7f56d6f5fe7b5580a561: static checks, source tests, package build, PR title, and the real packet capture/tshark lane passed. Shard 5 reported 1,227 passed, 21 skipped, and one failure in clientConfigurationBom.test.ts:154 (Cursor removal returned retained rather than removed); shards 1–4 were canceled. The required aggregate CI remains failing. This run does not establish a complete pass of the PCAP provider boundary suite. The remaining failure and canceled coverage must be addressed or accepted by the maintainer before merge.

Author readiness

Human owner: @ShuaixinHuang

  • 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 the current revision ready for maintainer review.

Before merge

  • Concrete CI failure traced to the exact executed revision.
  • Producing fixture and expected bytes share one canonical value.
  • Precise output, cleanup and ownership assertions retained.
  • Local relevant checks pass; host limits reported.
  • Required current-head Linux CI accepted by the maintainer.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3291 **Author:** [@ShuaixinHuang](https://github.com/ShuaixinHuang) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/fix-pcap-fixture-output` --- ### 📝 Commits (1) - [`1804dba`](https://github.com/morluto/rea/commit/1804dba8471ff764c7ca4a02fc8ec522152584f2) fix(test): keep capinfos fixture output byte-exact ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/pcap/pcapProvider.test.ts` (+2 -1) </details> ### 📄 Description ## Summary Keep the capinfos stub output and retained-cleanup assertion byte-exact. The stub emits a trailing newline, but CAPINFOS_OUTPUT omitted it. The exact raw-output assertion therefore fails before reaching cleanup recovery checks. The failure is visible in [CI #9195, test shard 5/5](https://github.com/morluto/rea/actions/runs/38520010392/job/115708085729), in `retains parsed output and cleanup ownership when capinfos cleanup is unresolved` at `pcapProvider.test.ts:214`. The other shards were canceled and the aggregate required check failed. ## Problem and expected behavior The executed merge was `3dcf171c657c2de19b62e247a26c35a613986caa`, merging resource PR #3236 into main `7375ab6e34e511095a74d5a67e57cec28d56fd10`. This PCAP file and its provider are identical between that baseline and merge. The defect is also present in this branch's baseline `e5791229f3d64e3b3ccc9d839b8e4c567e97cc98`. The capinfos fixture emits 222 bytes including its terminal newline; the assertion expects a 221-byte constant. Both should describe the same exact output. ## Change and scope Put the terminal newline in the canonical CAPINFOS_OUTPUT fixture value and emit that value with `printf '%s'`. The subprocess emits the same bytes as before, and the existing exact assertion remains intact. The tshark JSON fixture already uses this exact-value emission rule. The change is one file, two added lines and one removed line. Routine test-fixture correction within existing contribution scope; a separate maintainer capability decision is not applicable. Output representation is owned by the test fixture. CLI/MCP contracts, schemas, dependencies, packaging and production provider behavior remain unchanged. Existing cleanup, ownership and partial-observation assertions are preserved; no further output-representation cleanup remains. The test launches only its existing local stub processes and uses temporary fixture files. ## Evidence and regression coverage Reconstructed the actual writeStubTools producer directly from each version's TypeScript source and executed its emitted capinfos script using the installed Git POSIX shell. Baseline exact comparison fails (221 expected bytes, 222 actual); fixed comparison passes (222 expected and actual). Raw subprocess output is byte-for-byte unchanged. This establishes the fixture drift, while Linux process supervision still requires remote CI. ## Validation performed Windows x64, pinned Node 24.18.0 / npm 11.16.0 and unchanged locked dependencies: - Actual shell fixture byte comparison: baseline mismatch reproduced, fixed output exact, emitted bytes unchanged. - `npm run test:local -- src/pcap/PcapConfiguration.test.ts`: 14 passed, including metadata parsing. - `npm run check`: all six tasks and architecture guards passed; zero lint errors. - `git diff --check`: passed. - Published commit tree compared to the locally validated tree: identical. The Linux-only pcapProvider.test.ts workflow could not run on this Windows host. The original failing Linux CI is linked above; current-head Linux CI must verify cleanup recovery before merge. No real Wireshark or full-suite pass is claimed. Current-head [CI #9338](https://github.com/morluto/rea/actions/runs/38534751581), head `1804dba8471ff764c7ca4a02fc8ec522152584f2`, executed merge `f97e44b8353c6d7fedda0bc529e13950c6cd891e` against main `e5828596c50029e48feb7f56d6f5fe7b5580a561`: static checks, source tests, package build, PR title, and the real packet capture/tshark lane passed. Shard 5 reported 1,227 passed, 21 skipped, and one failure in `clientConfigurationBom.test.ts:154` (Cursor removal returned `retained` rather than `removed`); shards 1–4 were canceled. The required aggregate CI remains failing. This run does not establish a complete pass of the PCAP provider boundary suite. The remaining failure and canceled coverage must be addressed or accepted by the maintainer before merge. ## Author readiness Human owner: @ShuaixinHuang - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare the current revision ready for maintainer review. ## Before merge - [x] Concrete CI failure traced to the exact executed revision. - [x] Producing fixture and expected bytes share one canonical value. - [x] Precise output, cleanup and ownership assertions retained. - [x] Local relevant checks pass; host limits reported. - [ ] Required current-head Linux CI accepted by the maintainer. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5705
No description provided.