Skip to content

v0.16.1

Choose a tag to compare

@magifd2 magifd2 released this 28 May 03:38
· 40 commits to main since this release

Patch release. Production data-race fix surfaced while investigating issue #13.

Fixed

  • Data race on a.session pointer between title generation and the extraction's auto-dispatched SendWithAttachments. Caught by the Go race detector during issue #13 investigation. The title goroutine read a.session (in generateTitleIfNeeded) while agentLoop's defensive nil-init wrote to it, both without holding a.mu. In normal use a.session is initialised by LoadSession before any SEND, so the agentLoop nil-init is usually a no-op and the race rarely manifests in practice — but the same race also exists between LoadSession's write and a concurrent title-gen read, so the bug is latent regardless. No user-visible impact has been observed, but the fix lands now because the race is real. Fixed by snapshotting a.session under a.mu at both sites (the lock is NOT held across backend.Chat, which can take seconds). No API or on-disk behaviour change. See ADR-0030.
  • Two flaky tests in the agent package (issue #13). Pure test fixes (barrier pattern for TestQueuedSend_ExtractionErrorStillDispatches, relaxed wall-clock deadline for TestAutoDispatch_DrainedByWait).