feat(review): make gittensor subnet integration an opt-in experimental plugin - #5030
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | c686328 | Commit Preview URL Branch Preview URL |
Jul 11 2026, 10:00 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5030 +/- ##
=======================================
Coverage 94.28% 94.28%
=======================================
Files 461 462 +1
Lines 39331 39361 +30
Branches 14351 14360 +9
=======================================
+ Hits 37083 37113 +30
Misses 1593 1593
Partials 655 655
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-11 09:57:08 UTC
🛑 Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
CI checks failing
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.
|
07fd50a to
1e982e0
Compare
…l plugin Add an experimental: manifest block (parallel to features:) so a self-host instance only fetches/tracks the gittensor subnet registry when a repo explicitly opts in via experimental.gittensor + GITTENSORY_EXPERIMENTAL_GITTENSOR. refresh-registry is skipped entirely on self-host until then, so a plain instance makes zero outbound contact with entrius/gittensor by default. Cloud is unaffected. Part of the isRegistered/isInstalled untangling epic (#5016).
… toggle Covers the cloud-mode short-circuit in index.ts's refresh-registry cron gate (never exercised — every prior test ran self-hosted) and the experimental: null / non-array-primitive parse branches in focus-manifest.ts that were logically distinct from the already-tested undefined and array cases.
Pinpointed via Codecov's line-level diff data: with a single-key EXPERIMENTAL_PLUGIN_KEYS, present:true always implies that one key is non-null through the normal parse path, so the loop's false branch was unreachable via parseFocusManifest. The function is exported and pure over the full type, so exercise it directly with a hand-crafted config.
1e982e0 to
c686328
Compare
…field (#5307) #5030 (the gittensor subnet plugin) added a real, actively-parsed experimental: top-level manifest block, but never updated this linter's TOP_LEVEL_FIELDS allowlist -- the same class of bug already fixed once in this file for repoDocGeneration (#3364). All 3 production self-host repo configs declare experimental: gittensor: true today; running the config-lint CLI against any of them produced a false "unknown top-level field" warning. Refs #5281
Closes #5035
Summary
experimental:as a new top-level.gittensory.ymlblock, structurally parallel to the existingfeatures:block but for optional ecosystem/network plugins rather than converged review capabilities.gittensor— the original gittensor-subnet mining-registry/scoring integration — is the first plugin, resolved via the establishedresolveManifestOnlyFeatureprecedence shape (env kill-switch AND per-repo opt-in, no allowlist fallback).refresh-registrycron job (which fetches the entire upstream gittensor subnet registry fromentrius/gittensor) is now skipped entirely when no repo on the instance has opted into thegittensorplugin, so a plain self-host instance makes zero outbound contact with the gittensor subnet registry by default. Cloud is completely unaffected — it always enqueues, unchanged.isRegistered=truewhenrefresh-registrydoes run (that's tracked separately, see below) — it only controls whether the job runs at all.Why this shape
Investigated why a self-hosted instance's job queue kept growing despite low PR traffic — traced it to the periodic
refresh-registry/backfill-registered-reposcron jobs unconditionally tracking the entire gittensor subnet's miner registry (18 repos on the live box, only 3 of which the operator actually installed/reviews). Attempting to scoperegistry/sync.ts's writes directly surfaced a deeper problem:repositories.isRegisteredis also load-bearing for several unrelated core features (signal snapshots, fidelity repair, the regate sweep, ops-alerts, selftune, maintainer-recap) — scoping it broke 130 tests. That untangling is now tracked as its own epic (#5016, 10 sub-issues) since it's a larger, higher-risk change. This PR ships the safe, additive part now: the plugin-toggle infrastructure and the cron gate that don't touchisRegisteredsemantics at all.Scope
CONTRIBUTING.md.Validation
git diff --checknpm run typechecknpm run test:coverage(full, unsharded) — 100% branch coverage on every changed line;gittensor-wire.tsat 100% stmts/branch/funcs/lines.npm run test:ci(full local gate — actionlint, migrations/schema-drift checks, cf-typegen:check, typecheck, test:coverage, test:workers, MCP build+pack, miner build+pack, REES tests, UI openapi/lint/typecheck/test/build, docs/command-reference drift checks)npm audit --audit-level=moderate— cleanSafety
config/examples/gittensory.full.ymland.gittensory.yml.exampleboth document the newexperimental:block;wrangler.jsoncdocuments the newGITTENSORY_EXPERIMENTAL_GITTENSORvar.Notes
registry/sync.ts's writes once the epic's core-feature migrations land.