Skip to content

chore(types): mark gateCheckMode @deprecated at every declaration site - #5430

Merged
JSONbored merged 1 commit into
mainfrom
chore/gatecheckmode-deprecate-stage1
Jul 12, 2026
Merged

chore(types): mark gateCheckMode @deprecated at every declaration site#5430
JSONbored merged 1 commit into
mainfrom
chore/gatecheckmode-deprecate-stage1

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Stage 1 of #5373's two-stage plan (gateCheckMode is a computed read-back of reviewCheckMode, deprecated since #4618).

  • Reduce redundant config surface: linked-issue knob, gateCheckMode, label fields #4618 already made gateCheckMode derived-only with narrative comments explaining it in most places, but several public-surface type declarations never got an explicit @deprecated marker on the field itself: RepositorySettings (src/types.ts), GithubAppBehavior (registration-readiness.ts), the settings-preview response shape, MaintainerActivationPreview.currentGateMode, the gittensory-engine package's own RepositorySettings copy, and all 4 OpenAPI response schema definitions. Added @deprecated (or a matching plain comment where the file has no JSDoc-tag precedent, i.e. the Zod schema file) at each site pointing to reviewCheckMode.
  • Found and removed one genuinely dead field along the way: the UI's local ActivationResponse.gateCheckMode was declared but never read anywhere in activation-preview.tsx -- confirmed via grep, removed from both the type and its test fixture.
  • No behavior change: verified the regenerated openapi.json is byte-identical (plain comments only, no .describe()/.openapi() metadata added).

Stage 2 (the actual DB column + full removal, 447 occurrences across 48 files) is intentionally out of scope here and tracked separately per #5373.

Test plan

  • npm run typecheck
  • npm run ui:typecheck
  • npm run ui:lint
  • npm run docs:drift-check
  • npm run ui:openapi:check (confirms zero drift -- plain comments don't affect the generated schema)
  • test/unit/registration-readiness.test.ts, test/unit/repo-policy-readiness.test.ts, test/unit/settings-preview.test.ts, test/unit/maintainer-settings-preview-ui.test.ts, test/unit/backfill.test.ts, test/unit/backfill-2.test.ts, and the UI's activation-preview test -- all green

@superagent-security

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 12, 2026

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 94ed64e Commit Preview URL

Branch Preview URL
Jul 12 2026, 07:22 PM

@JSONbored JSONbored self-assigned this Jul 12, 2026
@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 (156b382) to head (94ed64e).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5430      +/-   ##
==========================================
- 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.82% <ø> (+0.06%) ⬆️
shard-3 31.98% <ø> (+0.39%) ⬆️
shard-4 31.69% <ø> (+0.28%) ⬆️
shard-5 32.71% <ø> (-0.57%) ⬇️
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/openapi/schemas.ts 100.00% <ø> (ø)
src/services/maintainer-activation.ts 100.00% <ø> (ø)
src/signals/registration-readiness.ts 98.55% <ø> (ø)
src/signals/settings-preview.ts 98.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.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 12, 2026
@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-12 19:26:22 UTC

8 files · 1 AI reviewer · 1 blocker · readiness 100/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This is a pure documentation/annotation PR that adds @​deprecated JSDoc comments (or matching plain comments in the Zod schema file) to the gateCheckMode field across 7 public-surface type declarations, plus removes one genuinely dead field (ActivationResponse.gateCheckMode in activation-preview.tsx, confirmed unused via grep and removed from both the type and its test fixture). The changes are comment-only additions with no logic changes, consistent with the PR's claim that the regenerated openapi.json is byte-identical. The activation-preview.tsx removal is correctly scoped -- the file's ActivationPreviewResponse still retains currentGateMode (used at line 145 to render the gate status pill), so only the truly dead ActivationResponse.gateCheckMode was removed.

Nits — 6 non-blocking
  • The 'validate' and 'validate-tests (4)' CI checks are listed as FAILED -- worth confirming these aren't related to the dead-field removal in activation-preview.tsx before merging, since that's the only behavioral (non-comment) change in the diff.
  • No new test coverage was added despite the stated intent of a zero-behavior-change PR; the removed field in the test fixture (activation-preview.test.tsx) is the only test touched, which is appropriate but leaves nothing asserting the deprecation comments themselves (not typically testable, so this is a very minor nit).
  • Double-check the two failing 'validate'/'validate-tests (4)' CI jobs aren't flagging the ActivationResponse.gateCheckMode removal as a snapshot/type mismatch somewhere not shown in this diff.
  • nit: src/openapi/schemas.ts:672 uses plain comments inside Zod schema objects, so generated OpenAPI consumers will not receive a machine-readable deprecation marker; that matches the stated no-drift intent, but the PR text should avoid implying generated API metadata changed.
  • src/openapi/schemas.ts:672: either keep the current plain-comment approach and describe it explicitly as source-only documentation, or add generated OpenAPI deprecation metadata in the later removal plan if external clients need machine-readable notice.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 44 registered-repo PR(s), 36 merged, 457 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 44 PR(s), 457 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Improvement ⚠️ ℹ️ None detected risk: low · value: none — No structural-improvement signals were detected for this PR.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 44 PR(s), 457 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before / after /
/ mobile before / (mobile) after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

#5373)

#4618 already made gateCheckMode a computed read-back of reviewCheckMode
with narrative comments explaining it in most places, but several
public-surface type declarations (RepositorySettings, GithubAppBehavior,
the settings-preview response shape, the activation preview response,
the gittensory-engine package's own RepositorySettings copy, and the
OpenAPI response schemas) never got an explicit @deprecated marker on
the field itself. Add one everywhere it was missing so IDEs/readers see
it at the point of use, not just in a few narrative comments elsewhere
in the codebase.

Also drops gateCheckMode from the UI's local ActivationResponse type --
confirmed dead: the field was declared but never read anywhere in that
component.

Stage 1 of #5373's two-stage plan; the DB column/full removal (Stage 2)
is tracked separately given its size (447 occurrences across 48 files).
@JSONbored
JSONbored force-pushed the chore/gatecheckmode-deprecate-stage1 branch from 8289a6a to 94ed64e Compare July 12, 2026 19:20
@JSONbored
JSONbored merged commit e137ddc into main Jul 12, 2026
19 checks passed
@JSONbored
JSONbored deleted the chore/gatecheckmode-deprecate-stage1 branch July 12, 2026 19:28
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant