Reference resolution is one non-resumable transaction, so one-shot queries after an upgrade can never converge #301
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.
Blocks
Reference
h-dv/code-index#301
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?
After a schema upgrade that invalidates code caches (m0070, m0071), a
code-index querywith no daemon running never finishes reconciling. Each call answerswarming_up, and then the server is killed.What lane H measured (I075, on a django copy upgraded from schema 69, killing
code-index indexevery 15 s):What v0.32.1 ships: disclosure only. A one-shot
warming_upcarriesreconcile_pending { converges_on_retry: false, … }and names the remedy: runcode-index indexonce, or start the daemon. This is honest, but hooks such as the blast-radius hook still get no answer until a user acts.Proposed fix: make resolution resumable. Commit per batch or per file group, with a generation-safe cursor, so each short-lived process makes durable progress. This must keep the generation-gating invariants (
generation_build,generation_isolation) and the reader-epoch guarantees. A partially resolved generation must never be visible as complete.🤖 Generated with Claude Code
Still current as of
0bcdac1(checked by Phase 1 lane R on 2026-09-26): resolution is one transaction inapply_resolution_observed, so a one-shotcode-index queryanswerswarming_upwithconverges_on_retry: false.Two options:
code-index indexto finish it, and says so in its reply. Retries then converge without a daemon.This is a prerequisite before any language flips to a package in Phase 3.
The nightly
cargo teston master (run 5643, master at0bcdac1) failed inquery_cli::the_cli_log_level_reaches_the_spawned_server. It hit this issue directly: the one-shotcode-index queryansweredwarming_up("the index is still reconciling and retrying this query will not finish it"), so the test never reached the premise it asserts. The same test passed in every PR run of this code and in a local full run, so it is timing-dependent: it fails when the runner is loaded, and the nightly runs heavier jobs alongside it.Until this issue is fixed, any test that runs a one-shot query right after indexing can flake like this. Fixing this issue removes the flake class; a separate test-side workaround would only hide it.