Skip to content

chore(types): widen gateCheckMode to optional, drop internal-only passthroughs - #5440

Merged
JSONbored merged 1 commit into
mainfrom
chore/gatecheckmode-optional-stage2-1
Jul 12, 2026
Merged

chore(types): widen gateCheckMode to optional, drop internal-only passthroughs#5440
JSONbored merged 1 commit into
mainfrom
chore/gatecheckmode-optional-stage2-1

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Stage 2.1 + 2.5 of #5373's staged removal plan, combined because widening the type immediately forced the passthrough fix (see below).

  • Widens RepositorySettings.gateCheckMode from required to optional everywhere it's declared (src/types.ts, the 4 OpenAPI response schemas, and gittensory-engine's own RepositorySettings copy), regenerating openapi.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.
  • Widening it immediately surfaced 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 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 typecheck
  • npm run docs:drift-check
  • npm run ui:openapi:check
  • test/unit/backfill.test.ts, test/unit/backfill-2.test.ts -- 249/249
  • test/unit/queue.test.ts through queue-5.test.ts + queue-lifecycle-guards.test.ts -- 859/859
  • test/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

…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.
@JSONbored JSONbored self-assigned this Jul 12, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.42%. Comparing base (55f8fd1) to head (7f6656b).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
shard-1 44.11% <ø> (ø)
shard-2 34.76% <ø> (ø)
shard-3 32.01% <ø> (+0.41%) ⬆️
shard-4 31.27% <ø> (-0.15%) ⬇️
shard-5 33.30% <ø> (+0.01%) ⬆️
shard-6 43.26% <ø> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/github/backfill.ts 97.22% <ø> (ø)
src/openapi/schemas.ts 100.00% <ø> (ø)
src/queue/processors.ts 95.63% <ø> (ø)
src/types.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit e0c1000 into main Jul 12, 2026
19 checks passed
@JSONbored
JSONbored deleted the chore/gatecheckmode-optional-stage2-1 branch July 12, 2026 19:42
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 12, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant