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

ingitdb / ingitdb-cli / 25815899508
96%

Build:
DEFAULT BRANCH: main
Ran 13 May 2026 05:38PM UTC
Jobs 1
Files 109
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

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

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>

22 of 50 new or added lines in 2 files covered. (44.0%)

74 existing lines in 4 files now uncovered.

8062 of 10228 relevant lines covered (78.82%)

0.93 hits per line

Uncovered Changes

Lines Coverage ∆ File
28
65.0
-9.11% cmd/ingitdb/commands/insert_batch.go

Coverage Regressions

Lines Coverage ∆ File
34
80.68
-0.22% pkg/dalgo2ingitdb/batch_parsers.go
19
46.03
7.85% cmd/ingitdb/commands/insert_context.go
14
65.0
-9.11% cmd/ingitdb/commands/insert_batch.go
7
93.48
-0.17% cmd/ingitdb/commands/insert.go
Jobs
ID Job ID Ran Files Coverage
1 25815899508.1 13 May 2026 05:38PM UTC 109
78.82
GitHub Action Run
Source Files on build 25815899508
  • Tree
  • List 109
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fa209819 on github
  • Prev Build on main (#25815211526)
  • Next Build on main (#25830391674)
  • 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