Skip to content

refactor(build): generate MCP tool catalog at build time instead of committing it - #997

Merged
morluto merged 1 commit into
mainfrom
fix/uncommit-generated-mcp-catalog
Oct 7, 2026
Merged

morluto merged 1 commit into
mainfrom
fix/uncommit-generated-mcp-catalog

Conversation

@morluto

@morluto morluto commented Oct 7, 2026

Copy link
Copy Markdown
Owner

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)

…ommitting it

src/generatedMcpToolCatalog.ts had zero runtime importers and churned on every contract edit, guaranteeing merge conflicts on long-lived branches. It is now gitignored and regenerated by build:unlocked; typecheck and knip depend on build via turbo. Tests consume the build output unchanged. Adds a regen-generated CI workflow that pushes tracked generated metadata (product catalog, skill frontmatter, verification manifest/ledger, package metadata, error schema) to same-repo PR branches.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T16:19:45.358877Z 5876c37 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 35a4e18 into main Oct 7, 2026
25 of 27 checks passed
@morluto
morluto deleted the fix/uncommit-generated-mcp-catalog branch October 7, 2026 16:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5876c3770f

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

Comment thread turbo.json
"outputs": [
"dist/**",
".cache/tsconfig.build.tsbuildinfo",
"src/generatedMcpToolCatalog.ts"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Upload the generated catalog with the test artifact

On a clean CI checkout, the build creates src/generatedMcpToolCatalog.ts after tsc, but .github/workflows/ci.yml uploads only dist and each test shard downloads that artifact without running the build. Any shard collecting contractPresentation.test.ts, toolRegistrationOptions.test.ts, toolSchemaValidity.test.ts, or auxiliaryDeclarations.test.ts therefore fails to resolve the generated source module. Include this output in the transferred artifact or regenerate it in each shard.

AGENTS.md reference: AGENTS.md:L28-L28

Useful? React with 👍 / 👎.

git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -- "${generated_paths[@]}"
git commit -m "chore: regenerate generated metadata"
git push origin "HEAD:${HEAD_REF}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Retrigger CI after pushing the generated commit

Whenever regeneration changes a tracked file, this push uses the checkout action's persisted GITHUB_TOKEN and advances the PR head. GitHub documents that resulting pull_request synchronization runs are approval-required rather than automatic, so the bot-generated head will not receive automatic required CI and the PR remains blocked until a maintainer manually approves another run. Push with the repository's dedicated App/PAT credential, as the release workflow does, or explicitly dispatch verification for the new head.

AGENTS.md reference: AGENTS.md:L38-L38

Useful? React with 👍 / 👎.

kaoru0822-kitauji added a commit that referenced this pull request Oct 8, 2026
Resolve generated-metadata conflicts by regenerating them on top of
main. The skill references gain the inspect_signature paragraph, so the
skill version moves to 29 (main already uses 28). The MCP tool catalog
is now built rather than committed (#997), so it is removed here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit that referenced this pull request Oct 8, 2026
Resolve conflicts against main:
- README.md: take main's simplified English README, which no longer has
  the tool-family table.
- README_ja.md: take main's reworded table and count
  trace_dylib_resolution in the artifact graph row (5 -> 6).
- Skill: the references gain the trace_dylib_resolution paragraph, so
  the version moves to 29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata (135 tools). The MCP tool catalog is now built rather
  than committed (#997), so it is removed here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit that referenced this pull request Oct 8, 2026
Resolve conflicts against main:
- Inventory moved to src/artifacts/inventory (#1032); point the xar and
  cpio reader imports at their new relative paths.
- README.md: take main's simplified English README, which no longer
  lists individual package formats. PKG coverage stays documented in
  the skill reference and docs/testing.md.
- Skill: the references gain the PKG paragraph, so the version moves to
  29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata. The MCP tool catalog is now built rather than
  committed (#997), so it is removed here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit that referenced this pull request Oct 8, 2026
Bring in #927's merge of main and resolve conflicts:
- README.md: main's simplified English README has no tool-family table.
- README_ja/ar/ko/zh: keep main's reworded tables and count
  inspect_dyld_shared_cache in application workflows (13 -> 14).
- Skill: #927 now uses version 29, so this branch moves to 30.
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata (136 tools). The MCP tool catalog is now built rather
  than committed (#997), so it is removed here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit that referenced this pull request Oct 8, 2026
Resolve conflicts against main:
- package.json: ship both the LLDB tracer bridge and main's process run
  token reader sources.
- README.md: take main's simplified English README, which no longer has
  the tool-family table.
- README_ja.md: take main's reworded table and count
  observe_native_calls in the macOS native row (7 -> 8).
- Skill: the references gain the observe_native_calls paragraph, so the
  version moves to 29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata (135 tools). The MCP tool catalog is now built rather
  than committed (#997), so it is removed here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…ommitting it (morluto#997)

src/generatedMcpToolCatalog.ts had zero runtime importers and churned on every contract edit, guaranteeing merge conflicts on long-lived branches. It is now gitignored and regenerated by build:unlocked; typecheck and knip depend on build via turbo. Tests consume the build output unchanged. Adds a regen-generated CI workflow that pushes tracked generated metadata (product catalog, skill frontmatter, verification manifest/ledger, package metadata, error schema) to same-repo PR branches.
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
Resolve conflicts against main:
- README.md: take main's simplified English README, which no longer has
  the tool-family table.
- README_ja.md: take main's reworded table and count
  trace_dylib_resolution in the artifact graph row (5 -> 6).
- Skill: the references gain the trace_dylib_resolution paragraph, so
  the version moves to 29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata (135 tools). The MCP tool catalog is now built rather
  than committed (morluto#997), so it is removed here.
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
Resolve conflicts against main:
- package.json: ship both the LLDB tracer bridge and main's process run
  token reader sources.
- README.md: take main's simplified English README, which no longer has
  the tool-family table.
- README_ja.md: take main's reworded table and count
  observe_native_calls in the macOS native row (7 -> 8).
- Skill: the references gain the observe_native_calls paragraph, so the
  version moves to 29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata (135 tools). The MCP tool catalog is now built rather
  than committed (morluto#997), so it is removed here.
@morluto morluto added enhancement New feature or request area: mcp MCP server, transport, and tool registration labels Oct 14, 2026
Iyanuoluwa007 pushed a commit to Iyanuoluwa007/rea that referenced this pull request Oct 21, 2026
Bring in morluto#927's merge of main and resolve conflicts:
- README.md: main's simplified English README has no tool-family table.
- README_ja/ar/ko/zh: keep main's reworded tables and count
  inspect_dyld_shared_cache in application workflows (13 -> 14).
- Skill: morluto#927 now uses version 29, so this branch moves to 30.
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata (136 tools). The MCP tool catalog is now built rather
  than committed (morluto#997), so it is removed here.
Iyanuoluwa007 pushed a commit to Iyanuoluwa007/rea that referenced this pull request Oct 21, 2026
Resolve conflicts against main:
- Inventory moved to src/artifacts/inventory (morluto#1032); point the xar and
  cpio reader imports at their new relative paths.
- README.md: take main's simplified English README, which no longer
  lists individual package formats. PKG coverage stays documented in
  the skill reference and docs/testing.md.
- Skill: the references gain the PKG paragraph, so the version moves to
  29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata. The MCP tool catalog is now built rather than
  committed (morluto#997), so it is removed here.
Iyanuoluwa007 pushed a commit to Iyanuoluwa007/rea that referenced this pull request Oct 21, 2026
Resolve generated-metadata conflicts by regenerating them on top of
main. The skill references gain the inspect_signature paragraph, so the
skill version moves to 29 (main already uses 28). The MCP tool catalog
is now built rather than committed (morluto#997), so it is removed here.
@morluto morluto added the area: build Build, CI, packaging, and publishing label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing area: mcp MCP server, transport, and tool registration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant