Skip to content

feat(miner): add ai fatigue signal - #3307

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
joaovictor91123:feat/ai-fatigue-signal-v3
Jul 5, 2026
Merged

feat(miner): add ai fatigue signal#3307
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
joaovictor91123:feat/ai-fatigue-signal-v3

Conversation

@joaovictor91123

@joaovictor91123 joaovictor91123 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an AI-fatigue policy signal for miner repo ranking that downgrades repositories showing organic AI-contribution fatigue without treating them as formal AI bans.
  • Surface metadata-only fatigue evidence, deterministic cache summaries, markdown observability, and rank-input adjustments.
  • Limit doc-language fatigue evidence to exact AI-USAGE.md and CONTRIBUTING.md policy-doc changes, and require fresh cache entries to match the target repo before reuse.

Fixes #3009

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires >=99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

Additional validation run:

  • npm run build --workspace @jsonbored/gittensory-engine
  • npx tsx packages/gittensory-engine/test/ai-policy-map.test.ts
  • npm run build:miner
  • npm run db:migrations:check

If any required check was skipped, explain why:

  • npm run test:coverage timed out locally after 5 minutes while running the existing root Vitest suite; the new engine-focused test file passed directly with 27 tests.
  • npm run test:ci currently stops before coverage on a local Wrangler typegen whitespace mismatch; the generated output that satisfies cf-typegen:check contains trailing whitespace on this Windows/Node 24 environment, so it was not committed.
  • npm run test:mcp-pack fails locally before package checks because scripts/check-mcp-package.mjs calls spawnSync("npm", ...), which returns no stdout/stderr on this Windows/Node 24 shell path.
  • UI checks were not run because this change only touches the engine package and its package README.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

No visible UI changes.

Notes

  • Diff size: 4 files changed, 1,167 insertions.

@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 01:30:15 UTC

4 files · 1 AI reviewer · no blockers · readiness 80/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 5 non-blocking
  • nit: packages/gittensory-engine/src/ai-policy-map.ts:284 treats future-dated cache entries as age 0 via hoursBetween(), so consider rejecting cache.computedAt values after now or surfacing a negative-age state for observability.
  • nit: packages/gittensory-engine/src/ai-policy-map.ts:369 accepts unbounded docChanges and emits one evidence row per matching change; consider capping or aggregating repeated policy-doc language evidence so a noisy history cannot dominate the score shape unexpectedly.
  • nit: packages/gittensory-engine/test/ai-policy-map.test.ts:477 omits repoFullName in the byte-stability fixture even though AiPolicyFatigueInput requires it; add the field so the test mirrors the public API contract.
  • packages/gittensory-engine/src/ai-policy-map.ts:284: Change it to reject future cache timestamps, or document why future cache freshness should fail open as fresh.
  • packages/gittensory-engine/src/ai-policy-map.ts:369: Aggregate repeated recent_ai_doc_language evidence by source file or cap the number of doc-change rows contributing to score.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #3009
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 104 registered-repo PR(s), 58 merged, 8 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 104 PR(s), 8 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 104 PR(s), 8 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

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

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 55dff40 into JSONbored:main Jul 5, 2026
7 checks passed
JSONbored pushed a commit that referenced this pull request Jul 5, 2026
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(miner): detect organic AI-fatigue signals and downgrade repo priority ahead of a formal ban

1 participant