rdmbair15m5-changelog-20260916-1604-replicantdb-fsevents-governor-pause-accumulation
rdmbair15m5 - changelog - replicantdb-fsevents-governor-pause-accumulation - claude - unspecified - general - 20260916-1604
Routed all four ReplicantDB pause paths (memory, thermal, battery/power, and index pressure/directives) through HeldEventAccumulator to prevent silent FSEvents batch dropping, and verified with 1,350 test passes (ISSUE-20260906-01).
Scope
- Host:
rdmsm4x(canonical dev root),rdmbair15m5 - Repo:
apps/replicantDB,issues - Ticket:
ISSUE-20260906-01
Exact Files Touched
apps/replicantDB/Sources/ReplicantDBDaemon/DaemonService.swift:- Unified batch admission logic in
admitOrAccumulate(directories: [URL]) async -> PressureDecision?to check memory pressure/footprint, thermal critical state, and battery status (!isOnACPower && !config.indexOnBattery) before index pressure / quiesce directives. - Ensured every pause path calls
heldEvents.accumulate(directories)rather than dropping the batch. - Added
isAnyGovernorPaused() async -> Boolhelper. - Added governor pause check inside
drainHeldEvents()loop to immediately halt draining if any governor enters a pause state during multi-batch draining.
- Unified batch admission logic in
apps/replicantDB/Sources/ReplicantDBDaemon/ThermalGovernor.swift:- Added
setOverrideThermalState(_ state: ProcessInfo.ThermalState?)test override hook with hysteresis clearance.
- Added
apps/replicantDB/Sources/ReplicantDBDaemon/MemoryGovernor.swift:- Added
setOverridePressure(_ pressure: Pressure?)test override hook for kernel memory pressure simulation.
- Added
apps/replicantDB/Sources/ReplicantDBDaemon/PowerGovernor.swift:- Added
setOverridePowerState(_ snapshot: PowerSourceSnapshot?)test override hook for AC/battery status simulation.
- Added
apps/replicantDB/Tests/ReplicantDBTests/CooperativeQuiesceDaemonTests.swift:- Added
testThermalPauseAccumulatesAndDrainsOnResume: verifies critical thermal state pauses admission, accumulates batch, and drains on cooldown to nominal. - Added
testMemoryPauseAccumulatesAndDrainsOnResume: verifies critical memory pressure pauses admission, accumulates batch, and drains on recovery to normal. - Added
testBatteryPauseAccumulatesAndDrainsOnResume: verifies battery operation (indexOnBattery=false) pauses admission, accumulates batch, and drains on AC power resumption. - Added
testADrainStopsWhenThermalGovernorEntersCriticalStatePartwayThrough: verifies mid-drain pause stops processing after the first bounded batch and leaves remaining events safely queued in accumulator.
- Added
Verification Evidence
swift test --package-path ~/dev/apps/replicantDB --filter CooperativeQuiesceDaemonTests:- 11 of 11 tests passed in 1.18s with 0 failures.
swift test --package-path ~/dev/apps/replicantDB:- Executed 1,350 tests, with 0 failures in 235.839s.
- Git commits:
apps/replicantDB: Commit73ba62fpushed tofleet(git.ecs0.net:git/apps/replicantDB.git) andbackup(github.com:richhdoty/rdmsm4x-dev-apps-replicantdb.git).issues: Commit2fc2f7cpushed tofleet(git.ecs0.net:git/dev/issues.git) andbackup(github.com:richhdoty/rdmsm4x-dev-issues.git).
- Ticket:
ISSUE-20260906-01resolved and reindexed into SQLite (1,041 tickets indexed).
How to Undo
git -C ~/dev/apps/replicantDB revert 73ba62fand push to remotes.- Re-open ticket:
python3 ~/dev/issues/bin/ticket open ....