Repository navigation
refactor(contracts): own catalog identity in contracts and server identity in process - #11435
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Low impact] The PR appears safe to merge; the previous release-test failure is addressed and no new issues were found. SummaryMoves catalog identity and schema presentation into
Reviews (3) · Last reviewed commit: "test(release): expect the catalog identi..." · Reviewed by Greptile |
…acts' into refactor/catalog-identity-contracts # Conflicts: # scripts/lib/module-layers.baseline.json # tests/boundary/mcp/compactInputSchemaMcp.test.ts # tests/boundary/mcp/serverIdentity.test.ts
d0fae4e
into
refactor/cli-command-names-contracts
…ma presentation in contracts (#11425) * refactor(contracts): move the CLI command name owner into src/contracts * refactor(contracts): own catalog identity in contracts and server identity in process (#11435) * refactor(contracts): move catalog identity into contracts and server identity into process * refactor(contracts): own the advertised MCP schema presentation in contracts * test(mcp): import the advertised presentation from contracts in toolSchemaValidity * test(release): expect the catalog identity at its contracts path in the canary * test(mcp): import the catalog identity from contracts in syntheticContractSurfaces * refactor(contracts): import CLI command names from contracts in the capability conformance test
Summary
Implements the decision on #11427. The catalog identity, catalog discovery and recorded catalog digests move into
src/contracts/catalog/, and the server identity moves intosrc/process/. The advertised MCP schema presentation moves intosrc/contracts/mcpSchemaPresentation.ts: the compact input and output budgets and presentations, the output profile names andadvertisedToolPresentation.src/configkeeps only the parsing of theREA_MCP_*_SCHEMA_PROFILEsettings.application -> catalogIdentity.ts(2),application -> catalogDiscovery.ts(1) andapplication -> serverIdentity.ts(1) leave the layer baseline.Stacked on #11425, because
catalogIdentityimports the CLI command names that #11425 moves into contracts. Part of plan W9. Fixes #11427. Refs #11359.Problem and expected behavior
DoctorandDirectAnalysisStatusreport the catalog and server identity, but both owners were root files thatscripts/lib/module-layers.mjsplaces in the adapters layer, so application imported upward.Expected: the catalog identity sits with the contracts it digests, and the server identity sits in a foundation unit. Application, the server and the doctor then import both inward.
Change and scope
git mvplus specifier rewrites):src/catalogIdentity.ts,src/catalogDiscovery.tsandsrc/recordedCatalogDigests.tsgo tosrc/contracts/catalog/.src/serverIdentity.tsgoes tosrc/process/ServerIdentity.ts.import.meta.urlnow goes one more directory up, sopackage.root_pathstays the package root fromsrc/process/,dist/process/anddist/src/process/.processand notconfig: inconfigthe module would importprocess/CurrentEntrypointPath, andprocessalready importsconfig, which would add a newconfig <-> processmutual pair.catalogIdentityread the advertised presentation fromsrc/config, which is above contracts. The presentation facts now live insrc/contracts/mcpSchemaPresentation.ts.config/mcpOutputSchemaProfile.tsbuilds its zod enum fromMCP_OUTPUT_SCHEMA_PROFILES.config/mcpInputSchemaProfile.tskeeps only its setting parser.dist/contracts/catalog/*.js(anddist/contracts/mcpSchemaPresentation.js):record-catalog-digests,generate-skill-metadata,verify-package-pack,verify-claude-client,verify-copilot-client,lib/release-package-canary,lib/catalog-coreandlib/canonical-output-schema;generatedSkill,dependencyInstallandmcpDoctor;cliStartupImports;dist/assertion inreleaseArtifactCanary.ambient-host-platformbaseline key is renamed to the new path.Not included:
mcpStartupPolicy.ts, which is refactor(config): move the MCP startup policy beside its startup budgets in src/config #11429.maincan already lower:process -> artifactsandapplication <-> dotnet. Other PRs own those.Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact: built module paths change insidedist/. Every repository script and test that loads them by path is updated. The package entry points are unchanged.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
Tests added or updated:
tests/boundary/mcp/serverIdentity.test.tsnow asserts thatpackage.root_pathis the repository root. That guards the depth change.generatedSkill,dependencyInstall,mcpDoctorandcliStartupImportsfollow the new paths.Base reproduction or other evidence:
node scripts/verify-module-boundaries.mjsno longer observes the three application-to-root edges, and their baseline entries are removed.contracts -> config: 3. After the split it is gone.config, the check reported aconfig <-> processmutual pair. Inprocessit does not.User-visible CLI/MCP output (if applicable): none.
Remaining proof gaps: the release canary,
verify-package-packand the client verifiers were not run. They load the updated paths, which the build emits, asls dist/contracts/catalog/confirmed.Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run check:fast: passed. The pre-push hook passed.npm run build:cached: passed.dist/contracts/catalog/recordedCatalogDigests.jsholds the recorded profiles.npm run test:focused -- tests/boundary/mcp/serverIdentity.test.ts tests/boundary/cli/cliStartupImports.test.ts tests/boundary/mcp/outputSchemaProfile.test.ts tests/conformance/contracts/mcpInputSchemaProfile.test.ts tests/conformance/contracts/mcpOutputSchemaProfile.test.ts tests/boundary/cli/directAnalysisStatus.test.ts tests/boundary/filesystem/productCatalog.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts tests/boundary/mcp/mcpDoctor.test.ts tests/boundary/filesystem/generatedSkill.test.tsgeneratedSkillandmcpDoctor.dependencyInstall: 46 passed. The other 8 files passed on the first run.node scripts/verify-module-boundaries.mjs: passed.npm run test:focused -- tests/boundary/process/releaseArtifactCanary.test.tspassed 1 of 1. After merging refactor(contracts): own CLI command names, catalog identity and schema presentation in contracts #11425's update,npm run test:focused -- tests/boundary/mcp/toolSchemaValidity.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts tests/boundary/mcp/serverIdentity.test.tspassed 39.Compatibility, safety, and release
dist/change. The packaged entry points do not.Author readiness
Human owner:
Before merge
type(scope): outcome.