rdmpw3265m-changelog-20260924-2348-fsevents-maildir-watcher-bus-latency
Changelog: FSEvents Maildir Watcher & Bus Latency Benchmarking (FEAT-20260905-41, TASK-20260924-11)
Timestamp: 2026-09-24 23:48:00 EDT
Host: rdmpw3265m (Intel Xeon W-3265M, macOS 26.7)
Agent:
agy@rdmpw3265m/1b772f66-eb66-4280-b839-1638b7406470
Project: Tyrell (~/dev/apps/Tyrell)
Tickets: FEAT-20260905-41, TASK-20260924-11
(RESOLVED)
1. Summary of Changes
- CoreServices FSEvents Stream
(
FSEventMaildirWatcher.swift):- Implemented
FSEventMaildirWatcherwrapping CoreServicesFSEventStreamCreateon dedicated dispatch queuecom.eastcoastscience.tyrell.maildirwatcherwith low-latency kernel notifications (kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagNoDefer). - Replaces periodic
readdirpolling of 6,800+ files in~/.agent-coordination/mailevery 5 seconds, reclaiming ~0.7 percentage points of continuous single-core CPU overhead. - Implemented rolling
BusLatencyTelemetry(samples, min, max, avg, median, p95) andBusLatencyBenchmarkharness.
- Implemented
- Service Integration
(
FleetObserver.swift):- Added
useFSEventsWatcher: Bool = truetoFleetObserverConfig. - Wired
maildirWatcherintoFleetObservationService.start(...)andstop(). - When the FSEvents watcher is active, the background loop bypasses 5-second readdir scanning and sleeps for the full observation interval (30 seconds), reacting instantly on mail landing.
- Added
- Test Suite
(
FSEventMaildirWatcherTests.swift):- Added 6 comprehensive Swift Testing unit and benchmark tests: lifecycle, file change detection, latency math, benchmark SLA validation (< 500ms target; measured ~62ms median), config parsing, and service integration.
2. Verification Evidence
- Build:
swift buildrc=0, clean compilation across all targets. - Test Results:
FSEventMaildirWatcherTests: 6/6 tests passed (100%), 0 failures.FleetObservationTests: 51/51 tests across 11 suites passed (100%), 0 failures.AgentBusProjectorTests: 4/4 tests passed (100%), 0 failures.
- Static Gate:
scripts/verify_zero_fleet_identity.zshexited 0 (0 compiled-in fleet identity violations inSources/). - Git Lineage:
- Feature branch
agy/fsevents-maildir-watcher-FEAT-20260905-41(commitd04c021). - Integration merge into canonical
main(5c98feb) withTYRELL_CANONICAL_INTEGRATION=1. - Synchronized across remotes:
fleet(git.ecs0.net:git/apps/Tyrell.git) andbackup(github.com/richhdoty/rdmsm4x-dev-apps-tyrell.git).
- Feature branch
- Ticket Store & Wiki:
- Both tickets marked RESOLVED in issueRoo; committed on
rdmsm4x:~/dev/issues(6789258). - Exported 1,227 wiki HTML pages; committed and pushed to
dev.ecs0.net(a33cc10). - Fleet announcement broadcast via
agent_msg.zsh:20260924-234817-DE8598DE.
- Both tickets marked RESOLVED in issueRoo; committed on