Skip to content

fix: bootstrap active Inspector derived access - #656

Merged
kevinswiber merged 7 commits into
mainfrom
fix/plan-0158-inspector-bootstrap
Jul 30, 2026
Merged

fix: bootstrap active Inspector derived access#656
kevinswiber merged 7 commits into
mainfrom
fix/plan-0158-inspector-bootstrap

Conversation

@kevinswiber

Copy link
Copy Markdown
Member

Summary

  • start and supervise derived-access rebuilds when an active Inspector has no usable current generation
  • preserve immutable-generation reader safety while self-healing after truth advances, publication handoffs, and disposable-state corruption
  • throttle recovery retries, revalidate destructive quarantine decisions, and collect stale generation lease files
  • document the recovery state machine and lock-ordering invariants alongside deterministic and real-process regression coverage

Validation

  • just check — 3,149 passed, 5 skipped
  • focused lifecycle and publication tests — 4 passed on macOS and native Windows
  • governed append concurrency regression — 30/30 repeated runs passed
  • real Inspector process stress — 100/100 macOS and 50/50 native Windows at the final recovery commit
  • just lint, just fmt, and git diff --check

Independent review accepted the final revision with zero open requests.

Start the existing derived lifecycle rebuild in the background when an explicitly active Inspector opens without a current generation. Keep authoritative truth read-only, preserve typed availability during publication, and cover the first-start path through the real Inspector process.
Allow the asynchronous first-start proof to keep polling while the full parallel suite saturates the host. The guard remains finite and still fails with the last typed availability state.
Allow the real Inspector first-start proof to observe the documented rebuild-required interval between generation promotion and publication. It still requires the background worker to converge to a 200 current response.
Keep a single background rebuild worker alive through cross-process lease contention and truth changes. Trigger recovery from typed route reads so a running Inspector converges after out-of-band writes and sidecar failures without requiring a restart.
Revalidate quarantine decisions under the canonical writer lock, stabilize generation publication reads, and keep ordinary catch-up out of the full-rebuild path. Convert transient read failures into typed availability and document the background recovery state machine.
Retry one read when lifecycle publication becomes current after the initial open selection, and prevent unavailable responses from serializing the current state without a usable payload.
Sweep lease files only after their immutable generation is absent and no reader holds the lock. Throttle repeated writer-idle confirmation and document the recovery and quarantine invariants so future lifecycle changes preserve them.
@kevinswiber
kevinswiber merged commit 97f2a54 into main Jul 30, 2026
20 checks passed
@kevinswiber
kevinswiber deleted the fix/plan-0158-inspector-bootstrap branch July 30, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant