code-index doctor is blind to staleness, watcher health and resolve state, and check_disk_free only fires at literally zero bytes #150
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#150
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by a production-readiness review.
doctorhas twelve checks. None covers:WatchCountersis instrumented and read by no production consumer.So every failure mode in the production review above — the decaying watch set (#145), the permanently bricked diff tools (#147), the miscounted parse errors (#148), a daemon stuck mid-migration (#144) — is invisible to the one command whose entire job is to tell an operator what is wrong.
The disk check is vacuous
crates/cli/src/doctor.rs:836writes 16 bytes and reports"writable". It fires only at literally zero bytes free. A 99%-full disk is green — and a nearly-full disk here presents as linker errors and hangs, not as "disk full", so the green is actively misleading during exactly the incident it should catch.Ask
doctorshould surface what the index already knows. The instrumentation mostly exists (WatchCounters, freshness, resolve counts); it is the reporting that was never wired. A threshold on free space (percentage or absolute headroom, not zero) is a one-line change.This is a good candidate for the generic treatment: rather than twelve hand-written checks plus four more, derive the check set from the disclosure surfaces that already exist, so a new disclosure gets a
doctorline for free.🤖 Generated with Claude Code
https://claude.ai/code/session_01K1zj5VcFJvJt3pQxe9259K