Skip to content

feat(config): audit repository-settings flag enforcement (Fixes #797) - #915

Merged
JSONbored merged 7 commits into
JSONbored:mainfrom
kiannidev:feat/issue-797-settings-enforcement
Jun 20, 2026
Merged

feat(config): audit repository-settings flag enforcement (Fixes #797)#915
JSONbored merged 7 commits into
JSONbored:mainfrom
kiannidev:feat/issue-797-settings-enforcement

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wire requireLinkedIssue into effective settings so it promotes linkedIssueGateMode to block when still off (no silent divergence between the dashboard toggle and gate blocking).
  • Use effective (DB + .gittensory.yml) settings for the settings preview API instead of DB-only values.
  • Include aiReview* fields in settings preview output; use repo settings (not a hardcoded default) in maintainer activation previews.
  • Add repository-settings-enforcement.test.ts documenting enforcement for requireLinkedIssue, includeMaintainerAuthors, and aiReviewMode.

Test plan

  • npx vitest run test/unit/repository-settings-enforcement.test.ts
  • npx vitest run test/unit/focus-manifest.test.ts test/unit/maintainer-activation.test.ts test/unit/gate-check-policy.test.ts test/unit/settings-preview.test.ts
  • npm run test:coverage

Fixes #797

Promote requireLinkedIssue into linkedIssueGateMode when unset, resolve
effective settings for the settings preview API, include aiReview fields in
preview output, and add an enforcement test matrix for the audited flags.

Fixes JSONbored#797

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner June 19, 2026 00:54
@dosubot dosubot Bot added the size:M label Jun 19, 2026
@ghost

ghost commented Jun 19, 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 #915 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 19, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@ghost

This comment has been minimized.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.60%. Comparing base (b43f01d) to head (9fc80a5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #915       +/-   ##
===========================================
+ Coverage   70.99%   96.60%   +25.61%     
===========================================
  Files         109      110        +1     
  Lines       14921    14926        +5     
  Branches     5394     5398        +4     
===========================================
+ Hits        10593    14420     +3827     
+ Misses       3094      104     -2990     
+ Partials     1234      402      -832     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add aiReview fields to RepoSettingsPreview and fix gateCheckPolicy usage
in the repository-settings enforcement test matrix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 19, 2026
Keep shared resolveRepositorySettings from settings module while adopting
upstream focus-manifest imports and loadGateAuthorHistory in processors.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ghost

ghost commented Jun 19, 2026

Copy link
Copy Markdown

🔍 Maintainer review

Reviewed 9 file(s) — ✅ all CI green.

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

Reviewer A · gpt-oss-120b — recommends ✅ merge
The changes introduce a proper resolver for effective repository settings, enforce requireLinkedIssue consistency, update API routes and queue processors to use the new resolver, extend settings preview with AI review fields, and add comprehensive tests. No security issues, secret leaks, or SSRF concerns are introduced. Typescript strictness is maintained. The modifications affect core settings logic, so they are non‑trivial but well‑tested.

Suggestions

  • Update API documentation to note that settings now reflect merged DB + .gittensory.yml values.
  • Consider whether exposing aiReviewProvider/model in the public settings preview is acceptable; if they are considered internal, mask them.
  • Run integration tests for the API endpoint to ensure external consumers handle the additional fields without breakage.

Worth double-checking

  • Potential breaking change for external clients that previously received raw DB settings only.
  • Public exposure of AI provider/model identifiers, though not secret, may be undesirable for some deployments.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The PR correctly implements enforcement of the requireLinkedIssue flag by mapping it to linkedIssueGateMode when the gate is off, removes duplicate code, updates dependent logic, and adds comprehensive tests. Changes maintain the public/private boundary (no forbidden terms introduced) and align with the project's settings-as-code approach.

No blocking issues spotted.

@dosubot dosubot Bot added the lgtm label Jun 20, 2026
@JSONbored
JSONbored merged commit 4d748c4 into JSONbored:main Jun 20, 2026
17 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 20, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(config): audit repository-settings flag enforcement

2 participants