Skip to content

fix(selfhost): sweep reviews regardless of autonomy mode + registry soft-fail + idempotent migrations - #1562

Merged
JSONbored merged 1 commit into
mainfrom
chore/selfhost-sweep-registry-fixes
Jun 27, 2026
Merged

fix(selfhost): sweep reviews regardless of autonomy mode + registry soft-fail + idempotent migrations#1562
JSONbored merged 1 commit into
mainfrom
chore/selfhost-sweep-registry-fixes

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Three self-host reliability fixes:

  • Sweep regardless of mode (#sweep-all-modes): the re-gate sweep enumerates the GITTENSORY_REVIEW_REPOS allowlist ∪ registered repos and sweeps any review-active (allowlisted) repo — not only acting-autonomy ones — so advisory/observe repos get fresh reviews on existing open PRs without a per-PR webhook. AI review runs for advisory + block (skipped only when off); the perf(review): cache the AI review by (repo, pr, head SHA) to skip redundant LLM calls #1462 cache bounds cost; the action layer stays autonomy-gated (observe never auto-merges/closes).
  • Registry soft-fail (#registry-soft-fail): the self-host consume wrapper swallows a failed periodic refresh-registry job (a degraded GITTENSOR_REGISTRY_URL otherwise retried→dead-lettered every cron tick → the Discord dead-letter spam). Worker path untouched.
  • Idempotent migrations (#migrate-drift): the runner tolerates a duplicate-column/already-exists migration instead of crash-looping the boot (the renumber-collision I hit on rebuild).

Full suite 4737 + 100% patch coverage on measured files.

…oft-fail + idempotent migrations

Three self-host reliability fixes:
- SWEEP REGARDLESS OF MODE (#sweep-all-modes): the re-gate sweep now enumerates the GITTENSORY_REVIEW_REPOS
  allowlist UNION the registered repos and sweeps any review-active (allowlisted) repo, not only repos with
  acting autonomy — so ADVISORY/observe repos are re-reviewed and get fresh reviews on existing open PRs
  without a per-PR webhook. The AI review runs for advisory + block (only skipped when AI is off); the #1462
  cache bounds the token cost. The action layer stays autonomy-gated, so observe repos never auto-merge/close.
- REGISTRY SOFT-FAIL (#registry-soft-fail): the self-host consume wrapper swallows a failed periodic
  refresh-registry job (a degraded/unconfigured GITTENSOR_REGISTRY_URL otherwise retried→dead-lettered every
  cron tick, flooding the dead-letter alert). The next scheduled tick is the retry; the Worker path is untouched.
- IDEMPOTENT MIGRATIONS (#migrate-drift): the runner tolerates a duplicate-column/already-exists migration
  (a renumbered file whose schema change a prior deploy already applied) instead of crash-looping the boot.
@dosubot dosubot Bot added the size:M label Jun 27, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.43%. Comparing base (14dc3f1) to head (68dba4c).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1562   +/-   ##
=======================================
  Coverage   95.42%   95.43%           
=======================================
  Files         202      202           
  Lines       21674    21685   +11     
  Branches     7833     7836    +3     
=======================================
+ Hits        20683    20694   +11     
  Misses        416      416           
  Partials      575      575           
Files with missing lines Coverage Δ
src/queue/processors.ts 87.68% <100.00%> (+0.06%) ⬆️
src/selfhost/migrate.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 84024f9 into main Jun 27, 2026
19 checks passed
@JSONbored
JSONbored deleted the chore/selfhost-sweep-registry-fixes branch June 27, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant