From c17e5c9b9bd98c5e4a0d6009e69357281aa851f2 Mon Sep 17 00:00:00 2001 From: luciferlive112116 <291889058+luciferlive112116@users.noreply.github.com> Date: Thu, 16 Jul 2026 07:20:58 +0800 Subject: [PATCH] docs(review): stop claiming the self-improve D1 tables don't exist ops-wire.ts's header says the auto-tune/auto-apply loop stays deferred because it needs the tunables_overrides / _shadow / override_audit D1 tables, "none of which exist in loopover's migrations yet". They do: #4879's migration 0047_self_improve_tunables.sql creates all three, and src/review/auto-apply.ts already implements the pure logic plus the D1 store against them. The comment even contradicted itself, noting that store already exists while claiming its tables did not. The deferred conclusion is still correct, so only the stale premise is removed: closing the loop remains blocked on the careful soak/promote design -- the shadow-soak-then-promote lifecycle auto-apply.ts's own isStrictlyTightening / evaluateShadowPromotion already anticipate. A reader is no longer misled into thinking the D1 schema is what is missing, when the real remaining work is that design. Comment-only: no executable line changes. Closes #6195 --- src/review/ops-wire.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/review/ops-wire.ts b/src/review/ops-wire.ts index f936b0a5c..05cffcef6 100644 --- a/src/review/ops-wire.ts +++ b/src/review/ops-wire.ts @@ -25,10 +25,12 @@ // ci_stuck_review_repeat_suppressed). // // DEFERRED (NOT implemented here): the auto-tune / auto-apply config-mutation self-improve loop. The ported -// pure logic + D1 store already exist in src/review/auto-apply.ts, but actually CLOSING the loop (mutating a -// live gate's tunables from the cron) is sensitive — it needs the `tunables_overrides` / `_shadow` / -// `override_audit` D1 tables (none of which exist in loopover's migrations yet) plus a careful soak/promote -// design. This module is READ-ONLY observability: it reports drift; it never changes what blocks a live PR. +// pure logic + D1 store already exist in src/review/auto-apply.ts, and so do the `tunables_overrides` / +// `_shadow` / `override_audit` tables it reads and writes (#4879's migration 0047_self_improve_tunables.sql). +// The schema is NOT the remaining blocker: actually CLOSING the loop (mutating a live gate's tunables from the +// cron) is sensitive and still needs the careful soak/promote design — the shadow-soak-then-promote lifecycle +// auto-apply.ts's own isStrictlyTightening / evaluateShadowPromotion anticipate. This module is READ-ONLY +// observability: it reports drift; it never changes what blocks a live PR. import { findHottestInconclusiveReviewTargetForRepo, findHottestReviewTargetForRepo, listRepositories, sumByokAiUsageForRepoSince } from "../db/repositories"; import { incr } from "../selfhost/metrics";