Skip to content

Wire ops/stats/alerts/self-improve (modules ported) + cron tick + tunables D1 #1022

Description

@JSONbored

Part of #983.

Context

The ops/stats/alerts and self-improve capability MODULES are ALREADY natively ported on local convergence branches (src/review/{ops,stats,alerts,auto-tune,auto-apply}) — this issue WIRES them in and adds the cron tick + the D1 tables they need, NOT re-ports them. ops = bearer-gated internal endpoints (calibration/decision/status/apply-recommendation/clear-override/override-audit/parity). stats = the cross-project read-only /stats/data feed. alerts = throttled Discord anomaly alerts (manual-rate spike, stuck/failed, disputed-close). The self-improve loop is eval (scores gate prediction vs real merged/closed) → auto-tune (accuracy circuit-breaker, one-directional, drops auto-merge below a precision floor) → auto-apply (cron applies tightening to a shadow soak) over a tunables D1 runtime override store (shadow soak + promotion). gittensory has none of this; it needs the cron tick wired and the tunables/shadow-override tables added.

Deliverables

  • Wire the ported src/review/ops bearer-gated endpoints (calibration/overrides/decision/override-audit/parity) into gittensory's HTTP routing.
  • Wire the ported src/review/stats /stats/data feed (gittensory's apps/ dashboard consumes it; reviewbot's dashboard/stats.html is DROPPED as inferior).
  • Wire the ported src/review/alerts throttled anomaly alerts onto gittensory's Discord/notify seam.
  • Wire the ported src/review/{auto-tune,auto-apply} self-improvement loop + the eval gate-accuracy scorer into gittensory's cron tick via runScheduled(env, agents) (global prune once + per-agent work).
  • Add the tunables/shadow-override D1 tables (reconcile with reviewbot migrations 0014-0016) for the runtime override store + shadow soak + promotion.
  • Add tests: the accuracy circuit-breaker is one-directional (only tightens); ops endpoints are bearer-gated; the cron tick prunes once + runs per-agent.

Acceptance criteria

  • ops/stats/alerts run in gittensory; the cron tick runs the self-improve loop and global prune.
  • auto-tune only tightens (never loosens) auto-merge below a precision floor; auto-apply lands changes into a shadow soak before promotion.
  • The tunables + shadow-override + override-audit tables exist and back the runtime override store.

Notes

  • Milestone: M1
  • Depends on: Infra bindings + adapters (LOCK DO, Vectorize, R2, Browser, private-config home, queue) #1017
  • The modules are ALREADY ported (convergence/port-batch + convergence/integrate branches); scope here is wiring + the cron tick + the tunables/shadow-override D1 tables.
  • High-rebase-collision risk: codex churns processors.ts, comments.ts, and signals/engine.ts across other gittensory worktrees. Keep convergence edits minimal + flag-gated and rebase onto main before in-flight codex PRs touching those files settle.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions