[PR #3257] [CLOSED] test(pcap): expect the producer's final stdout newline #5676

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

📋 Pull Request Information

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

Base: main ← Head: fix/pcap-cleanup-stdout-newline-20261014


📝 Commits (1)

  • e389c5c test(pcap): expect the producer's final stdout newline

📊 Changes

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

View changed files

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

📄 Description

Summary

Match the capinfos stub's actual final newline in the retained-cleanup regression test. This one-line expectation correction restores a test that currently blocks unrelated PRs, including #3108.

Problem and expected behavior

The stub prints printf '%s\n', but the assertion expected CAPINFOS_OUTPUT without its trailing newline. The assertion failed before mayClean = true, leaving the injected cleanup failure active during finalization. Production correctly preserves the raw stdout.

Change and scope

Expect ${CAPINFOS_OUTPUT}\n for capinfos; preserve the existing tshark expectation and every observation, resource ownership, and cleanup assertion. No production code, retries, skips, or CI gates change. Ordinary test correction; a new capability scope decision is not applicable.

Contract and boundary impact

  • Semantic owner: production output preservation remains unchanged; the test oracle now matches its own producer.
  • CLI/MCP, Evidence, provider, platform, generated metadata and installation contracts: unchanged.
  • Test effects: existing disposable files and synthetic subprocesses only. No real capture, target application, instrumentation, protection recovery or network service.

Evidence and validation

  • Original CI failure: one failure / 1,178 passes / 22 skips. Other shards were cancelled, not passed.
  • Clean integrated main 7375ab6e3: exact PCAP file reproduces 19 passes / one failure. Applying only this expectation correction passes all 20 tests.
  • Fresh latest-main base 877d40408: npm run test:focused -- tests/boundary/pcap/pcapProvider.test.ts passes all 20 tests; npm run check:fast and git diff --check pass. Two-CPU/8-GiB guard, peak 4,415 MiB, no guard stop.
  • Current-head real TShark CI passes 70 tests across eight files and 23 CLI/MCP verifier cases using real TShark/capinfos with synthetic Ethernet/IPv4/UDP/DNS and Bluetooth HCI PCAPs. No hardware acquisition or native Windows/macOS claim.
  • Static checks, source tests, package build and Greptile pass; five complete boundary shards remain running/queued. Required current-head CI remains the merge gate.

Compatibility and release

No user-visible behavior, dependency, package metadata or release change. No additional regression test is added because the existing one provides the required oracle. No generated outputs or local artifacts are committed.

Before merge

  • Concrete failure reproduced independently of #3108; focused one-line scope.
  • Production ownership, partial Evidence and raw output semantics preserved.
  • Fresh-main focused tests and relevant static checks pass.
  • Required current-head CI and review pass.

🔄 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/3257 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/pcap-cleanup-stdout-newline-20261014` --- ### 📝 Commits (1) - [`e389c5c`](https://github.com/morluto/rea/commit/e389c5c399bd5fd35505eb5bb14596b92452db7f) test(pcap): expect the producer's final stdout newline ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/pcap/pcapProvider.test.ts` (+1 -1) </details> ### 📄 Description ## Summary Match the capinfos stub's actual final newline in the retained-cleanup regression test. This one-line expectation correction restores a test that currently blocks unrelated PRs, including #3108. ## Problem and expected behavior The stub prints `printf '%s\n'`, but the assertion expected `CAPINFOS_OUTPUT` without its trailing newline. The assertion failed before `mayClean = true`, leaving the injected cleanup failure active during finalization. Production correctly preserves the raw stdout. ## Change and scope Expect `${CAPINFOS_OUTPUT}\n` for capinfos; preserve the existing tshark expectation and every observation, resource ownership, and cleanup assertion. No production code, retries, skips, or CI gates change. Ordinary test correction; a new capability scope decision is not applicable. ## Contract and boundary impact - Semantic owner: production output preservation remains unchanged; the test oracle now matches its own producer. - CLI/MCP, Evidence, provider, platform, generated metadata and installation contracts: unchanged. - Test effects: existing disposable files and synthetic subprocesses only. No real capture, target application, instrumentation, protection recovery or network service. ## Evidence and validation - [Original CI failure](https://github.com/morluto/rea/actions/runs/38521564982/job/115714458706): one failure / 1,178 passes / 22 skips. Other shards were cancelled, not passed. - Clean integrated main `7375ab6e3`: exact PCAP file reproduces 19 passes / one failure. Applying only this expectation correction passes all 20 tests. - Fresh latest-main base `877d40408`: `npm run test:focused -- tests/boundary/pcap/pcapProvider.test.ts` passes all 20 tests; `npm run check:fast` and `git diff --check` pass. Two-CPU/8-GiB guard, peak 4,415 MiB, no guard stop. - Current-head [real TShark CI](https://github.com/morluto/rea/actions/runs/38523877441) passes 70 tests across eight files and 23 CLI/MCP verifier cases using real TShark/capinfos with synthetic Ethernet/IPv4/UDP/DNS and Bluetooth HCI PCAPs. No hardware acquisition or native Windows/macOS claim. - Static checks, source tests, package build and Greptile pass; five complete boundary shards remain running/queued. Required current-head CI remains the merge gate. ## Compatibility and release No user-visible behavior, dependency, package metadata or release change. No additional regression test is added because the existing one provides the required oracle. No generated outputs or local artifacts are committed. ## Before merge - [x] Concrete failure reproduced independently of #3108; focused one-line scope. - [x] Production ownership, partial Evidence and raw output semantics preserved. - [x] Fresh-main focused tests and relevant static checks pass. - [ ] Required current-head CI and review pass. --- <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:32 +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#5676
No description provided.