chore(types): widen gateCheckMode to optional, drop internal-only passthroughs - #5440
Merged
Merged
Conversation
…sthroughs (#5373) Widen RepositorySettings.gateCheckMode from required to optional everywhere it's declared (src/types.ts, the 4 OpenAPI response schemas, and the gittensory-engine package's own RepositorySettings copy), regenerating openapi.json -- unlocks safely omitting it from test fixtures without a TS error. Production code (repositories.ts) is untouched and keeps always populating the field on every read, so this is not a behavior change on its own. Widening it exposed 4 call sites in src/queue/processors.ts that copied settings.gateCheckMode into recordAuditEvent metadata (now typed to reject undefined) and one in src/github/backfill.ts's summarizeRepairSettings -- both internal-only diagnostics surfaces (audit log entries, installation-repair summaries), never a documented API response. Stopped passing it through in all 5 spots; reviewCheckMode (the real authority) is unaffected and still present.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 7f6656b | Commit Preview URL Branch Preview URL |
Jul 12 2026, 07:37 PM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5440 +/- ##
==========================================
- Coverage 94.46% 94.42% -0.04%
==========================================
Files 554 554
Lines 44426 44426
Branches 14663 14663
==========================================
- Hits 41967 41950 -17
- Misses 1784 1801 +17
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Merged
4 tasks
JSONbored
added a commit
that referenced
this pull request
Jul 12, 2026
…gs-preview responses (#5373) (#5454) Stops copying settings.gateCheckMode into GithubAppBehavior (registration-readiness.ts) and the settings-preview response object, removing the field from both local report types entirely. Neither surface is a documented public API contract for third-party consumers, confirmed via the #5373 discovery audit: not exported from gittensory-engine's public index, no external self-hosted install (all 3 known ones checked directly) references it, and no dedicated test asserted on it in either output. Also fixes 3 OpenAPI schema entries (RepoSettingsPreviewSchema, RegistrationReadinessSchema, and InstallationRepairSchema) that still declared gateCheckMode as present -- InstallationRepairSchema has been stale since #5440 dropped the field from backfill.ts's summarizeRepairSettings but never updated its schema. Regenerated openapi.json; RepositorySettingsSchema itself is untouched since RepositorySettings.gateCheckMode still exists (optional) at this stage.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage 2.1 + 2.5 of #5373's staged removal plan, combined because widening the type immediately forced the passthrough fix (see below).
RepositorySettings.gateCheckModefrom required to optional everywhere it's declared (src/types.ts, the 4 OpenAPI response schemas, andgittensory-engine's ownRepositorySettingscopy), regeneratingopenapi.json. Production code (repositories.ts) is untouched and keeps always populating the field on every read, so this alone is not a behavior change -- it unlocks omitting the field from test fixtures without a TS error in the sweep PRs that follow.src/queue/processors.tsthat copiedsettings.gateCheckModeintorecordAuditEvent(...)metadata (now typed to rejectundefined) and one insrc/github/backfill.ts'ssummarizeRepairSettings. Both are internal-only diagnostics surfaces (audit log entries, installation-repair summaries), never a documented API response -- confirmed via the Stage and remove the derived-only gateCheckMode field (naming sprawl, #5355 follow-up) #5373 discovery audit. Stopped passing it through in all 5 spots rather than adding a throwaway?? "off"coercion that Stage 2.5 would've just deleted anyway.reviewCheckMode(the real authority) is unaffected and still present everywhere.Test plan
npm run typechecknpm run docs:drift-checknpm run ui:openapi:checktest/unit/backfill.test.ts,test/unit/backfill-2.test.ts-- 249/249test/unit/queue.test.tsthroughqueue-5.test.ts+queue-lifecycle-guards.test.ts-- 859/859test/unit/registration-readiness.test.ts,settings-preview.test.ts,maintainer-activation.test.ts(unit + integration),routes-ai-byok.test.ts,gate-check-policy.test.ts-- 205/205