Skip to content

docs(settings): clarify moderationGateMode gates only the shared violation tally#5314

Merged
JSONbored merged 1 commit into
mainfrom
docs/moderation-gate-mode-scope-comment
Jul 12, 2026
Merged

docs(settings): clarify moderationGateMode gates only the shared violation tally#5314
JSONbored merged 1 commit into
mainfrom
docs/moderation-gate-mode-scope-comment

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

`moderationGateMode`'s JSDoc said "whether the whole layer runs on THIS repo" — read in isolation this implies `"off"` disables the anti-abuse system. It does not: the four enforcement mechanisms (contributor-cap close, blacklist close, review-nag cooldown, review-evasion close) each read only their own independent setting and never check this field. Its one real call site (`applyModerationEscalationForRule`) runs only after enforcement already completed — it gates only the shared cross-repo violation tally + warning/banned label + auto-blacklist-at-threshold.

`moderation-rules.ts`'s own file header and `.gittensory.yml.example` already describe this scope correctly — reworded the `types.ts` JSDoc to match, and added the same caveat to the one `openapi/schemas.ts` occurrence.

Scope

Docs-only, no functional code change. `src/types.ts`, `src/openapi/schemas.ts`, regenerated `openapi.json`.

Validation

  • `npm run typecheck` — clean
  • `npm run ui:openapi:check` / `npm run ui:openapi:settings-parity` — clean
  • `npm run docs:drift-check` — clean
  • `npm run ui:lint` — clean (0 errors)

Closes #5289

…ation tally

The field's JSDoc said "whether the whole layer runs on THIS repo" --
read in isolation this implies "off" disables the anti-abuse system.
It does not: the four enforcement mechanisms (contributor-cap close,
blacklist close, review-nag cooldown, review-evasion close) each
read only their own independent setting and never check this field.
Its one real call site runs only after enforcement already completed
-- it gates only the shared cross-repo violation tally + warning/
banned label + auto-blacklist-at-threshold.

moderation-rules.ts's own file header and .gittensory.yml.example
already describe this scope correctly; reworded the types.ts JSDoc to
match, and added the same caveat to the openapi occurrence.

Docs-only, no behavior change. Regenerated openapi.json.

Refs #5289
@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 d80bf7e Commit Preview URL

Branch Preview URL
Jul 12 2026, 01:43 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.37%. Comparing base (b7a410d) to head (d80bf7e).
⚠️ Report is 8 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5314   +/-   ##
=======================================
  Coverage   94.37%   94.37%           
=======================================
  Files         474      474           
  Lines       40128    40128           
  Branches    14631    14631           
=======================================
  Hits        37869    37869           
  Misses       1583     1583           
  Partials      676      676           
Flag Coverage Δ
shard-1 46.28% <ø> (-0.28%) ⬇️
shard-2 34.74% <ø> (+0.06%) ⬆️
shard-3 32.05% <ø> (-0.04%) ⬇️
shard-4 31.97% <ø> (-0.11%) ⬇️
shard-5 33.45% <ø> (-0.15%) ⬇️
shard-6 45.07% <ø> (+0.23%) ⬆️

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/types.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 12, 2026
@JSONbored JSONbored merged commit cf58317 into main Jul 12, 2026
19 checks passed
@JSONbored JSONbored deleted the docs/moderation-gate-mode-scope-comment branch July 12, 2026 13:55
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.

Clarify that moderationGateMode: off does not disable the four anti-abuse mechanisms

1 participant