[PR #474] [MERGED] refactor(test): keep coverage at behavioral boundaries #2022

Closed
opened 2026-10-16 21:13:27 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/474
Author: @morluto
Created: 8/11/2026
Status: ✅ Merged
Merged: 8/11/2026
Merged by: @morluto

Base: main ← Head: agent/reduce-test-debt-followup


📝 Commits (2)

  • 4265437 refactor(test): keep coverage at behavioral boundaries
  • bf69eb1 fix(ci): restore package workflow temp-root classification

📊 Changes

117 files changed (+1519 additions, -2419 deletions)

View changed files

📝 docs/testing.md (+8 -6)
📝 knip.json (+1 -1)
📝 src/application/AnalysisProviderRegistry.test.ts (+6 -6)
➕ src/application/Doctor.fixture.ts (+32 -0)
📝 src/application/Doctor.runtimeExecutables.test.ts (+2 -29)
📝 src/application/Doctor.test.ts (+3 -30)
📝 src/application/LinuxHopper.test.ts (+1 -1)
📝 src/application/MacHopper.test.ts (+1 -1)
📝 src/application/ManagedReconstructionService.test.ts (+5 -5)
📝 src/application/NativeApiInspection.test.ts (+4 -4)
➕ src/application/ProcessCaptureError.test.ts (+33 -0)
➕ src/application/ProcessCaptureJournal.test.ts (+35 -0)
📝 src/application/ProcessCaptureObservation.test.ts (+8 -11)
📝 src/application/ProcessPairedExperiment.test.ts (+1 -1)
📝 src/application/ReconstructionObligationLedger.authority.test.ts (+1 -1)
📝 src/application/ReconstructionObligationLedger.closure.test.ts (+1 -1)
📝 src/application/Setup.configuration.test.ts (+2 -2)
📝 src/application/Setup.fixture.ts (+5 -7)
📝 src/application/Setup.planning.test.ts (+2 -2)
📝 src/application/Setup.recovery.test.ts (+2 -2)

...and 80 more files

📄 Description

Description

Continue the test-debt sweep by assigning tests to the narrowest behavioral owner and removing coverage that only mirrored implementation details, private listener/timer state, type structure, or stronger tests elsewhere.

This change:

  • colocates pure domain, adapter, and recording-port service tests with their production owners;
  • keeps real filesystem, provider, composition, acceptance, conformance, and public MCP/CLI checks in their behavioral lanes;
  • replaces broad managed-provider and error suites with focused owner tests plus retained boundary and conformance coverage;
  • consolidates repeated BinarySession targets, providers, deferred work, and controllable clients into one shared fixture;
  • keeps the public process-capture example in production while excluding test-only fixture helpers from the package build;
  • shares the immutable MCP module graph across boundary files while each test still creates and closes its own session.

The sweep does not change tool contracts, provider authority, persistence semantics, or authorization behavior. Domain schema refactoring is intentionally excluded and tracked separately in #473.

Performance

On the same local Linux checkout:

  • MCP boundary lane: 118.32s to 40.98s for the same 49 files / 132 tests after removing per-file module isolation.
  • Composition lane: 18.25s for 23 files / 66 tests to 16.23s for 21 files / 58 retained behavioral tests after moving filesystem boundaries and removing duplication.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Refactoring (no functional change)
  • Tool contract change (MCP schema modification)

Testing Performed

  • Unit tests added or updated
  • npm run check:pr — typecheck, lint, formatting, Knip, metadata, build, 344 test files / 1,697 tests, TypeDoc, and generated-document checks passed
  • npm pack --dry-run — 738 files, 1.1 MB package
  • Pre-push npm run check:fast — typecheck and lint passed
  • npm run verify:package — package construction and startup checks ran until the Linux Hopper platform probe; this host lacks Xvfb, so the verifier stopped with missing_xvfb
  • Real Hopper, Ghidra, browser, replay, and managed-provider verification performed

The exact-diff review was stopped at the explicit publish request after one clean bounded pass; no actionable finding had been reported.

Tool Contract Impact

None. The canonical tool inventory and generated catalog are unchanged.

Suggested review order

  1. vitest.config.ts, docs/testing.md, and the process-global lane classifier.
  2. Source-owned fixtures and focused owner tests under src/domain, src/application, and provider directories.
  3. Retained boundary/composition/conformance tests and BinarySession fixture consolidation.

No linked issue.


🔄 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/474 **Author:** [@morluto](https://github.com/morluto) **Created:** 8/11/2026 **Status:** ✅ Merged **Merged:** 8/11/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `agent/reduce-test-debt-followup` --- ### 📝 Commits (2) - [`4265437`](https://github.com/morluto/rea/commit/42654375f087689030b823852cce0fcd7bd783ee) refactor(test): keep coverage at behavioral boundaries - [`bf69eb1`](https://github.com/morluto/rea/commit/bf69eb11462825255fe5f893c8e1cc5c62edbb66) fix(ci): restore package workflow temp-root classification ### 📊 Changes **117 files changed** (+1519 additions, -2419 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+8 -6) 📝 `knip.json` (+1 -1) 📝 `src/application/AnalysisProviderRegistry.test.ts` (+6 -6) ➕ `src/application/Doctor.fixture.ts` (+32 -0) 📝 `src/application/Doctor.runtimeExecutables.test.ts` (+2 -29) 📝 `src/application/Doctor.test.ts` (+3 -30) 📝 `src/application/LinuxHopper.test.ts` (+1 -1) 📝 `src/application/MacHopper.test.ts` (+1 -1) 📝 `src/application/ManagedReconstructionService.test.ts` (+5 -5) 📝 `src/application/NativeApiInspection.test.ts` (+4 -4) ➕ `src/application/ProcessCaptureError.test.ts` (+33 -0) ➕ `src/application/ProcessCaptureJournal.test.ts` (+35 -0) 📝 `src/application/ProcessCaptureObservation.test.ts` (+8 -11) 📝 `src/application/ProcessPairedExperiment.test.ts` (+1 -1) 📝 `src/application/ReconstructionObligationLedger.authority.test.ts` (+1 -1) 📝 `src/application/ReconstructionObligationLedger.closure.test.ts` (+1 -1) 📝 `src/application/Setup.configuration.test.ts` (+2 -2) 📝 `src/application/Setup.fixture.ts` (+5 -7) 📝 `src/application/Setup.planning.test.ts` (+2 -2) 📝 `src/application/Setup.recovery.test.ts` (+2 -2) _...and 80 more files_ </details> ### 📄 Description ## Description Continue the test-debt sweep by assigning tests to the narrowest behavioral owner and removing coverage that only mirrored implementation details, private listener/timer state, type structure, or stronger tests elsewhere. This change: - colocates pure domain, adapter, and recording-port service tests with their production owners; - keeps real filesystem, provider, composition, acceptance, conformance, and public MCP/CLI checks in their behavioral lanes; - replaces broad managed-provider and error suites with focused owner tests plus retained boundary and conformance coverage; - consolidates repeated BinarySession targets, providers, deferred work, and controllable clients into one shared fixture; - keeps the public process-capture example in production while excluding test-only fixture helpers from the package build; - shares the immutable MCP module graph across boundary files while each test still creates and closes its own session. The sweep does not change tool contracts, provider authority, persistence semantics, or authorization behavior. Domain schema refactoring is intentionally excluded and tracked separately in #473. ### Performance On the same local Linux checkout: - MCP boundary lane: 118.32s to 40.98s for the same 49 files / 132 tests after removing per-file module isolation. - Composition lane: 18.25s for 23 files / 66 tests to 16.23s for 21 files / 58 retained behavioral tests after moving filesystem boundaries and removing duplication. ## Type of Change - [ ] Bug fix - [ ] New feature - [x] Documentation update - [x] Performance improvement - [x] Refactoring (no functional change) - [ ] Tool contract change (MCP schema modification) ## Testing Performed - [x] Unit tests added or updated - [x] `npm run check:pr` — typecheck, lint, formatting, Knip, metadata, build, 344 test files / 1,697 tests, TypeDoc, and generated-document checks passed - [x] `npm pack --dry-run` — 738 files, 1.1 MB package - [x] Pre-push `npm run check:fast` — typecheck and lint passed - [ ] `npm run verify:package` — package construction and startup checks ran until the Linux Hopper platform probe; this host lacks Xvfb, so the verifier stopped with `missing_xvfb` - [ ] Real Hopper, Ghidra, browser, replay, and managed-provider verification performed The exact-diff review was stopped at the explicit publish request after one clean bounded pass; no actionable finding had been reported. ## Tool Contract Impact None. The canonical tool inventory and generated catalog are unchanged. ## Suggested review order 1. `vitest.config.ts`, `docs/testing.md`, and the process-global lane classifier. 2. Source-owned fixtures and focused owner tests under `src/domain`, `src/application`, and provider directories. 3. Retained boundary/composition/conformance tests and BinarySession fixture consolidation. ## Related Issues No linked issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:27 +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#2022
No description provided.