Commit Graph
26 Commits
Author SHA1 Message Date
angelandClaude Sonnet 5 984a4465f8 amazon: replace fire-and-forget listener notifications with ack-based retry
Dispatching an event to the listener previously happened from an
un-awaited goroutine, with only a log line on failure - once
processed_at was set, a dropped or failed notification was permanently
and silently lost, with no way to tell it had happened.

Replaces the processed/processed_successfully booleans with a
notified_at/processed_at pair (migration 000031): the dispatcher sets
notified_at and hands the event to MockEventListener.Notify, which now
also receives an ack callback the listener calls whenever it's truly
done, synchronously or arbitrarily later. Anything still "notified" but
unacked past notifyRetryAfter (a tunable field, not a stored
per-row timestamp) gets notified again on the dispatcher's normal
poll/reactive loop - no new retry mechanism needed. ack is idempotent,
since a late ack from an earlier attempt and one from a retry can both
eventually fire for the same event.

Dispatch is deferred until after the transaction that recorded
notified_at has actually committed, so ack's independent write can't
race a still-open transaction it implicitly depends on being visible.

The real SSE listener (server/sse/db_event_publisher.go) acks inline,
since its work is synchronous.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XEDaCB7C2NEBgyvqEtZuxY
2026-08-20 00:35:22 -06:00
angel 6a473b2ea0 Claude-assisted improvements (untested)
- dev auth flow (side-step OAuth)
- db event processing integration tests
- dev scripts (eg Makefile)
- db / test db migration setup scripts.
2026-08-20 00:35:22 -06:00
angel 50adc8e2de prototyped svg reports
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
Tests / Go tests (push) Failing after 20s
2026-08-20 00:35:13 -06:00
angel 16ecf2dc66 mock amazon event processing stubbed 2026-08-20 00:35:13 -06:00
angel df1b93261f mock events saved to db 2026-08-20 00:35:05 -06:00
angel 4386ede68e mock events db schema 2026-08-20 00:35:05 -06:00
angel c6b8a9a00d mock mode: database queries implemented and checkbox on account page built 2026-02-26 22:54:58 -07:00
angel 4352062227 mock sync group editing: made tables columns more consistent; initialize database rows upon editing 2026-02-20 23:04:18 -07:00
angel 95ef64ce18 ability to delete mock sync groups 2026-02-10 18:05:30 -07:00
angel b155280081 mock shop sync group listing draft page 2026-02-08 12:31:10 -07:00
angel 02893511ba mock shop page: order listings 2026-02-05 10:33:39 -07:00
angel 813fbb11b1 saved mock listing 2026-02-04 22:48:57 -07:00
angel e74854bf6e ability to mock stores stubbed 2026-01-30 00:55:17 -07:00
angel a50c0ef18d account page: can now reorder entries under shops sections by drag and drop 2026-01-26 13:51:40 -07:00
angel 3d70d08dac split oauth_tokens.claims column up; improved fonts; allow multiple sse connections per user; make navbar and use friendly 2026-01-23 02:31:34 -07:00
angel 38aa3796b9 mock shops more spelled out 2026-01-22 15:14:44 -07:00
angel b182685ec3 mock store tables stubbed in db schema 2026-01-21 20:15:44 -07:00
angel 7481cec0d5 installed gin 2026-01-13 22:07:20 -07:00
angel 889aead6b6 save "create sync group" table in database 2026-01-11 05:19:20 -07:00
angel e20623a6d3 redirect to desired page after authenticating 2026-01-06 02:33:48 -07:00
angel 8090a6f25e save oauth user_id and link users and accounts 2025-12-30 02:06:14 -07:00
angel bc592718bf renames a couple db migration files 2025-12-29 23:50:14 -07:00
angel cc74842e63 implement auth using Auth0 2025-12-29 23:49:23 -07:00
angel c9100383e4 account page stubbed: link to etsy sign up 2025-12-29 06:06:13 -07:00
angel 11ff52b1c7 process raw_store_events records automatically via triggers 2025-12-24 01:22:43 -07:00
angel 3823fa7331 raw_store_events store started 2025-12-24 00:55:22 -07:00