Skip to content

feat(config): expose gate.mergeReadiness + gate.firstTimeContributorGrace in .gittensory.yml (#822)#826

Merged
JSONbored merged 1 commit into
mainfrom
feat/config-as-code-gate-parity
Jun 17, 2026
Merged

feat(config): expose gate.mergeReadiness + gate.firstTimeContributorGrace in .gittensory.yml (#822)#826
JSONbored merged 1 commit into
mainfrom
feat/config-as-code-gate-parity

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #822.

What

The last two gate settings — mergeReadinessGateMode (#551) and firstTimeContributorGrace (#552) — shipped DB-only; their .gittensory.yml parity was deferred each time. This closes that recurring debt so the config-as-code gate surface is complete (a prerequisite for the agent layer reading/proposing full gate policy as code).

gate:
  mergeReadiness: block          # off | advisory | block  -> mergeReadinessGateMode
  firstTimeContributorGrace: true # true | false           -> firstTimeContributorGrace

How

Six surgical additions in src/signals/focus-manifest.ts, each mirroring the existing per-field pattern (e.g. gate.slop.mode):

  • FocusManifestGateConfig type + EMPTY_GATE_CONFIG default
  • parseGateConfignormalizeOptionalGateMode / normalizeOptionalBoolean (bad values warn + null out, never block)
  • the gate.present predicate
  • gateConfigToJson serializer (the cache round-trip path)
  • resolveEffectiveSettings — manifest wins over DB, identical to every other gate mode

Tests

  • focus-manifest.test.ts: parse + round-trip + bad-value warnings for both keys; updated the two full-gate-object equality fixtures
  • gate-check-policy.test.ts: end-to-end — gate.mergeReadiness: block drives the composite to failure even when the DB sub-gate is advisory; gate.firstTimeContributorGrace: true softens a newcomer's block to neutral

Verification

typecheck clean · full suite 1965 passed, 1 skipped (only the pre-existing pngjs visual-agent skip) · diff is 3 files, +40/-3 · no migration / no openapi change

Relates #551, #552, #555 (focus-manifest-as-gate).

…race in .gittensory.yml (#822)

Both settings shipped DB-only (#551, #552); their .gittensory.yml parity
was deferred. Extend the focus-manifest gate-schema parser, the present
predicate, the gateConfigToJson serializer, and resolveEffectiveSettings
so a repo can drive both from its config file (manifest wins over DB,
mirroring every other gate mode).

  gate.mergeReadiness: off|advisory|block  -> mergeReadinessGateMode
  gate.firstTimeContributorGrace: true|false -> firstTimeContributorGrace

Closes the recurring debt where each new DB gate setting shipped without
its manifest mapping.
@dosubot dosubot Bot added the size:S label Jun 17, 2026
@ghost

ghost commented Jun 17, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #826 is no longer open. No action.

💰 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.

@ghost ghost added the gittensory:reviewed label Jun 17, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.64%. Comparing base (29f64c6) to head (f7aed42).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #826   +/-   ##
=======================================
  Coverage   96.64%   96.64%           
=======================================
  Files          97       97           
  Lines       14068    14072    +4     
  Branches     5126     5130    +4     
=======================================
+ Hits        13596    13600    +4     
  Misses         95       95           
  Partials      377      377           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 2ff4d71 into main Jun 17, 2026
19 checks passed
@JSONbored
JSONbored deleted the feat/config-as-code-gate-parity branch June 17, 2026 10:49
@ghost

ghost commented Jun 17, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 3 changed file(s) — two independent AI reviewers.

Changed files: src/signals/focus-manifest.ts, test/unit/focus-manifest.test.ts, test/unit/gate-check-policy.test.ts

Suggested action:Safe to merge — both reviewers found no blocking issues.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR introduces two new gate configuration options (mergeReadiness and firstTimeContributorGrace) into the focus manifest parsing, JSON conversion, and effective settings resolution, with accompanying unit tests to verify parsing, round‑tripping, and policy behavior.

Suggestions

  • Update any documentation or schema definitions for .gittensory.yml to include the new gate keys.
  • Ensure that any other modules that consume FocusManifestGateConfig (e.g., UI or CLI) are aware of the added fields to avoid silent drops.
  • Consider adding a test case for the default (undefined) behavior when these fields are omitted.

Worth double-checking

  • If RepositoryEffectiveSettings type lacks the new properties, TypeScript compilation could fail in other parts of the codebase.
  • Missing schema updates could allow users to set unsupported values without proper warnings.

Reviewer B · mistral-small-3.1-24b-instruct — recommends ✅ merge
This PR adds two new configuration options, mergeReadiness and firstTimeContributorGrace, to the .gittensory.yml file. The changes are well-implemented, with appropriate handling in parsing, serialization, and effective settings resolution. Tests are added to cover the new functionality.

Suggestions

  • Consider adding a comment above the new fields in FocusManifestGateConfig to explain their purpose and usage.
  • Ensure that the documentation for .gittensory.yml is updated to reflect these new configuration options.

Worth double-checking

  • Verify that the new configuration options do not introduce any regressions in existing functionality.
  • Check that the tests adequately cover all edge cases for the new configuration options.

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.

feat(config): expose remaining DB-only gate settings in .gittensory.yml (config-as-code parity)

1 participant