Commit Graph
51 Commits
Author SHA1 Message Date
Jay de1ec56c40 make a copy of the event subs map because it may change during iteration.
Use consistent variable names for channels.
2026-08-09 19:04:03 -04:00
Jay 22b385f240 security: prevent send-on-close panic
Move channel sends into mutex lock to prevent channel closure from racing with the send.
Add a buffer to the event and inbox channels for backpressure management.
2026-08-09 19:02:39 -04:00
Jay 7e54a26aac security: do not silence Connect() errors; read values and use under the same lock.
Ignoring Connect() errors can sometimes cause double-registration.
Reading values under one lock and using them under another allows for values to change in the gap between them.
2026-08-09 18:58:13 -04:00
Jay 8ed9efa433 security: check for channel closures to prevent busy-loops.
Move notice observer before channel send.
2026-08-09 18:56:36 -04:00
Jay 3d20e9c512 security: fix send-on-closed-channel panic; remove unbounded buffer.
Before, sends into the event buffer were not performed under mutex lock, meaning that the channel could be closed while a send is in progress, causing a panic. A relay flooding events while a Close was in progress could trigger a panic.
Also, a slow consumer in addition to a flooding relay would cause the buffered pipe to grow unboundedly, which could cause memory to run out.
Both of these were resolved by removing the buffered pipe altogether, sending directly into the events channel, and sending under mutex.
The tradeoff we accept is that to secure the code against remote vulnerabilities and ensure no messages are dropped, the consumer must drain the subscription channels to prevent backpressure and deadlocks.
2026-08-09 18:54:35 -04:00
Jay 7d323ec154 chore: upgrade dependencies 2026-08-06 09:54:22 -04:00
Jay 83c923ab11 gate send actions based on whether the peer is connected. 2026-08-06 09:54:09 -04:00
Jay 70c47d7421 query: return 'missed eose' error explicitly. 2026-08-06 09:51:08 -04:00
Jay b0e0561f0a testing: wait for responses instead of checking immediately 2026-08-06 09:45:19 -04:00
Jay 7bbcebcbcf formatted file 2026-08-06 09:44:17 -04:00
Jay 42e6e2af83 align with honeybee updates. change ID to URL semantics. 2026-06-08 09:43:19 -04:00
Jay 69f9219819 surface honeybee.EventDialFailed through the prism event pipeline 2026-06-04 17:46:47 -04:00
Jay df0a968907 add logger to auth manager 2026-06-04 16:03:10 -04:00
Jay dda3bfd5b7 cleanup: flakey tests and race conditions 2026-06-04 12:07:03 -04:00
Jay b5b0ec77ba chore: bump go-honeywood to v0.5.1 2026-06-03 23:26:51 -04:00
Jay c11e40b48a chore: bump go-mana-component to v0.2.0, go-roots-ws to v0.2.0 2026-06-03 23:23:54 -04:00
Jay a8c57aaeac test: assert no side effects for unknown OK in EventPublisher 2026-06-03 23:08:05 -04:00
Jay 5e425337ff test: assert NoticeReceived.At is non-zero in observer notified 2026-06-03 23:05:12 -04:00
Jay 21a1112811 test: RequestManager observable assertions and ReqSendFailed subtest 2026-06-03 22:58:15 -04:00
Jay c8024e2b98 test: EventPublisher unknown OK ignored 2026-06-03 22:30:00 -04:00
Jay 81875b3a8d test: EventPublisher close cancels pending 2026-06-03 22:28:04 -04:00
Jay 00460030ae test: EventPublisher disconnect then send failure on reconnect 2026-06-03 22:25:18 -04:00
Jay 148850663c test: EventPublisher send failure delivers error 2026-06-03 22:23:14 -04:00
Jay 1bdf9e0475 test: EventPublisher resend after disconnect 2026-06-03 22:20:04 -04:00
Jay 3f8574508d test: EventPublisher held event sent on connect 2026-06-03 22:17:40 -04:00
Jay 963654cae8 test: EventPublisher publish while disconnected times out 2026-06-03 22:14:51 -04:00
Jay a66d8386dd test: EventPublisher concurrent correlation 2026-06-03 22:13:25 -04:00
Jay 5051ba7fed test: EventPublisher publish accepted/rejected/timeout with observer assertions 2026-06-03 18:29:51 -04:00
Jay e6f23759bc test: EventPublisher publish rejected 2026-06-03 18:10:43 -04:00
Jay dae4c7773d test: EventPublisher publish accepted 2026-06-03 18:07:28 -04:00
Jay cb848e3f32 chore: add AGENTS.md with go workspace note 2026-06-03 16:38:33 -04:00
Jay f8b45ae068 test: AuthManager close cleans up 2026-06-03 16:34:59 -04:00
Jay 783171e6ef test: AuthManager malformed AUTH ignored 2026-06-03 16:32:38 -04:00
Jay b6846c25bb test: AuthManager replacement challenge 2026-06-03 16:31:22 -04:00
Jay e16aa908bf test: AuthManager disconnect resets state 2026-06-03 16:28:45 -04:00
Jay f9d9dfac56 test: AuthManager send error recorded 2026-06-03 16:27:13 -04:00
Jay 227f104077 test: AuthManager callback error recorded 2026-06-03 16:25:58 -04:00
Jay 51148a8a91 test: AuthManager challenge triggers callback and send 2026-06-03 15:25:52 -04:00
Jay a3f2c9b2d8 test: NoticeHandler close cleans up 2026-06-03 15:20:37 -04:00
Jay cf4a2d380a test: NoticeHandler observer notified 2026-06-03 15:19:42 -04:00
Jay 9d4873f8d4 test: NoticeHandler malformed ignored 2026-06-03 15:18:10 -04:00
Jay ee0f5953da test: NoticeHandler notice delivered 2026-06-03 15:17:03 -04:00
Jay e360f35ee5 prepare code skeleton to develop remaining managers 2026-06-03 15:04:08 -04:00
Jay 29f6966ae0 use options 2026-06-03 11:42:55 -04:00
Jay b4f79f68c8 update honeybee 2026-05-26 15:36:24 -04:00
Jay 0c3564442f place attribute on handler 2026-05-21 17:01:46 -04:00
Jay 5ba60e28ad add logging 2026-05-21 08:19:51 -04:00
Jay b00528bd73 add license, bump script 2026-05-20 23:13:43 -04:00
Jay f21842a80b upgrade honeybee 2026-05-20 23:12:45 -04:00
Jay c6f2aec165 record observable events from request manager 2026-05-19 22:16:58 -04:00
Jay 30e9881dae incorporate observer interface into components 2026-05-19 21:20:00 -04:00