feat(settings): add the per-repo contributor blacklist config layer (#1425) - #1429
Merged
Conversation
…1425) Anti-abuse foundation: a config-driven contributor blacklist so banned offenders (plagiarists / farmers) can be handled automatically by the converged engine. This PR is the data + resolution layer only — NO behavior change yet (the resolved list is unused, so the engine is byte-identical); the deterministic disposition lands in the follow-up. Config-as-code parity, layered like every other setting (.gittensory.yml > DB): - RepositorySettings.contributorBlacklist + the public-safe ContributorBlacklistEntry type (login + optional reason/evidence/addedAt; logins are public data). - repository_settings.contributor_blacklist_json column + migration 0072 (default []). - the settings resolver (DB read/serialize), the .gittensory.yml settings: overlay, OpenAPI, and the settings PUT route. - src/settings/contributor-blacklist.ts: pure normalize (login-pattern validation, public-safe metadata, de-dup, caps), findBlacklistEntry / isAuthorBlacklisted (case-insensitive), and mergeContributorBlacklists (the global-union primitive for the shared list, used at the point of use). Never hard-coded for any repo. Part of #1425 / #1409.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 54de4fc | Commit Preview URL Branch Preview URL |
Jun 26 2026, 07:02 AM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1429 +/- ##
==========================================
+ Coverage 95.38% 95.39% +0.01%
==========================================
Files 192 193 +1
Lines 20875 20929 +54
Branches 7548 7564 +16
==========================================
+ Hits 19912 19966 +54
Misses 383 383
Partials 580 580
🚀 New features to boost your workflow:
|
This was referenced Jun 26, 2026
Closed
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The config + resolution layer for a configurable contributor blacklist (#1425) so banned offenders (plagiarists / farmers) can be handled automatically by the converged engine instead of by hand. This PR is the data layer only — no behavior change yet (the resolved list is unused, so the engine is byte-identical); the deterministic disposition lands in the next PR of the stack.
Modular + config-driven, never hard-coded for any repo — layered exactly like every other setting (
.gittensory.yml> DB), mirroring thecommandAuthorization/linked-issue hard-rulewiring:ContributorBlacklistEntry(src/types.ts): a public GitHublogin+ optional public-safe metadata (reasone.g.plagiarism/farming,evidencePR/issue URLs,addedAt). No wallets/hotkeys/trust-scores/private values.RepositorySettings.contributorBlacklist+ therepository_settings.contributor_blacklist_jsoncolumn (migration0072, default[]→ existing rows byte-identical).src/db/repositories.ts), the.gittensory.ymlsettings:overlay (src/signals/focus-manifest.ts), OpenAPI (regenerated), and the settings PUT route (src/api/routes.ts).src/settings/contributor-blacklist.ts(pure):normalizeContributorBlacklist(login-pattern validation, public-safe metadata, case-insensitive de-dup, caps),findBlacklistEntry/isAuthorBlacklisted(case-insensitive), andmergeContributorBlacklists— the global-union primitive for unioning the shared/global list with the per-repo list at the point of use.Part of #1425 (and the #1409 anti-abuse epic).
Scope
src/) + a DB migration + the regenerated OpenAPI.gittensory.yml, OpenAPI, route)Validation
npm run test:ci— green;db:migrations:checkcontiguous (0072);ui:openapi:checkclean (regenerated)npm run test:coverage— every changed line and branch covered (verified againstcoverage/lcov.info)npm audit --audit-level=moderate— 0 vulnerabilities;typecheck/ui:typecheckclean;git diff --checkclean.gittensory.ymlsettings:overlay (yml > DB, malformed never blanks the DB list); and a DB round-trip (persists + resolves, drops invalid entries; empty default for an unconfigured repo).Safety