resolve_progress reports a pass as open indefinitely after it has finished, so a client polling active waits forever #138
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#138
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 while stabilising #51's runtime-plugin tier. Deterministic, 5/5 runs, at both 100 ms and 500 ms poll intervals — so not poll starvation.
The measurement
On the daemon leg, after the post-activation phase,
project_overview.resolve_progressreports:…while every query answers correctly. The pass is finished. The payload says it is running, for at least a minute.
Why this is worse than a stale field
For that whole minute the reply also carries its own reassurance:
So a client that notices the counters are not moving is explicitly told to keep waiting. A client polling
resolve_progress.activeto learn when the index is ready waits forever, and the disclosure designed to prevent a wrong conclusion is what sustains it.That is the shape #65 set out to fix from the other direction: it added progress precisely so an agent could distinguish slow from wedged. This inverts it — the signal now reports wedged-looking-but-fine as running, indefinitely.
Mechanism
pass_startedlives inindex::resolve_ref_targets;pass_finishedinindex::apply_resolution_observed. The finish is not reached on this path, so the open marker is never cleared andlast_outcomenever lands.last_completed_stepbeing the pass's final step is the tell: everything ran, and only the closing bookkeeping is missing.Not fixed, and why
It sits in the daemon/indexer resolve path, which was being edited by other lanes at the time. #51's benchmark worked around it — its settle clause treats a two-second-stale pass as settled, and both reachable states are inside the recorded band — but that is a harness accommodation, not a fix, and it is recorded as such.
What closing it needs
pass_finishedon this path, or make the open marker self-expiring againstsince_last_step_mswith the reason recorded.last_outcomemust land — its absence besideactive: trueis currently the only way to tell this state from a genuine in-flight pass, and it is absent in both.active: false= a measurement that no pass is open,active: true= a pass really is running.activegoes false — red on a real completed resolve, not a hand-built struct. A test that only ever observes a running pass cannot tell this defect from correct behaviour.Related
#65 (which added the progress signal, for the opposite failure), #51 (found here; its settle clause is the workaround).