Skip to content

Conversation

@gagik
Copy link
Collaborator

@gagik gagik commented Oct 31, 2025

This is another step towards making the user schema the one source of truth about our configuration.

@gagik gagik requested a review from a team as a code owner October 31, 2025 10:01
Copilot AI review requested due to automatic review settings October 31, 2025 10:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces automatic README generation from the user configuration schema, making the user schema the single source of truth for configuration documentation. The changes implement a registry-based approach to store metadata for configuration fields and update the build process to automatically generate configuration tables.

  • Enhanced Zod schema with metadata registry to store field-specific information like default value descriptions and secret flags
  • Expanded the argument generation script to automatically update both server.json and README.md configuration tables
  • Added ESLint rule to enforce use of zod/v4 only in config.ts

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/common/config.ts Added metadata registry system with zod/v4 import and enhanced schema definitions with metadata
server.json Updated configuration descriptions and added preview features environment variable
scripts/generateArguments.ts Enhanced script to generate README configuration table and improved metadata handling
eslint.config.js Added new ESLint rule for enforcing zod/v4 usage
eslint-rules/enforce-zod-v4.js New ESLint rule to restrict zod/v4 imports to config.ts only
README.md Auto-generated configuration table with improved formatting and completeness

meta: {
type: "problem",
docs: {
description: "Only allow importing 'zod/v4' in config.ts, all other imports are allowed elsewhere.",
Copy link
Collaborator Author

@gagik gagik Oct 31, 2025

Choose a reason for hiding this comment

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

zod v4 has some nice features (and actually exists already as a separate import in our current v3 version) but we want to make sure we don't use this for tool schemas until modelcontextprotocol/typescript-sdk#555 is resolved

@coveralls
Copy link
Collaborator

coveralls commented Oct 31, 2025

Pull Request Test Coverage Report for Build 18973376541

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 101 of 110 (91.82%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 79.988%

Changes Missing Coverage Covered Lines Changed/Added Lines %
eslint-rules/enforce-zod-v4.js 44 46 95.65%
eslint.config.js 0 7 0.0%
Totals Coverage Status
Change from base Build 18966929073: 0.07%
Covered Lines: 6474
Relevant Lines: 7957

💛 - Coveralls

@gagik gagik merged commit 1c49353 into main Oct 31, 2025
19 checks passed
@gagik gagik deleted the gagik/readme-generate branch October 31, 2025 13:17
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.

4 participants