[PR #819] [MERGED] refactor: add incremental capability migration safeguards #2264

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/819
Author: @N0zoM1z0
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @N0zoM1z0

Base: main ← Head: refactor/capability-migration-guards


📝 Commits (1)

  • 40ab723 refactor: add incremental capability migration safeguards

📊 Changes

17 files changed (+421 additions, -66 deletions)

View changed files

📝 .github/workflows/ci.yml (+2 -0)
📝 .oxlintrc.json (+50 -3)
📝 CONTRIBUTING.md (+4 -0)
➕ docs/capability-migration.md (+79 -0)
📝 package.json (+2 -1)
➕ scripts/lib/test-discovery.d.mts (+14 -0)
➕ scripts/lib/test-discovery.mjs (+41 -0)
➕ scripts/verify-test-discovery.mjs (+65 -0)
📝 src/application/ReconstructionCoverageService.ts (+2 -11)
📝 src/cli/applicationCommands.ts (+2 -4)
📝 src/contracts/applicationToolContracts.ts (+1 -1)
📝 src/contracts/contractSnapshot.test.ts (+1 -45)
➕ src/domain/reconstructionCoverageInput.ts (+8 -0)
➕ tests/boundary/cli/cliToolCoverage.test.ts (+48 -0)
➕ tests/evaluation/moduleBoundaries.test.ts (+44 -0)
➕ tests/evaluation/testDiscovery.test.ts (+56 -0)
📝 turbo.json (+2 -1)

📄 Description

Directory migrations can silently omit tests or put a CLI integration assertion in a pure contract lane. Add a working capability migration guide, inward import guards, and a CI check that compares actual Vitest discovery with tracked and newly added tests. The guide keeps existing named contracts and typed ports, and defers shared capability declarations until concrete migrations establish their needs.

The new import guard exposed one existing contract-to-application schema dependency. Move that unchanged input schema into domain, update its callers, and move only the CLI inventory assertion into the boundary lane. Include imported script declarations in the typecheck cache inputs.

Refs #740 (initial T1/T7 migration foundations; does not close the roadmap).

Verification:

  • Focused schema, contract, discovery and real-linter guard tests: 29 passed.
  • CLI coverage and development-runner boundary tests: 4 passed.
  • Actual discovery: all 470 test files found exactly once.
  • Negative production control: a newly added test outside the configured provider globs correctly failed discovery; the owned probe was removed.
  • npm run check, npm run docs:check, and installed Turbo dry-run input inspection passed.
  • npm run verify:package passed, including CLI/MCP startup, all 126 advertised tools and isolated setup checks.

Public tool contracts, catalog output and provider behavior are unchanged. Real Hopper/Ghidra verification was not run; this batch changes development guards, schema ownership and test classification, with package verification providing the separate distribution proof.


🔄 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/819 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `refactor/capability-migration-guards` --- ### 📝 Commits (1) - [`40ab723`](https://github.com/morluto/rea/commit/40ab723f655be28e76011ebd94a3b7fd4ae10353) refactor: add incremental capability migration safeguards ### 📊 Changes **17 files changed** (+421 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+2 -0) 📝 `.oxlintrc.json` (+50 -3) 📝 `CONTRIBUTING.md` (+4 -0) ➕ `docs/capability-migration.md` (+79 -0) 📝 `package.json` (+2 -1) ➕ `scripts/lib/test-discovery.d.mts` (+14 -0) ➕ `scripts/lib/test-discovery.mjs` (+41 -0) ➕ `scripts/verify-test-discovery.mjs` (+65 -0) 📝 `src/application/ReconstructionCoverageService.ts` (+2 -11) 📝 `src/cli/applicationCommands.ts` (+2 -4) 📝 `src/contracts/applicationToolContracts.ts` (+1 -1) 📝 `src/contracts/contractSnapshot.test.ts` (+1 -45) ➕ `src/domain/reconstructionCoverageInput.ts` (+8 -0) ➕ `tests/boundary/cli/cliToolCoverage.test.ts` (+48 -0) ➕ `tests/evaluation/moduleBoundaries.test.ts` (+44 -0) ➕ `tests/evaluation/testDiscovery.test.ts` (+56 -0) 📝 `turbo.json` (+2 -1) </details> ### 📄 Description Directory migrations can silently omit tests or put a CLI integration assertion in a pure contract lane. Add a working capability migration guide, inward import guards, and a CI check that compares actual Vitest discovery with tracked and newly added tests. The guide keeps existing named contracts and typed ports, and defers shared capability declarations until concrete migrations establish their needs. The new import guard exposed one existing contract-to-application schema dependency. Move that unchanged input schema into domain, update its callers, and move only the CLI inventory assertion into the boundary lane. Include imported script declarations in the typecheck cache inputs. Refs #740 (initial T1/T7 migration foundations; does not close the roadmap). Verification: - Focused schema, contract, discovery and real-linter guard tests: 29 passed. - CLI coverage and development-runner boundary tests: 4 passed. - Actual discovery: all 470 test files found exactly once. - Negative production control: a newly added test outside the configured provider globs correctly failed discovery; the owned probe was removed. - `npm run check`, `npm run docs:check`, and installed Turbo dry-run input inspection passed. - `npm run verify:package` passed, including CLI/MCP startup, all 126 advertised tools and isolated setup checks. Public tool contracts, catalog output and provider behavior are unchanged. Real Hopper/Ghidra verification was not run; this batch changes development guards, schema ownership and test classification, with package verification providing the separate distribution proof. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:16: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#2264
No description provided.