[PR #4036] [CLOSED] test(process): cover endpoint-only port normalization #6008

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4036
Author: @AdityaKharmaleGoat7
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/process-endpoint-port-normalization


📝 Commits (7)

  • 8b9c86f test(process): cover endpoint-only port normalization
  • bbc8777 fix(process): preserve endpoint port normalization
  • 7c89553 test(process): allow normalized port output budget
  • 9572fc4 Merge branch 'main' into fix/process-endpoint-port-normalization
  • 87e0941 style: restore final newline
  • 964214f Merge upstream main and retain port normalization regression coverage
  • 1f37e35 test(process): refresh upstream and fix scenario schema import

📊 Changes

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

View changed files

➕ src/process/capture/ProcessNormalization.portEndpoints.test.ts (+43 -0)

📄 Description

Regression coverage for #4003; the production fix is already on upstream main.

Summary

Adds focused regression coverage for endpoint-only and mixed endpoint/field port normalization. Upstream main already contains the production fix, so the final diff is test-only.

Problem and expected behavior

The earlier bounded normalizer discarded endpoint replacements when the following explicit-port-field pass made no change. The tests verify that localhost:8080 becomes localhost:<port> and mixed localhost:8080 port:8080 preserves both replacements, including the normalized byte count at the exact output budget.

Change and scope

  • Add two regression tests in src/process/capture/ProcessNormalization.portEndpoints.test.ts.
  • Use processScenarioSchema.parse to construct the fixture, matching the current domain API.
  • Merge upstream main at 1173c0a9dc1b352a60943a491462294db8f353ae, including the shared Apple metadata and Webpack fixture fixes (#6945 and #6951).

No production code changes remain in this PR. Follow the contribution scope.

Contract and boundary impact

  • Semantic owner and earliest changed stage: bounded process-capture text normalization; test coverage only.
  • Contribution scope fit and linked maintainer decision: ordinary fix within existing boundaries; not applicable.
  • CLI and MCP/tool-catalog contract: no contract changes; tests verify the existing normalization.ports behavior.
  • Provider, bridge, target-format, or platform compatibility: unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: tests verify normalized text and byte counts; retained Evidence behavior is unchanged.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: focused unit coverage for endpoint-only localhost:8080 and mixed localhost:8080 port:8080 input.
  • Base reproduction or other evidence: issue #4003 contains a public CLI reproduction and has been independently confirmed.
  • User-visible CLI/MCP output (if applicable): no new behavior; regression coverage verifies endpoint-only and mixed endpoint/field normalization.
  • Remaining proof gaps: the full hosted CI run is pending. The local acceptance suite could not validate CLI/MCP behavior because this environment's procps ps fails with fatal library error, lookup self.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

On the refreshed branch:

  • npm run test:focused -- src/process/capture/ProcessNormalization.portEndpoints.test.ts src/process/capture/ProcessNormalization.test.ts src/native/AppleDispatchMetadata.failure.test.ts — 30 tests passed.
  • npm run typecheck — passed.
  • npm run lint — passed with existing warnings; module boundaries passed.
  • oxfmt --check src/process/capture/ProcessNormalization.portEndpoints.test.ts and git diff --check — passed.
  • npm run test:focused -- tests/acceptance/applications/applicationWorkflowCli.test.ts — build succeeded; tests could not complete successfully because the local process-ownership prerequisite (ps) fails. This is not claimed as passing acceptance coverage; hosted CI must verify it.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable to the changed normalization helper.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change in what is read, launched, or retained.

Author readiness

Human owner: @AdityaKharmaleGoat7

  • 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.

🔄 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/4036 **Author:** [@AdityaKharmaleGoat7](https://github.com/AdityaKharmaleGoat7) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/process-endpoint-port-normalization` --- ### 📝 Commits (7) - [`8b9c86f`](https://github.com/morluto/rea/commit/8b9c86fe36087adcc0fad24ea0fab9123c9f7d09) test(process): cover endpoint-only port normalization - [`bbc8777`](https://github.com/morluto/rea/commit/bbc877770ce981b4e2b31d3ecba9b1a78a93298f) fix(process): preserve endpoint port normalization - [`7c89553`](https://github.com/morluto/rea/commit/7c8955369462d0a0d007d59462a8a433e3ee0d0e) test(process): allow normalized port output budget - [`9572fc4`](https://github.com/morluto/rea/commit/9572fc47efe32c272a9e31896edec5a4335c0d90) Merge branch 'main' into fix/process-endpoint-port-normalization - [`87e0941`](https://github.com/morluto/rea/commit/87e09413bd6189fad9755758f3836dfb20f7b449) style: restore final newline - [`964214f`](https://github.com/morluto/rea/commit/964214fed872a4bfa22886f4d93778d512233e40) Merge upstream main and retain port normalization regression coverage - [`1f37e35`](https://github.com/morluto/rea/commit/1f37e3518b84b40ef0c947496a89c4fcafa35ecd) test(process): refresh upstream and fix scenario schema import ### 📊 Changes **1 file changed** (+43 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/process/capture/ProcessNormalization.portEndpoints.test.ts` (+43 -0) </details> ### 📄 Description Regression coverage for #4003; the production fix is already on upstream `main`. ## Summary Adds focused regression coverage for endpoint-only and mixed endpoint/field port normalization. Upstream `main` already contains the production fix, so the final diff is test-only. ## Problem and expected behavior The earlier bounded normalizer discarded endpoint replacements when the following explicit-port-field pass made no change. The tests verify that `localhost:8080` becomes `localhost:<port>` and mixed `localhost:8080 port:8080` preserves both replacements, including the normalized byte count at the exact output budget. ## Change and scope - Add two regression tests in `src/process/capture/ProcessNormalization.portEndpoints.test.ts`. - Use `processScenarioSchema.parse` to construct the fixture, matching the current domain API. - Merge upstream `main` at `1173c0a9dc1b352a60943a491462294db8f353ae`, including the shared Apple metadata and Webpack fixture fixes (#6945 and #6951). No production code changes remain in this PR. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). ## Contract and boundary impact - Semantic owner and earliest changed stage: bounded process-capture text normalization; test coverage only. - Contribution scope fit and linked maintainer decision: ordinary fix within existing boundaries; not applicable. - CLI and MCP/tool-catalog contract: no contract changes; tests verify the existing `normalization.ports` behavior. - Provider, bridge, target-format, or platform compatibility: unchanged. - Evidence, artifact, provenance, or reconstruction contract: tests verify normalized text and byte counts; retained Evidence behavior is unchanged. - Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): none. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: focused unit coverage for endpoint-only `localhost:8080` and mixed `localhost:8080 port:8080` input. - Base reproduction or other evidence: issue #4003 contains a public CLI reproduction and has been independently confirmed. - User-visible CLI/MCP output (if applicable): no new behavior; regression coverage verifies endpoint-only and mixed endpoint/field normalization. - Remaining proof gaps: the full hosted CI run is pending. The local acceptance suite could not validate CLI/MCP behavior because this environment's procps `ps` fails with `fatal library error, lookup self`. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed On the refreshed branch: - `npm run test:focused -- src/process/capture/ProcessNormalization.portEndpoints.test.ts src/process/capture/ProcessNormalization.test.ts src/native/AppleDispatchMetadata.failure.test.ts` — 30 tests passed. - `npm run typecheck` — passed. - `npm run lint` — passed with existing warnings; module boundaries passed. - `oxfmt --check src/process/capture/ProcessNormalization.portEndpoints.test.ts` and `git diff --check` — passed. - `npm run test:focused -- tests/acceptance/applications/applicationWorkflowCli.test.ts` — build succeeded; tests could not complete successfully because the local process-ownership prerequisite (`ps`) fails. This is not claimed as passing acceptance coverage; hosted CI must verify it. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: not applicable to the changed normalization helper. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no change in what is read, launched, or retained. ## Author readiness Human owner: @AdityaKharmaleGoat7 - [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 this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:11:08 +00:00
bsakaguchi changed title from [PR #4036] [CLOSED] test(process): cover endpoint-only port normalization to [PR #4036] test(process): cover endpoint-only port normalization 2026-11-03 13:31:33 +00:00
bsakaguchi changed title from [PR #4036] test(process): cover endpoint-only port normalization to [PR #4036] [CLOSED] test(process): cover endpoint-only port normalization 2026-11-03 14:33:16 +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#6008
No description provided.