• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dal-go / dalgo / 33004137529
100%

Build:
DEFAULT BRANCH: main
Ran 26 Aug 2026 07:15PM UTC
Jobs 1
Files 126
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Aug 2026 07:14PM UTC coverage: 99.962%. Remained the same
33004137529

push

github

web-flow
feat(dalgo2memory): bounded auto-retry of transaction conflicts in optimistic mode (#126)

The real Firestore Go client's RunTransaction retries the whole callback on
ABORTED up to DefaultTransactionMaxAttempts=5 (cloud.google.com/go/firestore's
transaction.go), so production code essentially never observes a
first-attempt abort; dalgo2firestore.RunReadwriteTransaction maps
dal.TransactionOptions.Attempts() straight to firestore.MaxAttempts
(dalgo2firestore/transaction.go's createFirestoreTransactionOptions).
dalgo2memory's WithOptimisticConcurrency mode previously discarded its
options parameter entirely and surfaced ErrTransactionConflict un-retried,
which fails tests in ways production code never does.

RunReadwriteTransaction now honors Attempts() (default 5, matching the SDK)
and wraps the single-attempt body (renamed
runOptimisticReadwriteTransactionOnce) in a retry loop that retries only on
IsTransactionConflict — never ErrReadAfterWriteInTransaction, which the real
client also excludes from its own isAborted retry check because it signals a
callback bug, not contention. Each attempt gets a fresh optimisticState, with
a runtime.Gosched() (no real backoff: nothing to wait out in-memory) between
attempts. The locked mode is untouched: its versions/collectionSeq tables
stay empty, so it can never produce a conflict to retry.

Updated the existing single-attempt conflict tests (optimistic_test.go,
snapshot_test.go, txquery_test.go) to pass dal.TxWithAttempts(1) so they keep
asserting exactly what they asserted before default retries existed — most
had external side effects or panic-on-repeat closures inside the callback
that a silent default-5 retry would otherwise corrupt. Added retry_test.go
covering: conflict-then-succeed, persistent-conflict exhausting the default
budget, TxWithAttempts(1) and TxWithAttempts(3), ErrReadAfterWriteInTransaction
never retried, and the locked mode silently ignoring Attempts().


Claude-Session: https://claude.ai/co... (continued)

15 of 15 new or added lines in 2 files covered. (100.0%)

7952 of 7955 relevant lines covered (99.96%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33004137529.1 26 Aug 2026 07:15PM UTC 126
99.96
GitHub Action Run
Source Files on build 33004137529
  • Tree
  • List 126
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 69a25449 on github
  • Prev Build on main (#33002534404)
  • Next Build on main (#33006788606)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc