feat(calibration): phase-2 hardening from the production applies — plan-file replay, class policy, rate + statement limits - #8248
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-23 14:42:08 UTC
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
…OOBIG hit live wrangler --command cannot bind parameters, so the UPDATE inlines the diff as literal SQL and quote-doubling can double it past D1's per-statement length (failed live at row 37 of the first cloud apply). The literal path now caps at 45KB with a self-describing truncation marker inside the diff text; the pg driver binds parameters and keeps full diffs — production is unaffected. Advances #8170
2d2dcb1 to
c75fc49
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8248 +/- ##
=======================================
Coverage 92.12% 92.12%
=======================================
Files 783 783
Lines 78551 78551
Branches 23723 23724 +1
=======================================
Hits 72367 72367
Misses 5062 5062
Partials 1122 1122
Flags with carried forward coverage won't be shown. Click here to find out more. |
What
One production-earned fix (the rest of the phase-2 hardening turned out to already be on main — this PR is now the minimal remaining delta): the first cloud raw-context apply failed at row 37 with
SQLITE_TOOBIG.Why
wrangler d1 execute --commandcannot bind parameters, so the wrapper inlines each UPDATE as literal SQL — and quote-doubling can double a 120KB diff past D1's per-statement length limit.How
The literal (D1 CLI) path caps the diff at 45KB with a self-describing truncation marker appended inside the diff text itself, so any consumer of the fixture sees the truncation inline. The pg driver binds parameters and keeps full diffs — the production Postgres corpus is unaffected (460/460 full diffs verified there; the cloud resume completed 460/460 with this fix, results on #8170).
Advances #8170