Fix busy-daemon recovery and remove expensive Windows build-output caches #411
No reviewers
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!411
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/post-upgrade-recovery"
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?
During promotion after a core/package upgrade, aggregate stats requests took 17–50 seconds. Reconnecting ran another stats query, then spawned a redundant daemon while the owner continued working. Windows qualification also spent tens of minutes archiving multi-gigabyte build outputs after validation had finished.
Reconnect now uses authenticated health identity, falling back to stats only for an explicit unknown-method response. Response IDs, root mismatches, malformed replies and authentication failures are checked. Failed-reconnect recovery defers a replacement only with a held kernel lock, a live owner, no announced clean exit, and takeover's existing startup predicate or completed health probe. Silent old owners past grace and stale registrations still reach normal recovery; unknown start age retains the existing conservative policy. The original reconnect failure remains in diagnostics.
Coverage reasons emit package_id_already_active once when two sources overlap, preserving the other reasons and order. The daemon-death regression now counts actual replacement executions rather than a log message.
Windows CI and release builds cache only Cargo registry/index, registry/cache and git/db, under a new shared source-only prefix. The shared setup resolves the effective CARGO_HOME (with the normal user-profile fallback) and exports the cache path using UTF-8 without a BOM for PowerShell 5.1. Legacy target-cache fallback and the restored-build-script repair step are removed. Every non-cache step and all job-level gates are unchanged, verified by parsed YAML comparison. Cold compiled outputs build normally. This mitigates #408's archive overhead; the cache backend's reported commit failure remains a separate issue.
Local validation passed: 275 daemon unit tests, 331 MCP unit tests, 13 targeted integration tests, all 9 daemon-death tests, all 37 serialized timing tests, all 48 CI-routing tests, all 11 CI-cadence tests, and the release build-group check. Clippy and formatting passed. Required CI applies to the final head. No package bytes, schema or plugin ABI changes. Conservative upgrade rebuilding remains tracked in #410 and #412.
Avoid expensive reconnect handshakes and redundant busy-daemon respawnsto Use health for reconnect and preserve safe daemon recoveryUse health for reconnect and preserve safe daemon recoveryto Fix busy-daemon recovery and remove expensive Windows build-output caches