rdmpw3265m-changelog-20260924-2359-durable-offline-chat-queue-fallback
Changelog: Durable Offline Chat Queue, Outbox Drain & Local Fallback Resolver (FEAT-20260831-17, TASK-20260924-04)
Timestamp: 2026-09-24 23:59: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-20260831-17, TASK-20260924-04
(RESOLVED)
1. Summary of Changes
- Outbox Domain Models & Policies
(
OutboxModels.swift):- Implemented
OutboxKind(chat,usage,manifest,agentEvent),OutboxEnvelopewith idempotency keys, andOutboxStats. - Implemented
OutboxPolicywith configurable queue capacity, backoff bounds, and kind-specific coalescing rules (telemetry.usagecoalesces by key;.chatand.agentEventnever coalesce per DEC-20260831-10).
- Implemented
- Durable SQLite Storage
(
SQLiteStateStore+Outbox.swift):- Added
outboxtable schema and index on(destination, next_attempt_at). - Implemented synchronous local enqueueing, coalescing updates, capacity bounds enforcement, delivery acknowledgments, and attempt logging.
- Added
- Outbox Drain Actor
(
OutboxDrain.swift):- Implemented background drain engine with exponential backoff and
full jitter
(
delay = random(0, min(cap, base * 2^attempts))). - Added fast-path reconnect via
notifyNetworkAvailable()to trigger immediate drain on network reconnection. - Classified errors into permanent (HTTP 4xx except 408/429) vs transient, parking permanent failures in dead-letter state without infinite retries (satisfying DISCONNECTED-OPERATION.md §3.2 & V4).
- Implemented background drain engine with exponential backoff and
full jitter
(
- Offline Chat Queue Coordinator
(
OfflineChatQueue.swift):- Implemented local-first chat writes: messages synchronously commit
to local
SQLiteStateStorebefore enqueuing to the outbox, insulating users from network partitions.
- Implemented local-first chat writes: messages synchronously commit
to local
- Chat Endpoint Fallback
(
ChatEndpointResolver.swift&SettingsView.swift):- Added
.localDaemoncase toChatEndpointSource,localDaemonURL(http://127.0.0.1:43117), andresolve(hostName:configData:localDaemonAvailable:)overload. - Updated
SettingsViewrelay label mapping for.localDaemon.
- Added
2. Verification Evidence
- Build:
swift buildrc=0, clean compilation across all targets. - Tests:
OfflineChatQueueTests: 5/5 tests passed (100%), 0 failures.ChatTransportTests: 12/12 tests passed (100%), 0 failures.
- Static Gate:
scripts/verify_zero_fleet_identity.zshexited 0 (0 violations). - Git Lineage:
- Feature branch
agy/offline-chat-queue-FEAT-20260831-17(commit2172451). - Integration merge to canonical
main(20696a0) 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:
- Marked RESOLVED in issueRoo; committed on
rdmsm4x:~/dev/issues(ffaae3b). - Exported 1,229 ticket HTML pages; committed and pushed to
dev.ecs0.net(336d26e). - Fleet announcement broadcast via
agent_msg.zsh:20260924-235947-E525DCA8.
- Marked RESOLVED in issueRoo; committed on