Skip to content

docs(settings): fix stale reviewEvasionProtection default claim, disclose always-on counter#5315

Merged
JSONbored merged 1 commit into
mainfrom
docs/review-evasion-protection-stale-default
Jul 12, 2026
Merged

docs(settings): fix stale reviewEvasionProtection default claim, disclose always-on counter#5315
JSONbored merged 1 commit into
mainfrom
docs/review-evasion-protection-stale-default

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Both halves of the field doc were stale: (1) `"off"` is no longer the default — #4011 flipped the effective default to `"close"` (`normalizeReviewEvasionProtection` in `db/repositories.ts`). (2) Even explicitly set `"off"`, detection isn't fully disabled — the ready↔draft cycling detector unconditionally bumps a persistent DB counter for every author-driven draft conversion; only the enforcement (close action) is gated on the setting. A repo running `"off"` silently accumulates a cycling count, so re-enabling `"close"` can immediately treat a historical off-period cycle as "repeated" on the very next legitimate conversion — a genuine one-shot false-positive close risk.

Fixed the same stale claim in both example yml templates (byte-synced, edited identically — verified via the sync test) and added the same caveat to the openapi occurrence.

Scope

Docs-only, no behavior change. `src/types.ts`, `src/openapi/schemas.ts`, `.gittensory.yml.example`, `config/examples/gittensory.full.yml`, regenerated `openapi.json`.

Validation

  • `npm run typecheck` — clean
  • `npx vitest run test/unit/config-templates.test.ts` — 18/18 (template sync intact)
  • `npm run ui:openapi:check` / `npm run ui:openapi:settings-parity` — clean
  • `npm run docs:drift-check` — clean

Not in this PR

If the false-positive-on-reenable behavior is deemed unacceptable, a separate follow-up could snapshot/reset the counter at the moment a repo transitions away from "off" — that's a behavior change, scoped as its own issue, not bundled into this doc fix.

Closes #5290

…lose always-on counter

Both halves of the field doc were stale: (1) "off" is no longer the
default -- #4011 flipped the effective default to "close"
(normalizeReviewEvasionProtection in db/repositories.ts). (2) Even
explicitly set "off", detection isn't fully disabled -- the
ready<->draft cycling detector unconditionally bumps a persistent DB
counter for every author-driven draft conversion; only the
enforcement (close action) is gated on the setting. A repo running
"off" silently accumulates a cycling count, so re-enabling "close"
can immediately treat a historical off-period cycle as "repeated" on
the very next legitimate conversion.

Fixed the same stale claim in both example yml templates (byte-synced,
edited identically) and added the same caveat to the openapi
occurrence.

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

Refs #5290
@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 5d9cff3 Commit Preview URL

Branch Preview URL
Jul 12 2026, 01:47 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 (5d9cff3).
⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5315   +/-   ##
=======================================
  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 870d47f into main Jul 12, 2026
18 checks passed
@JSONbored
JSONbored deleted the docs/review-evasion-protection-stale-default branch July 12, 2026 13:56
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.

Fix stale reviewEvasionProtection default claim and disclose always-on counter

1 participant