Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .gittensory.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ gate:
# the gate. Bool. Default: false.
aiAdvisory: false

# Oversized-PR gate. A PR at/above BOTH the file-count and line-count thresholds
# (engine defaults, not configurable here) gets a manual-review HOLD finding —
# never a hard blocker, so it's dry-run/advisory friendly regardless of mode.
# off | advisory | block. Default: off. Config-as-code only — no DB column or
# dashboard toggle; this can only be set here.
size:
mode: off

# Composite merge-readiness gate (no min score).
# off | advisory | block. Default: off.
mergeReadiness: off
Expand All @@ -145,6 +153,19 @@ gate:
# off | advisory | block. Default: off.
manifestPolicy: off

# Self-authored-linked-issue gate — blocks (or advises on) a PR whose only
# linked issue was opened by the PR's own author, which the readiness/quality
# signals can't otherwise catch. off | advisory | block. Default: advisory.
# DB-backed (dashboard-settable too); this overrides the stored value.
selfAuthoredLinkedIssue: advisory

# Gate-wide dry-run. When true, the gate evaluates and posts its verdict as
# normal but never actually blocks/merges/closes based on it — useful for
# trialing a stricter pack or mode change against real traffic before
# enforcing it. Bool. Default: false. Config-as-code only — no DB column or
# dashboard toggle; this can only be set here.
dryRun: false

# First-time-contributor grace. RESERVED / currently INERT: this value is
# parsed and stored, but the gate does not read it — a first-time
# contributor with a real blocker is one-shot closed the same as a
Expand Down Expand Up @@ -188,6 +209,11 @@ gate:
# String or null. Default: null (the key record's model, else a conservative
# per-provider default).
model: null
# Minimum calibrated AI-reviewer confidence (0-1) for a consensus defect to
# become a blocker; below this it stays advisory-only. Number 0–1, or null.
# Default: null (engine uses 0.93). Config-as-code only — no DB column or
# dashboard toggle; this can only be set here.
closeConfidence: null


# ----------------------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions test/unit/focus-manifest.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
import {
buildFocusManifestGuidance,
Expand Down Expand Up @@ -168,6 +169,18 @@ describe("parseFocusManifestContent", () => {
expect(manifest.present).toBe(false);
expect(manifest.warnings.join(" ")).toMatch(/not valid YAML/i);
});

it("parses .gittensory.yml.example with zero warnings (#2554: doc must match parser exactly)", () => {
const content = readFileSync(".gittensory.yml.example", "utf8");
const manifest = parseFocusManifestContent(content, "repo_file");
expect(manifest.warnings).toEqual([]);
expect(manifest.present).toBe(true);
// Spot-check the 4 knobs #2554 added docs for actually round-trip through the real parser.
expect(manifest.gate.sizeMode).toBe("off");
expect(manifest.gate.dryRun).toBe(false);
expect(manifest.gate.selfAuthoredLinkedIssue).toBe("advisory");
expect(manifest.gate.aiReviewCloseConfidence).toBeNull();
});
});

describe("matchesManifestPath", () => {
Expand Down
Loading