Skip to content

refactor(test): keep coverage at behavioral boundaries - #474

Merged
morluto merged 2 commits into
mainfrom
agent/reduce-test-debt-followup
Aug 11, 2026
Merged

refactor(test): keep coverage at behavioral boundaries#474
morluto merged 2 commits into
mainfrom
agent/reduce-test-debt-followup

Conversation

@morluto

@morluto morluto commented Aug 11, 2026

Copy link
Copy Markdown
Owner

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.

Related Issues

No linked issue.

@morluto
morluto marked this pull request as ready for review August 11, 2026 10:21
@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@morluto

morluto commented Aug 11, 2026

Copy link
Copy Markdown
Owner Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 42654375f0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@morluto
morluto merged commit d4dc940 into main Aug 11, 2026
18 checks passed
@morluto
morluto deleted the agent/reduce-test-debt-followup branch August 11, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant