Skip to content
go-libfossil Tags and Properties
Login

Tags and Properties

Tags and Properties for Check-in b1b6c09b41

Context
2026-07-27
16:00 • Edit [b1b6c09b41]: Add tag "v0.7.0" with note "v0.7.0

First release under the github.com/danmestas/go-libfossil module path, and the first with no replace directives in any go.mod -- the two things that had the release pipeline blocked.

Clone reliability and performance on real-world repositories:

- The mid-round phantom-fill crosslink cascade now honors the caller's deadline, on both the clone and general sync paths, instead of running unbounded. - That cascade batches its commits onto a shared content cache rather than opening a transaction and re-expanding content per artifact. - db.Querier reuses prepared statements instead of re-parsing identical SQL on every call. - The delta encoder bounds its hash-collision chain walk, removing quadratic behavior on low-entropy input: 1 MiB of repetitive content went from 125s to 0.062s.

Correctness:

- Sync replies decode by the wire's real Content-Type rather than a hardcoded assumption, so cloning from canonical Fossil servers works. - PGP/SSH clearsigned manifests are accepted. - mlink rows are emitted for deletions by omission, and renames resolve their parent blob from the pre-rename path.

CI now pins canonical fossil 2.28 by checksum and pre-creates its global config database, closing a race that produced intermittent schema-validation failures.". artifact: cc9756cc92 user: [email protected]

14:22
perf: bound the delta encoder's hash-collision chain walk (#176) (#178)

emitMatches walked a hash bucket's entire collision chain at every target position with no limit. rollingHash is a weak multiply-accumulate over a 16-byte window, so low-entropy content — repeated tokens, runs of whitespace, ordinary SQL and C boilerplate — funnels an enormous number of source windows into one bucket, making Create quadratic in target length. Measured on the issue's repro (repeated 8-byte token, one 10-byte edit): 32 KiB 0.133s, 64 KiB 0.496s, 128 KiB 1.950s, 256 KiB 7.765s — ~3.9x per doubling — against 0.013s for a 128 KiB high-entropy control.

Bound the walk at maxChainCandidates, matching the `int limit = 250` that fossil's delta_create (src/delta.c) puts on the identical loop. The same walk also computed each candidate's match length twice, once to test it against the nHash threshold and again to read the value; compute it once.

Extract the walk into bestMatch so the bound is testable on a candidate count rather than on wall-clock time, which cannot flake on loaded CI.

Delta output changes, as fossil's own limit makes it change: a capped search can settle for a shorter match, so the encoder emits more copy commands. This lands our output on canonical fossil's — 128 KiB: 266 bytes vs fossil's 260; 1 MiB: 2142 vs 2120 — where before the unbounded walk produced 44 and 50 bytes and paid quadratic time for them.

After: 128 KiB 1.950s -> 0.018s, and 1 MiB 125.036s -> 0.062s.

Verified the deltas still apply byte-for-byte, by our Apply and by canonical fossil 2.28's test-delta-apply.

Co-authored-by: Dan Mestas <[email protected]> check-in: b1b6c09b41 user: [email protected] tags: trunk, v0.7.0

2026-04-19
16:30
Initial open source release

libfossil is a pure-Go implementation of the Fossil SCM, reading and writing the same .fossil SQLite repository format as upstream Fossil.

This is the first public release of code that previously lived in a private repository. The module path is github.com/danmestas/libfossil and the binary is named libfossil to avoid $PATH collisions with upstream fossil.

Included: - Repo lifecycle (create, clone), checkout/checkin, timeline, merge, diff, annotate, shun, tag, branch, bisect, stash, undo/redo - Sync-over-HTTP protocol (client and handler) - Two SQLite drivers: modernc (pure Go, default) and ncruces (wasm-capable) - Observer interfaces (SyncObserver, CheckoutObserver) with an optional OpenTelemetry implementation in observer/otel (separate submodule) - Deterministic simulation testing harness with BUGGIFY fault injection - Kong-based embeddable CLI under cli/ and a standalone binary under cmd/libfossil/ check-in: f5744359d3 user: [email protected] tags: trunk