fix(review): mark gate.firstTimeContributorGrace as reserved/inert#2411
Conversation
evaluateGateCheckCore in src/rules/advisory.ts never reads
policy.firstTimeContributorGrace (or its authorMergedPrCount /
authorClosedUnmergedPrCount companions) — a deliberate removal ("blocker
findings must remain closure/rejection outcomes") that the public-facing
docs never caught up with. A maintainer reading .gittensory.yml.example
would believe setting this true softens a blocker for newcomers; nothing
changes, and a first-time contributor with a real blocker is still
one-shot closed like anyone else.
- Rewrite the .gittensory.yml.example entry, the RepositorySettings field
doc in types.ts, and the GateCheckPolicy field docs in advisory.ts to
state the flag (and its two companion counts) are reserved/inert rather
than describing behavior that no longer runs.
- Emit a manifest warning when a repo explicitly sets
gate.firstTimeContributorGrace: true, so a maintainer relying on it gets
a visible signal instead of silent inertness. Unset/false (the default,
and also the effective behavior) does not warn.
This is not a guard weakening — the actual behavior was already stricter
than documented. Only the docs and warning are new.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2411 +/- ##
=======================================
Coverage 95.78% 95.78%
=======================================
Files 224 224
Lines 24917 24919 +2
Branches 9056 9057 +1
=======================================
+ Hits 23867 23869 +2
Misses 428 428
Partials 622 622
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-01 20:04:38 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
#5321) firstTimeContributorGrace is explicitly RESERVED/inert (#2266) -- the gate evaluator never reads it. #2411 already fixed the config-as-code half of this exact problem: a parse-time warning plus a rewritten .gittensory.yml.example correctly disclose inertness. But #2411 never touched the dashboard/API surface -- the live maintainer-dashboard toggle still read "Soften a newcomer's block to advisory" with zero disclosure, the one surface a non-technical maintainer is most likely to actually use. Applies the same disclose-don't-remove treatment #2411 gave the yml surface: the toggle now renders greyed-out and non-interactive with a "Reserved -- currently has no effect (#2266)" hint (new `disabled` prop on ToggleControl/ToggleFieldDef), and the same disclosure is added as a .describe() on all 3 API/openapi occurrences. Kept the field itself in the schema (not removed) to match the #2411 precedent and avoid an API-breaking change for a field that is genuinely harmless to still accept. Regenerated openapi.json. Refs #5292
…-to-end (#6714) Confirmed via #6446's two decisions: (1) the 7 gate:-only fields (gatePack, slopGateMode/slopGateMinScore/slopAiAdvisory, mergeReadinessGateMode, manifestPolicyGateMode, linkedIssueSatisfactionGateMode, requireFreshRebaseWindowMinutes, aiReviewLowConfidenceDisposition) are already correctly wired through applyGateConfigOverrides and already have DB columns + dashboard UI, so no new settings.* twins are added -- gate: stays canonical, matching #6444's decision. (2) firstTimeContributorGrace has been RESERVED/INERT since #2411 deliberately stopped evaluateGateCheckCore from reading it (blocker findings must remain closure/rejection outcomes, not softened for a newcomer) -- rather than wiring it in against that settled design, this deletes the dead surface entirely: the DB column (migration 0161), the manifest gate.firstTimeContributorGrace parsing in both the app and engine copies of focus-manifest.ts, the predicted-gate engine mirror, the dashboard's disabled disclosure toggle (#5321), and every doc/example mention. Closes #6446, closes epic #6440 (all four config-as-code batches now shipped).
What
.gittensory.yml.exampledocumentsgate.firstTimeContributorGrace: trueas softening a would-be BLOCK to advisory for a genuine newcomer. The value is faithfully parsed, clamped, and threaded end-to-end throughRepositorySettingsintoGateCheckPolicyat every call site — butevaluateGateCheckCore(src/rules/advisory.ts) never readspolicy.firstTimeContributorGraceor itsauthorMergedPrCount/authorClosedUnmergedPrCountcompanions anywhere in its body. A nearby code comment confirms this was a deliberate removal ("blocker findings must remain closure/rejection outcomes"); an existing test already asserts a newcomer with grace=true still getsconclusion: "failure". The public docs were simply never updated to match.This is not a guard weakening — the actual behavior is stricter than advertised — but it's a real config-as-code correctness gap: a maintainer's mental model of their own gate's leniency toward newcomers is wrong.
Fix
.gittensory.yml.exampleentry, theRepositorySettings.firstTimeContributorGracedoc intypes.ts, and theGateCheckPolicyfield docs (all three: the flag plus its two companion counts) inadvisory.tsto state the setting is reserved/currently inert, rather than describing softening behavior that no longer runs.FocusManifest.warnings) when a repo explicitly setsgate.firstTimeContributorGrace: true, so a maintainer relying on it gets a visible signal instead of silent inertness. Unset or explicitfalse— the default, and also the effective runtime behavior — does not warn.The field itself is kept (not deleted): the design comment frames the removal as deliberate-but-field-retained, and a warning needs a field to warn about.
Tests
gate.firstTimeContributorGrace: trueproduces a manifest warning matching "reserved/inert".false, produces no such warning.npx tsc --noEmitclean.npx vitest run test/unit/focus-manifest.test.ts— 138/138 pass.npm run test:coverage— 309 files / 5685 tests pass.npm audit --audit-level=moderate— 0 vulnerabilities.Advances #1936. Closes #2266.