rdmpw3275m-changelog-20260923-1025-tyrell-feat-20260903-06-cqrs-event-sourcing
rdmpw3275m-changelog-20260923-1025-tyrell-feat-20260903-06-cqrs-event-sourcing
One-line summary: Implemented CQRS event-sourced
persistence engine with atomic command decider transactions, append-only
event log, command idempotency receipts, turn pagination windowing, and
thread settlement reactor with subagent safeguards for Tyrell
(FEAT-20260903-06), verified 100% pass across Intel macOS
26.7.1 and Apple Silicon macOS 27.0.
Scope
- Hosts affected:
rdmpw3275m(Intel Xeon W-3275M scratch host),rdmsm4x(M4 Max canonical dev hub). - Projects affected:
apps/Tyrell(TyrellCore). - Tickets affected:
FEAT-20260903-06(RESOLVED).
Exact Files Touched
Package.swift:- Added
"Orchestration"toTyrellRemoteSupporttarget exclusion list to prevent namespace conflicts with remote transport bindings.
- Added
Sources/TyrellCore/TyrellSQLite.swift:- Added
fetchAllandfetchOneconvenience methods onDatabaseinstance delegating toRow.fetchAll/Row.fetchOne.
- Added
Sources/TyrellCore/Orchestration/OrchestrationEvents.swift(new):- Defined
OrchestrationEventType,OrchestrationEvent,CommandReceipt,CommandReceiptStatus,ThreadProjection,ThreadTurnProjection,TurnPaginationCursor,TurnPaginationWindow, andDeciderCommand.
- Defined
Sources/TyrellCore/Orchestration/OrchestrationEngineActor.swift(new):- Implemented SQLite schema (
orchestration_events,orchestration_command_receipts,projection_threads,projection_thread_turns). - Implemented atomic decider transaction
executeCommand(_:)verifying idempotency, appending events, updating projection read-models, and recording receipts in a single transaction. - Implemented
fetchTurnWindow(10-turn initial window, 20-turn historical pages withhasMoreandnextCursor). - Implemented projection queries (
fetchThreadProjection,fetchAllThreadProjections,fetchTurnProjection,fetchEvents,commandReceipt).
- Implemented SQLite schema (
Sources/TyrellCore/Orchestration/ThreadSettlementReactor.swift(new):- Implemented
SubagentLivenessChecking,BlockSubagentLivenessChecker,evaluateSettlement, andevaluateAllThreadsenforcing PRD §3.3.1 safety rules: deferring settlement if active subagents are detected or idle threshold (<60s) has not elapsed.
- Implemented
Tests/TyrellCoreTests/CQRSEventSourcingTests.swift(new):- Comprehensive test suite covering all 5 acceptance criteria.
Verification Evidence
- Intel macOS 26.7.1 (
rdmpw3275m):swift test --filter CQRSEventSourcingTests: 5/5 tests passed in 0.033s.- Multi-suite regression pass (
CQRSEventSourcingTests,InteractionModeTests,TieredSubscriptionTests): 14/14 tests passed in 0.564s.
- Apple Silicon macOS 27.0 (
rdmsm4x):swift test --filter CQRSEventSourcingTests: 5/5 tests passed in 0.013s.
- Git Commit & Remotes:
- Rebased and fast-forward merged cleanly to canonical
mainat6908063. - Pushed to
fleet(git.ecs0.net:git/apps/Tyrell.git) andbackup(https://github.com/richhdoty/rdmsm4x-dev-apps-tyrell.git). - Synced scratch
rdmpw3275mcheckout to6908063.
- Rebased and fast-forward merged cleanly to canonical
- Ticketing & Coordination:
- Ticket
FEAT-20260903-06resolved and archived toissues/resolved/. - Broadcast message
20260923-102318-011C815Bsent toallviaagent_msg.zshand replicated across all 5 active peer nodes (rdmsm4x,rdmbair13m5,rdmbair15m5,rdmpw3265m,jdmbair13m5).
- Ticket
How to Undo
- Revert commit
6908063viagit revert 6908063. - Reopen ticket via
ticket reopen FEAT-20260903-06.