Skip to content

br v0.7.2

Choose a tag to compare

@Dicklesworthstone Dicklesworthstone released this 29 Sep 17:30
· 432 commits to main since this release

br 0.7.2 fixes a lockout in WAL-index recovery (#523) and makes br update report label changes (#527). The database schema is unchanged (19).

Damaged indexes no longer lock you out of recovery (#523)

A workspace whose WAL index needed rebuilding (the #507 poisoned index or the #521 stale index) and whose other indexes were already damaged could not be opened at all. Every command ran startup recovery, which checks a private copy for integrity before touching the live database; the old index damage failed that check, so recovery refused. br doctor migrate-schema recover refused the same way, and br doctor --repair and --repair-indexes refused because recovery had not run.

Recovery only rebuilds the WAL index and already proves the database and WAL bytes are unchanged, so any damage it finds was there before. When the check fails, recovery now also tries the index rebuild that --repair-indexes does, on another private copy. If that comes back clean with the schema and every row unchanged, the damage is only in the indexes:

  • br doctor migrate-schema recover restores access, reports the damage, and tells you to run br doctor --repair-indexes next.
  • Ordinary commands still refuse to run on indexes known to be broken, but the error now names those two commands.
  • Damage the rebuild does not clear keeps recovery closed, and the message says the damage is not confined to indexes.

If a table has lost a row that its indexes still point to, rebuilding the indexes would hide the loss. When the integrity check shows index entries with no matching row, recovery now says rows may have been lost from the table and asks you to check issues.jsonl for them before running --repair-indexes (the receipt sets index_corruption.index_entries_without_table_rows). No refusal changes the live database, and every attempt keeps the complete pre-recovery files under .beads/.br_recovery/. A failed recovery also no longer leaves .br-wal-index-* directories behind unless they hold evidence of the poisoned index.

If you are stuck in this state:

  1. Stop other br processes that use the workspace and copy .beads/ somewhere safe (cp -a .beads ../beads-backup).
  2. Run br doctor migrate-schema recover. If it says rows may have been lost, compare against issues.jsonl before going on.
  3. Run br doctor --repair-indexes, then br doctor.

Also in this release

  • br update prints the net label change, such as labels: +needs-review -triage, for --add-label, --remove-label and --set-labels. Before, a label change, a no-op and a mistyped label all printed the same thing (#527).
  • br doctor points integrity errors that name an index at br doctor --repair-indexes.

Full detail: CHANGELOG.md.

Assets

Seven archives (Linux GNU and musl on amd64/arm64, macOS amd64/arm64, Windows amd64 built with the GNU toolchain), each with a .sha256 sidecar and a Minisign signature from the br release key 36B847D11BA5A0D0, plus checksums.sha256 and SPDX/CycloneDX source SBOMs. Built with dsr on self-hosted machines; GitHub Actions were not used. Linux GNU binaries require glibc 2.28 or newer; the musl binaries are static.