refactor(kiloclaw): move volume usage from DO state to Analytics Engine#2301
Merged
evanjacobson merged 8 commits intomainfrom Apr 13, 2026
Merged
refactor(kiloclaw): move volume usage from DO state to Analytics Engine#2301evanjacobson merged 8 commits intomainfrom
evanjacobson merged 8 commits intomainfrom
Conversation
Cut over disk usage from DO storage to controller telemetry AE dataset: - Append double7/double8 to KILOCLAW_CONTROLLER_AE writeDataPoint for diskUsedBytes/diskTotalBytes - Add dedicated admin route and React Query hook for controller telemetry disk usage - Switch admin instance detail Volume Usage to AE-only reads (sentinel -1 = missing) - Remove recordDiskStats() from checkin route and DO state fields Direct AE-only cutover with no fallback, matching the admin-only scope.
5444a6f to
2165066
Compare
Contributor
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)None. Files Reviewed (10 files)
Fix these issues in Kilo Cloud Reviewed by gpt-5.4-20260305 · 713,528 tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves volume usage to Analytics Engine, which already receives controller telemetry. The admin UI now reads disk usage directly from AE via a dedicated query, and the DO storage fields are removed entirely.
Details
diskUsedBytes/diskTotalBytesare appended to the existingKILOCLAW_CONTROLLER_AEwriteDataPoint asdouble7/double8.A new admin route and React Query hook (
kiloclaw-controller-telemetry) query the AE dataset, following the same pattern as the existingkiloclaw-analyticsroute/hooks.recordDiskStats(), its DO method, and thediskUsedBytes/diskTotalBytesfields are removed from the persisted state schema, mutable state, types, and worker status response.AE write failures in the checkin route are caught so they never affect the 204 response — matching the best-effort semantics the old
recordDiskStatscall had.Verification
pnpm typecheckpnpm test -- services/kiloclaw/src/routes/controller.test.tsVisual Changes
N/A — the admin instance detail page shows the same Volume Usage field; only the data source changed.
Reviewer Notes