Skip to content

feat(gate): policy-pack-pluggable gate — gittensor + oss-anti-slop packs (#692) - #710

Merged
JSONbored merged 1 commit into
mainfrom
feat/policy-pack-gate
Jun 14, 2026
Merged

feat(gate): policy-pack-pluggable gate — gittensor + oss-anti-slop packs (#692)#710
JSONbored merged 1 commit into
mainfrom
feat/policy-pack-gate

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

What

Decouples the Gittensory Gate from Gittensor so it runs on any repo (#692, Pillar 6 foundation). Additive — the pack defaults to gittensor, so every existing repo's behavior is unchanged.

  • GatePolicyPack (gittensor | oss-anti-slop) + RepositorySettings.gatePack (DB column via migration 0032, default gittensor; getRepositorySettings/upsert + parseGatePack handle it).
  • Config-as-code: .gittensory.yml gate.pack parses into the focus manifest and overlays via resolveEffectiveSettings (yml > DB > default) — the same seam as the other gate fields.
  • gateCheckPolicy: the oss-anti-slop pack drops the confirmed-contributor gate entirely (no emissions/registry/Gittensor coupling), so the deterministic rules (slop/duplicate/linked-issue/readiness/AI-consensus) block any author. The gittensor pack keeps the contributor gate (only confirmed contributors are hard-blocked). evaluateGateCheck is already pack-agnostic — the pack only governs whether confirmedContributor is threaded into the policy.
  • OpenAPI RepositorySettings + settings-preview surface gatePack.

Acceptance (#692)

the gate runs end-to-end on a non-registered repo under oss-anti-slop with zero gittensor coupling; the gittensor pack is unchanged.

✅ Covered by tests: under oss-anti-slop, a non-confirmed author with a block-mode finding → failure (blocks); under gittensor, the same author → neutral (unchanged). A .gittensory.yml gate.pack: oss-anti-slop flips this end-to-end.

Why

Unlocks #693 (agent-native self-check as a general product) + #694 (funnel non-gittensor adopters → gittensor miners). Built on the existing slop/gate engine + the .gittensory.yml config-as-code seam (#526/#647) — no new rule logic, just the pack abstraction.

Tests

  • Pack behavior: gittensor blocks only confirmed; oss-anti-slop blocks any author; a clean PR still passes either way.
  • gateCheckPolicy threads confirmedContributor only under gittensor (dropped under oss-anti-slop, incl. default-gittensor when unset).
  • .gittensory.yml gate.pack overlay end-to-end.
  • focus-manifest gate.pack parse + invalid-pack warning; DB round-trip + default gittensor.
  • 97% coverage gate green; workers tests + git diff --check + ui:openapi:check pass.

Advances Pillar 6 (#704). Closes #692.

…cks (#692)

Decouples the gate from Gittensor so it runs on ANY repo. Additive: the pack
defaults to `gittensor`, so every existing repo's behavior is unchanged.

- New `GatePolicyPack` ("gittensor" | "oss-anti-slop") + `RepositorySettings.gatePack`
  (DB column via migration 0032, default "gittensor"; getRepositorySettings/upsert
  + parseGatePack handle it).
- Config-as-code: `.gittensory.yml` `gate.pack` parses into the focus manifest and
  overlays via resolveEffectiveSettings (yml > DB > default), same seam as the other
  gate fields.
- `gateCheckPolicy`: the `oss-anti-slop` pack drops the confirmed-contributor gate
  entirely (no emissions/registry/Gittensor coupling) so the deterministic rules
  (slop/duplicate/linked-issue/readiness/AI-consensus) block ANY author; `gittensor`
  keeps the contributor gate (only confirmed contributors are hard-blocked).
  evaluateGateCheck is already pack-agnostic — the pack only governs whether
  confirmedContributor is threaded.
- OpenAPI RepositorySettings + settings-preview surface gatePack.

The gate now runs end-to-end on a non-registered repo under `oss-anti-slop` with
zero Gittensor coupling; the `gittensor` pack is unchanged.

Tests: pack behavior (gittensor blocks only confirmed; oss-anti-slop blocks any
author; clean PR still passes), gateCheckPolicy contributor-threading per pack,
.gittensory.yml gate.pack overlay end-to-end, focus-manifest gate.pack parse +
invalid-pack warning, DB round-trip + default. 97% coverage gate green.
@ghost

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

Copy link
Copy Markdown
Contributor

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

@ghost

ghost commented Jun 14, 2026

Copy link
Copy Markdown

gittensory · advisory review

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

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

Reviewer A · gpt-oss-120b — recommends ✅ merge
This PR introduces a pluggable policy pack (gatePack) for the repository gate, adding the new field throughout the type definitions, DB schema, migrations, OpenAPI specs, parsing logic, and tests. The implementation is consistent and respects existing defaults, with comprehensive test coverage.

Suggestions

  • Add a unit test for parseGatePack handling an unexpected value (e.g., 'unknown') to verify it falls back to 'gittensor'.
  • Consider updating any UI components that display repository settings to include the new gatePack field for completeness.

Worth double-checking

  • Existing callers that construct RepositorySettings objects must now include gatePack; missing it will default correctly but ensure no assumptions break.
  • Migration adds a NOT NULL column with a default; ensure production environments apply the migration without downtime.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The PR adds a policy-pack-pluggable gate feature (#692) introducing two packs: 'gittensor' (existing confirmed-contributor-gated behavior) and 'oss-anti-slop' (deterministic rules blocking any author for opted-in rules). Changes span DB schema, types, API, logic, and tests. Default preserves existing behavior ('gittensor'). Implementation is consistent, well-tested, and maintains the public/private boundary (no forbidden terms exposed).

No blocking issues spotted.

Before = production · After = this PR's preview deploy.

Route Viewport Before After
/ desktop before desktop after desktop
mobile before mobile after mobile

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 3948580 Commit Preview URL

Branch Preview URL
Jun 14 2026, 11:43 AM

@JSONbored
JSONbored merged commit 8505348 into main Jun 14, 2026
12 checks passed
@JSONbored
JSONbored deleted the feat/policy-pack-gate branch June 14, 2026 11:45
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 14, 2026
@github-actions github-actions Bot mentioned this pull request Jun 14, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

policy-pack-pluggable gate (gittensor + oss-anti-slop packs)

1 participant