[PR #997] [MERGED] refactor(build): generate MCP tool catalog at build time instead of committing it #2566

Closed
opened 2026-10-17 21:07:40 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/uncommit-generated-mcp-catalog


📝 Commits (1)

  • 5876c37 refactor(build): generate MCP tool catalog at build time instead of committing it

📊 Changes

9 files changed (+95 additions, -89 deletions)

View changed files

📝 .github/pull_request_template.md (+1 -1)
➕ .github/workflows/regen-generated.yml (+75 -0)
📝 .gitignore (+3 -0)
📝 AGENTS.md (+1 -0)
📝 package.json (+2 -2)
📝 scripts/generate-mcp-tool-catalog.mjs (+3 -2)
➖ src/generatedMcpToolCatalog.ts (+0 -82)
📝 tests/boundary/mcp/toolRegistrationOptions.test.ts (+1 -1)
📝 turbo.json (+9 -1)

📄 Description

Summary

Un-commits src/generatedMcpToolCatalog.ts (zero runtime importers, churned on every contract edit) and regenerates it during build:unlocked. Adds a regen-generated CI workflow for the remaining tracked generated files.

Changes

  • Phase 1: gitignore + git rm --cached the catalog; build:unlocked runs the generator after tsc (verified tsc succeeds without the file present); turbo typecheck/knip depend on build; build inputs exclude the file, outputs include it for cache restore. Removed the now-redundant explicit catalog step from docs:generate:unlocked.
  • Phase 2: .github/workflows/regen-generated.yml runs docs:generate on PRs touching generator inputs and pushes tracked generated files to same-repo branches (fork-safe no-op, bot-actor loop guard, refuses unrelated changes).
  • Docs: AGENTS.md pointer, PR template bot note, generator/test wording ("checked-in" -> "build").

Verification

  • Fresh-clone simulation (file deleted, npm run build:cached): regenerated byte-identical
  • npm run check (typecheck/lint/format/knip/metadata), docs:check, format:check, git diff --check, jscpd, scan:todos
  • Focused: toolRegistrationOptions, toolSchemaValidity, auxiliaryDeclarations, contractPresentation, moduleBoundaries, productCatalog (112 passed)
  • npm run verify:package under pinned Node v24.18.0 (mcpTools: 133)
  • docs:generate no-op on tracked files (bot already-canonical path)

🔄 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/997 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/uncommit-generated-mcp-catalog` --- ### 📝 Commits (1) - [`5876c37`](https://github.com/morluto/rea/commit/5876c3770f5d5dd8be1d96aafdcdfb1735c7d12c) refactor(build): generate MCP tool catalog at build time instead of committing it ### 📊 Changes **9 files changed** (+95 additions, -89 deletions) <details> <summary>View changed files</summary> 📝 `.github/pull_request_template.md` (+1 -1) ➕ `.github/workflows/regen-generated.yml` (+75 -0) 📝 `.gitignore` (+3 -0) 📝 `AGENTS.md` (+1 -0) 📝 `package.json` (+2 -2) 📝 `scripts/generate-mcp-tool-catalog.mjs` (+3 -2) ➖ `src/generatedMcpToolCatalog.ts` (+0 -82) 📝 `tests/boundary/mcp/toolRegistrationOptions.test.ts` (+1 -1) 📝 `turbo.json` (+9 -1) </details> ### 📄 Description ## Summary Un-commits `src/generatedMcpToolCatalog.ts` (zero runtime importers, churned on every contract edit) and regenerates it during `build:unlocked`. Adds a regen-generated CI workflow for the remaining tracked generated files. ## Changes - Phase 1: gitignore + `git rm --cached` the catalog; `build:unlocked` runs the generator after `tsc` (verified `tsc` succeeds without the file present); turbo `typecheck`/`knip` depend on `build`; build inputs exclude the file, outputs include it for cache restore. Removed the now-redundant explicit catalog step from `docs:generate:unlocked`. - Phase 2: `.github/workflows/regen-generated.yml` runs `docs:generate` on PRs touching generator inputs and pushes tracked generated files to same-repo branches (fork-safe no-op, bot-actor loop guard, refuses unrelated changes). - Docs: AGENTS.md pointer, PR template bot note, generator/test wording ("checked-in" -> "build"). ## Verification - Fresh-clone simulation (file deleted, `npm run build:cached`): regenerated byte-identical - `npm run check` (typecheck/lint/format/knip/metadata), `docs:check`, `format:check`, `git diff --check`, `jscpd`, `scan:todos` - Focused: toolRegistrationOptions, toolSchemaValidity, auxiliaryDeclarations, contractPresentation, moduleBoundaries, productCatalog (112 passed) - `npm run verify:package` under pinned Node v24.18.0 (mcpTools: 133) - `docs:generate` no-op on tracked files (bot already-canonical path) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:40 +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#2566
No description provided.