Skip to content

Releases: svandragt/jotta-tools

Release list

0.2

Choose a tag to compare

@svandragt svandragt released this 18 Aug 11:30
732ef50

sync-buddy is now jotta-buddy, and reports on backup as well as sync.

Breaking

The script is renamed, so the old symlink is left dangling. After make install, remove it:

rm -f ~/.local/bin/sync-buddy

Environment overrides move from SYNC_BUDDY_* to JOTTA_BUDDY_*. Anything unrecognised on the command line is now an error rather than a cue to start watch mode.

Why the rename

The name said sync while the tool had been reporting backup faults all along, in one undifferentiated list. That is how a correct sync verdict came to look like it contradicted the row beneath it: the clean pass was sync's, the error underneath it was backup's, and nothing said so.

Backup needs the attention more than sync does. Sync stops its event loop and goes quiet, so it fails loudly and you notice. Backup keeps cycling whatever happens, so it fails silently — a directory in this backup set had been unbackupable since March without a word about it anywhere.

New

  • An action line answering whether a person has to do anything. It cannot be settled by naming faults, since the next fault is always one nobody has seen, so it goes on recovery instead: a 421, a DeadlineExceeded or a DNS timeout stops the loop and jottad restarts it within thirty seconds, while a case collision, a rejected name, a wedge or a stopped daemon wait for you.
  • A verdict per subsystem, from the only positive evidence each gives: a completed sync full-check, and a completed backup scan.
  • Errors ranked and reported inside each subsystem, so a red verdict always comes with a lead. One shared list let backup hold the only row going, and it is far noisier — measured on one machine, nine sync-scope errors including a loop-stop burst sat in the window while none of them appeared anywhere in the report.
  • Refreshes every 30 seconds by default via watch(1), with --once for a single report. It only re-execs on a terminal, so timers and scripts still get an exit code.
  • --help, and the five JOTTA_BUDDY_* overrides documented.
  • make check, covering the re-exec branch — which can recurse, or swallow the exit code the canary gates on, without either being visible in the source.

Fixed

Five fields in status --json read plausibly and mislead, all found by sampling while something was happening:

  • .State.Uploading is an empty object with thousands of files in flight, so the transfer row had reported idle through every upload since it was written. In-flight figures are in .Sync.WorkingProgress.
  • .Backup...Backups[].Uploading reports a delta and goes negative when idle.
  • .Backup...History lags by hours, so the backup verdict reads the log instead.
  • .Backup...Count reports a partial total mid-recount — 3.1 GiB seen against a real 211.8 GiB.
  • .Sync.RemoteCount is zero before the first listing, which read as an empty account on a fresh daemon.

Also:

  • The errors row led with the newest line, which a fault that retries forever wins every time it fires — so one chronic fault held the row and nothing new could get in. It now leads with the fault that started most recently, and shows both timestamps, so a single event and something failing all day no longer look alike.
  • Three exclusions were letting noise through: jottad renamed not regular file to unsupported file type (about 130k lines every four hours), a line ending => RESOLVED restated the error it cleared, and localdb.found is informational. Each reached the filter only when a path happened to contain the word "error", which is what made them hard to spot.
  • Long messages elide in the middle rather than losing an end. The path is the actionable half and sits at the end, so clipping threw away the answer, and raising the line ceiling only moved the loss to whichever end fell outside it.
  • not local is withheld while the local count is stale, having read 14733 files "not local" when 10347 of them were sitting on disk.
  • behind is renamed not local, because it never drains.
  • recent says nothing in 30min rather than printing a bare heading.

Faster

About 1.7s per pass, down from 8.9s. One journalctl read per window instead of two, and a 4h error window rather than 24h — still wider than the slowest retry that matters, since backup scans are hourly.

Known

A directory whose name contains a control character cannot be backed up, and deleting it leaves jottad retrying a remote delete for ever with no client-side escape. Filed upstream as jotta-cli-issues#228. CLAUDE.md lists the five remedies that were tried and ruled out.

0.1

0.1

Choose a tag to compare

@svandragt svandragt released this 17 Aug 12:26

initial release