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

ingitdb / ingitdb-cli / 25815899508 / 1
96%
main: 96%

Build:
DEFAULT BRANCH: main
Ran 13 May 2026 05:38PM UTC
Files 109
Run time 4s
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

13 May 2026 05:36PM UTC coverage: 78.823% (-0.1%) from 78.954%
25815899508.1

push

github

inGitDB Dev
fix(insert): harden batch rollback (MapOfRecords, ordering, git errors)

Addresses findings #2, #3, #4 + two cheap suggestions from the final
batch-insert review.

#2: batch mode now refuses MapOfRecords collections at the pre-flight
stage with a clear diagnostic. The previous behavior would have
silently shared a file path across all batch records, causing the
rollback path to delete pre-existing records on failure. Future work
can add proper MapOfRecords batch support (via SetMulti or buffered
writes); for MVP the explicit rejection is correct.

#3: KEPT the original ordering (append AFTER tx.Insert) and added a
comment explaining why. The plan suggested reordering on the theory
that rollback tolerates non-existent paths, but the existing
TestInsertBatch_JSONL_CollisionWithExistingRecord proves the suggested
ordering is unsafe for the current dalgo2fsingitdb backend: tx.Insert
performs the collision check BEFORE writing, so appending the path
pre-insert causes rollback to remove a pre-existing file at the
same path (i.e. the colliding record), destroying real data. The
reorder may be revisited if the backend changes to write-then-check.

#4: isTracked now distinguishes 'git ls-files --error-unmatch' exit
code 1 (not tracked) from other failures (transient .git/index.lock,
command not found, network errors on remote repos). Other failures
default to 'treat as tracked' — git checkout HEAD -- on an untracked
file is a benign no-op, but failing to restore a tracked file
destroys data.

Suggestions: ParseBatchYAMLStream's docNo increment moved to the top
of the loop body for cleaner error indexing. rollbackBatchWrites
groups all tracked paths into a single 'git checkout HEAD -- p1 p2 ...'
invocation instead of one process per file — meaningful on large
batches; gitCheckoutPath renamed to gitCheckoutPaths and takes a
slice.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

8062 of 10228 relevant lines covered (78.82%)

0.93 hits per line

Source Files on job 25815899508.1
  • Tree
  • List 109
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25815899508
  • fa209819 on github
  • Prev Job for on main (#25815211526.1)
  • Next Job for on main (#25830391674.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc