Artifact ec9498d647ddb52f1ea47953520a99b5f1d942c46d461a2adf5ae6fb7a686f36:
- File
go.mod
— part of check-in
[72cfc528b2]
at
2026-05-05 15:42:57
on branch trunk
— fix(hub): periodic WAL checkpoint so vanilla fossil can read hub.fossil (#144)
Hub.fossil opens in WAL journal mode, so without checkpointing the on-disk file stays as a 4 KiB stub plus a multi-hundred-KiB *-wal sidecar — vanilla fossil tooling (fossil ui / fossil info / fossil timeline) refuses it because its validity probe stats the main file before consulting the WAL.
Wire a goroutine in NewHub that runs PRAGMA wal_checkpoint(PASSIVE) every Config.CheckpointInterval (default 10s) so vanilla fossil can always read hub.fossil while the hub is running. PASSIVE never blocks readers or writers. Hub.Stop drains the goroutine before closing the libfossil handle; libfossil v0.6.0's own (*Repo).Close runs a TRUNCATE checkpoint, so the post-Stop on-disk file is self-contained.
Closes #143. Bumps libfossil v0.5.0 → v0.6.0 (danmestas/libfossil#28). (user: [email protected], size: 2078) [annotate] [blame] [check-ins using]
module github.com/danmestas/EdgeSync go 1.26.0 require ( github.com/alecthomas/kong v1.15.0 github.com/danmestas/EdgeSync/bridge v0.0.3 github.com/danmestas/EdgeSync/leaf v0.0.10 github.com/danmestas/libfossil v0.6.0 github.com/danmestas/libfossil/db/driver/modernc v0.1.0 github.com/nats-io/nats-server/v2 v2.12.6 github.com/nats-io/nats.go v1.49.0 ) require ( github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/go-tpm v0.9.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/klauspost/compress v1.18.4 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/highwayhash v1.0.4-0.20251030100505-070ab1a87a76 // indirect github.com/nats-io/jwt/v2 v2.8.1 // indirect github.com/nats-io/nkeys v0.4.15 // indirect github.com/nats-io/nuid v1.0.1 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect go.opentelemetry.io/otel v1.43.0 // indirect go.opentelemetry.io/otel/metric v1.43.0 // indirect go.opentelemetry.io/otel/trace v1.43.0 // indirect golang.org/x/crypto v0.49.0 // indirect golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect golang.org/x/sys v0.42.0 // indirect golang.org/x/time v0.15.0 // indirect modernc.org/libc v1.67.6 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.11.0 // indirect modernc.org/sqlite v1.46.1 // indirect ) replace ( github.com/danmestas/EdgeSync/bridge => ./bridge github.com/danmestas/EdgeSync/leaf => ./leaf )