Commit Graph

5 Commits

Author SHA1 Message Date
Jakub Zych
e55d2345b7 test(11-07): pin that a keyless Typesense engine is never configured
- TestSyncEngineRegistration: the typesense import registers the driver
  and a missing or blank api_key reports Configured false, the gate that
  keeps beachcomber from sending anything
2026-09-30 14:34:33 +02:00
Jakub Zych
18d3097be5 test(11-07): pin the Typesense engine wire contract
- TestEngineWire: API key and Accept on every request, create on 404 with
  the schema or auto fields, 409 as success, JSONL import with
  success:false and unreadable lines as errors (message capped, no
  document), 404-tolerant delete/flush with id escaping, SearchIDs
  parameters and id parsing, typed errors without bodies, transport
  errors without the URL, timeout
- TestEngineConfig: search.typesense.* parsing and the registered engine
  (coverage 95.6%)
2026-09-30 14:28:02 +02:00
Jakub Zych
6df43d45b8 fix(11-07): roll back the savepoint when a swallowed read failed
- beachcomber and lighthouse released their savepoint whenever the inner
  function reported no error; a Gate that counts a failed read as off,
  or a channel function or delete snapshot that swallows one, left the
  caller's Postgres transaction aborted (25P02) and failed the write
- a failed RELEASE now rolls back to the savepoint, as the READMEs promise
- beachcomber gets its testcontainers harness and sync tests
  (TestSyncGates, TestSyncAfterCommit, TestSyncDeleteAndSoftDelete,
  TestSyncFailuresNonFatal, TestServiceSetup); lighthouse gets
  TestBroadcastSwallowedReadFailure
2026-09-30 14:26:51 +02:00
Jakub Zych
9543e6508c fix(11-05): sync single-statement and plain-transaction writes, type engine status errors
- pin the sync callbacks before gorm:commit_or_rollback_transaction: an
  After-only anchor is appended past the commit and lagoon's after-commit
  flush, so single-statement writes never synced
- give the gate and the document builder a clean session: Session with NewDB
  and a Context clones the write's statement, and a later WithContext queried
  through the written model's table
- typesense.StatusError carries method, path and status, never the body
- README: sync semantics, the three gates, delete on soft delete, and the
  SQL re-gate required of SearchIDs callers
2026-09-30 13:05:10 +02:00
Jakub Zych
3e1f3e6a1b feat(11-05): add the beachcomber search sync package and its Typesense engine
- Searchable, Engine, Gate and an init-time engine registry with the null engine
- GORM callbacks installed through lagoon.OnDatabase register an after-commit
  sync that reloads the row and upserts or deletes its document
- Gates run before any request: engine configured, database published, app Gate
- hand-rolled net/http Typesense engine following the Scout wire contract
- module README and root modules row
2026-09-30 12:50:54 +02:00