Skip to content

Commit a2b943b

Browse files
committed
docs(review): document gate.copycat.mode and fix docs-drift check
The scaffold PR added copycatGateMode to RepositorySettings but missed two things docs:drift-check enforces for every *GateMode field: a GATE_MODE_MANIFEST entry in scripts/check-docs-drift.mjs, and real documentation on docs.how-reviews-work.tsx + docs.tuning.tsx. Both added, honestly noting the detection engine hasn't shipped yet. Bumps the synthetic-fixture gate-mode count in the drift-check's own test to match.
1 parent 57d3127 commit a2b943b

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

apps/gittensory-ui/src/routes/docs.how-reviews-work.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ function HowReviewsWork() {
109109
warnings; <code>block</code> also hard-blocks at or above <code>slopGateMinScore</code>{" "}
110110
(engine default band <code>60</code>).
111111
</li>
112+
<li>
113+
<strong>Copycat / plagiarism gate</strong> (<code>copycatGateMode</code>, default{" "}
114+
<code>off</code>) — a code containment/similarity check against prior art (repo history,
115+
other PRs). Escalating tiers: <code>warn</code>, <code>label</code>,{" "}
116+
<code>block</code>, plus a further strikes escalation for repeat offenders. Config only
117+
today — the detection engine itself has not shipped yet, so setting this has no effect
118+
until it does.
119+
</li>
112120
<li>
113121
<strong>Merge-readiness gate</strong> (<code>mergeReadinessGateMode</code>, default{" "}
114122
<code>off</code>) — a composite readiness check.

apps/gittensory-ui/src/routes/docs.tuning.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ function Tuning() {
303303
a free advisory-only <code>ai_slop_advisory</code> finding — it never feeds the slop score
304304
or the gate.
305305
</li>
306+
<li>
307+
<code>gate.copycat.mode</code> — code containment/similarity gate against prior art
308+
(repo history, other PRs). Default <code>off</code>. Escalating tiers:{" "}
309+
<code>warn</code>, <code>label</code>, <code>block</code>, plus a further strikes
310+
escalation for repeat offenders. Pair it with <code>gate.copycat.minScore</code>{" "}
311+
(0–100). Config only today — the detection engine has not shipped yet, so this has no
312+
effect until it does.
313+
</li>
306314
<li>
307315
<code>gate.mergeReadiness</code> — composite merge-readiness gate. Default{" "}
308316
<code>off</code>, no min score.

scripts/check-docs-drift.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const GATE_MODE_MANIFEST = [
5353
{ field: "duplicatePrGateMode", aliases: ["duplicatePrGateMode", "gate.duplicates"], pages: ["docs.how-reviews-work.tsx", "docs.tuning.tsx"] },
5454
{ field: "qualityGateMode", aliases: ["qualityGateMode", "gate.readiness.mode"], pages: ["docs.how-reviews-work.tsx", "docs.tuning.tsx"] },
5555
{ field: "slopGateMode", aliases: ["slopGateMode", "gate.slop.mode"], pages: ["docs.how-reviews-work.tsx", "docs.tuning.tsx"] },
56+
{ field: "copycatGateMode", aliases: ["copycatGateMode", "gate.copycat.mode"], pages: ["docs.how-reviews-work.tsx", "docs.tuning.tsx"] },
5657
{ field: "sizeGateMode", aliases: ["sizeGateMode", "gate.size"], pages: ["docs.how-reviews-work.tsx", "docs.tuning.tsx", "docs.github-app.tsx"] },
5758
{ field: "lockfileIntegrityGateMode", aliases: ["lockfileIntegrityGateMode", "gate.lockfileIntegrity"], pages: ["docs.how-reviews-work.tsx", "docs.tuning.tsx", "docs.github-app.tsx"] },
5859
{ field: "claGateMode", aliases: ["claGateMode", "gate.claMode"], pages: ["docs.how-reviews-work.tsx", "docs.tuning.tsx", "docs.github-app.tsx"] },

test/unit/check-docs-drift-script.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ describe("check-docs-drift script", () => {
141141
const result = checkDocsDrift({ root: "/fake", readFile: makeReadFile(files) });
142142

143143
expect(result.failures).toEqual([]);
144-
// gateModes bumped 11 -> 12 for linkedIssueSatisfactionGateMode (#1961/#3906).
145-
expect(result.counts).toEqual({ flags: 10, commands: 19, gateModes: 12 });
144+
// gateModes bumped 12 -> 13 for copycatGateMode (#1969, currently inert config scaffold).
145+
expect(result.counts).toEqual({ flags: 10, commands: 19, gateModes: 13 });
146146
});
147147

148148
it("catches an unmapped *GateMode field missing from GATE_MODE_MANIFEST", () => {

0 commit comments

Comments
 (0)