Skip to content

refactor(cli): deepen live scan lifecycles#125

Merged
xingkaixin merged 1 commit into
mainfrom
feat/cs-44-live-scan-lifecycle-modules
Jul 11, 2026
Merged

refactor(cli): deepen live scan lifecycles#125
xingkaixin merged 1 commit into
mainfrom
feat/cs-44-live-scan-lifecycle-modules

Conversation

@xingkaixin

Copy link
Copy Markdown
Owner

Summary

  • move adaptive refresh scheduling, pending reruns, and per-agent operation serialization into RefreshCoordinator
  • move backfill queue deduplication and sequencing into BackfillCoordinator
  • move scan lifecycle transitions and detached snapshots into ScanStatusModel
  • move search-index worker ownership, coalesced batches, settlement, and shutdown into SearchIndexJobRunner
  • preserve the LiveScanStore external interface while reducing its implementation from 1,382 to 928 lines

Why

LiveScanStore owned four independent state machines through shared mutable fields. Lifecycle changes required coordinated edits across a 1,382-line implementation, and characterization tests reached through private fields to exercise behavior.

The extracted modules are concrete internal modules, not speculative ports. They own their state and return transitions or snapshots to the store, which remains responsible for orchestration and external publication.

Validation

  • pnpm lint
  • pnpm format:check
  • pnpm build
  • pnpm test (662 passed)
  • pnpm test:coverage (72.89% statements, 75.50% lines)
  • pnpm test:e2e (6 passed)
  • pnpm bench:perf (149 sessions; dashboard 1,836 ms; detail 847 ms)

Closes CS-44

@xingkaixin xingkaixin marked this pull request as ready for review July 11, 2026 12:10
@xingkaixin xingkaixin merged commit c922ef8 into main Jul 11, 2026
7 checks passed
@xingkaixin xingkaixin deleted the feat/cs-44-live-scan-lifecycle-modules branch July 11, 2026 12:12
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