Artifact 13ecfea3cf2be6ca17acc88681d44cb4c002cac145d13959cd69b9b191cc7060:
- `Repo.Close` now runs `PRAGMA wal_checkpoint(TRUNCATE)` before closing the underlying connection, so the on-disk repo file is readable by external SQLite/fossil tooling. Previously, libfossil-managed repos could be left as a 4 KiB stub plus a fat WAL sidecar that vanilla `fossil` rejected as `not a valid repository`. (#27, #28) - New public `Repo.Checkpoint(mode)` method and `CheckpointMode` enum (`Passive` / `Full` / `Restart` / `Truncate`) for explicit mid-flight checkpointing. Long-running consumers (hubs, daemons) no longer need to reach through `Repo.DB().Exec("PRAGMA wal_checkpoint(...)")`.
None. The Close error type may now be a joined error (`errors.Join(checkpointErr, closeErr)`) when both checkpoint and close fail; callers using `errors.Is` and `errors.As` continue to work.
- No code changes required to benefit from the close-time checkpoint fix. - Callers running raw `PRAGMA wal_checkpoint` against `Repo.DB()` can switch to `Repo.Checkpoint(libfossil.CheckpointTruncate)` (or other modes) for a typed API surface.
9013d33 fix: checkpoint WAL on Close so vanilla fossil can read repo (#28)". by [email protected] on 2026-05-05 15:15:56.
D 2026-05-05T15:15:56
T +sym-v0.6.0 faf57ad9c7dc57c19a78b96b25a406b058422f2ad3af5bf92834e65c21fc662d Release\sv0.6.0\n\n-\s`Repo.Close`\snow\sruns\s`PRAGMA\swal_checkpoint(TRUNCATE)`\sbefore\sclosing\sthe\sunderlying\sconnection,\sso\sthe\son-disk\srepo\sfile\sis\sreadable\sby\sexternal\sSQLite/fossil\stooling.\sPreviously,\slibfossil-managed\srepos\scould\sbe\sleft\sas\sa\s4\sKiB\sstub\splus\sa\sfat\sWAL\ssidecar\sthat\svanilla\s`fossil`\srejected\sas\s`not\sa\svalid\srepository`.\s(#27,\s#28)\n-\sNew\spublic\s`Repo.Checkpoint(mode)`\smethod\sand\s`CheckpointMode`\senum\s(`Passive`\s/\s`Full`\s/\s`Restart`\s/\s`Truncate`)\sfor\sexplicit\smid-flight\scheckpointing.\sLong-running\sconsumers\s(hubs,\sdaemons)\sno\slonger\sneed\sto\sreach\sthrough\s`Repo.DB().Exec("PRAGMA\swal_checkpoint(...)")`.\n\nNone.\sThe\sClose\serror\stype\smay\snow\sbe\sa\sjoined\serror\s(`errors.Join(checkpointErr,\scloseErr)`)\swhen\sboth\scheckpoint\sand\sclose\sfail;\scallers\susing\s`errors.Is`\sand\s`errors.As`\scontinue\sto\swork.\n\n-\sNo\scode\schanges\srequired\sto\sbenefit\sfrom\sthe\sclose-time\scheckpoint\sfix.\n-\sCallers\srunning\sraw\s`PRAGMA\swal_checkpoint`\sagainst\s`Repo.DB()`\scan\sswitch\sto\s`Repo.Checkpoint(libfossil.CheckpointTruncate)`\s(or\sother\smodes)\sfor\sa\styped\sAPI\ssurface.\n\n9013d33\sfix:\scheckpoint\sWAL\son\sClose\sso\svanilla\sfossil\scan\sread\srepo\s(#28)
U [email protected]
Z 25009ad4ffc5644291eb6c88f8e00f01