Parent: #1936
Problem
RepositorySettingsSchema and RepoSettingsPreviewSchema (src/openapi/schemas.ts) are hand-authored Zod schemas and are missing 11 real fields that the runtime RepositorySettings TS type has and the API handler actually serializes: sizeGateMode, gateDryRun, aiReviewMode, aiReviewByok, aiReviewProvider, aiReviewModel, aiReviewAllAuthors, aiReviewCloseConfidence, closeOwnerAuthors, badgeEnabled, slopAiAdvisory. ui:openapi:check (already in CI) only verifies the generated openapi.json matches the hand-written Zod schema — it never verifies the Zod schema matches the actual RepositorySettings TS interface. This silently breaks generated API clients, including @jsonbored/gittensory-mcp, which consume the OpenAPI spec and have no way to know about fields the spec doesn't mention.
Requirements
- Add all 11 missing fields to
RepositorySettingsSchema (and RepoSettingsPreviewSchema where applicable), matching the actual TS type's shape/optionality.
- Add a lightweight structural-diff check to
test:ci (or a dedicated npm run script) that compares the Zod schema's declared keys against keyof RepositorySettings, failing CI on any field present in one but not the other — closing the gap ui:openapi:check doesn't cover.
- Regenerate
apps/gittensory-ui/public/openapi.json after the schema fix.
Deliverables
- Updated
RepositorySettingsSchema/RepoSettingsPreviewSchema with all 11 fields.
- A new structural-diff check wired into
test:ci, following the same "regenerate + diff" pattern already proven by ui:openapi:check.
- Regenerated
apps/gittensory-ui/public/openapi.json.
Acceptance criteria
- Every field present in the runtime
RepositorySettings type that the API actually serializes is present in the OpenAPI schema.
- The new structural-diff check fails CI if a future field is added to
RepositorySettings (and actually returned by the API) without a corresponding OpenAPI schema update.
@jsonbored/gittensory-mcp and any other OpenAPI-generated client can see the full field set.
Expected outcome
The OpenAPI spec — and everything generated from it — stops silently drifting from the actual API surface, with a permanent CI guard against recurrence rather than a one-time fix.
Parent: #1936
Problem
RepositorySettingsSchemaandRepoSettingsPreviewSchema(src/openapi/schemas.ts) are hand-authored Zod schemas and are missing 11 real fields that the runtimeRepositorySettingsTS type has and the API handler actually serializes:sizeGateMode,gateDryRun,aiReviewMode,aiReviewByok,aiReviewProvider,aiReviewModel,aiReviewAllAuthors,aiReviewCloseConfidence,closeOwnerAuthors,badgeEnabled,slopAiAdvisory.ui:openapi:check(already in CI) only verifies the generatedopenapi.jsonmatches the hand-written Zod schema — it never verifies the Zod schema matches the actualRepositorySettingsTS interface. This silently breaks generated API clients, including@jsonbored/gittensory-mcp, which consume the OpenAPI spec and have no way to know about fields the spec doesn't mention.Requirements
RepositorySettingsSchema(andRepoSettingsPreviewSchemawhere applicable), matching the actual TS type's shape/optionality.test:ci(or a dedicatednpm runscript) that compares the Zod schema's declared keys againstkeyof RepositorySettings, failing CI on any field present in one but not the other — closing the gapui:openapi:checkdoesn't cover.apps/gittensory-ui/public/openapi.jsonafter the schema fix.Deliverables
RepositorySettingsSchema/RepoSettingsPreviewSchemawith all 11 fields.test:ci, following the same "regenerate + diff" pattern already proven byui:openapi:check.apps/gittensory-ui/public/openapi.json.Acceptance criteria
RepositorySettingstype that the API actually serializes is present in the OpenAPI schema.RepositorySettings(and actually returned by the API) without a corresponding OpenAPI schema update.@jsonbored/gittensory-mcpand any other OpenAPI-generated client can see the full field set.Expected outcome
The OpenAPI spec — and everything generated from it — stops silently drifting from the actual API surface, with a permanent CI guard against recurrence rather than a one-time fix.