Repository navigation
fix: support per-election ceremony boards in ballot audit - #4085
Merged
Findeton merged 1 commit intoOct 27, 2026
Merged
Conversation
|
Caution Review failedThe pull request is closed. Finishing Touches
Comment |
Findeton
marked this pull request as ready for review
October 27, 2026 03:27
Findeton
pushed a commit
that referenced
this pull request
Oct 27, 2026
…audit image (#4087) The audit image now restores the ImmuDB hot backups that the operator's backup job writes, and takes `--environment-slug` as one of its own options. ## Changes - `run-audit` restores ImmuDB only from hot backups (`immuadmin hot-backup`), one file per database, named `<database>.bkp` or `<database>_backup_<YYYYMMDD>_<HHMMSS>.bkp`. It starts an empty ImmuDB and restores each file with `immuadmin hot-restore` into a database of that name. `immudb.tar.gz` of the data directory is no longer accepted. - Each `.bkp` needs its digest in `backup-digests.txt`. The audit stops if there is no hot backup, if a file name is not a database name, if two files hold the same database, or if a restore fails. - `--environment-slug` is now an option of the image. Since #4085, `audit-tally` needs it for a tally of a keys ceremony of one election, and the image only accepted it after `--`. - The auditor manual and the tutorial describe the hot backups and the slug. The stale note that non-default ceremonies are not supported is replaced. ## Testing On a development VM, with backups converted to hot backups: - Three backup sets (single election, missing votes, several elections with `--environment-slug`): all exit 0. The results match the earlier tar.gz restore; the logs differ only in the restore lines and in the order of Braid's parallel log lines. - Refusal cases all exit 4 with their message: a `.bkp` without a digest, no `.bkp`, a corrupt `.bkp`, two files for one database, a file name that isn't a database name, and `immudb.tar.gz` only. Parent issue: sequentech/meta#14374 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Ballot audits now restore ImmuDB databases from individual `.bkp` hot-backup files. Each required database must have a valid, uniquely named backup and a matching digest. * Audits for elections using a separate keys ceremony now support an independently authenticated environment slug to identify the correct election. * **Bug Fixes** * An ImmuDB backup that cannot be restored now prevents audit mode from proceeding. * **Documentation** * Updated audit instructions, examples, and troubleshooting guidance to reflect the backup format and environment-slug requirements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
xalsina-sequent
added a commit
that referenced
this pull request
Oct 27, 2026
The README added in #4085 had no SPDX header, so the REUSE check fails on release/10.0. Parent issue: sequentech/meta#14597 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BelSequent
added a commit
that referenced
this pull request
Oct 30, 2026
Brings the ballot audit work (#3968, #4085, #4086, #4087), its docs (#4061, #4065, #4099) and C82's merged PR (#3599), which equals the C82 squash already here. Conflicts: packages/braid/src/bin/verify.rs and packages/braid/src/verify/verifier.rs, between C116 (meta-13960) and #3968. #3968 moved the checks into verify_messages(), added the expected-batches check and already makes `verify` fail when a check fails or is incomplete (ensure_complete). The resolution takes release's files and adds what C116 adds on top: the `--expected-cfg-hash` anchor (now a with_expected_cfg_hash() builder, like with_expected_batches(), checked in verify_messages()), the removal of the unused `--ballot-hash` option, reading every page of the board (get_all_messages) and skipping the configuration message by its kind. C116's VerificationOutcome is not kept: release's error does the same job, and C116's tests check only the exit status and output. C116's PR (step#3622) still conflicts with release/10.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parent issue: https://github.com/sequentech/meta/issues/14374
The ballot-audit exporter rejected every non-default keys ceremony, while audit-tally used the event board for both B3 and ImmuDB. Windmill puts a non-default ceremony on its election B3 board but keeps CastVote records in the event ImmuDB database. This made those completed tallies unusable with the audit preparation pipeline.
Resolve both names from the saved ceremony and complete event election inventory. Require an explicitly supplied deployment environment slug for non-default ceremonies, validate it against the event reference, and require one owned election. Keep the event database for electoral-log acquisition and pass the real election board to the exporter and Braid verifier. Preserve existing signatures, public-key pins, tally batches, local-only/read-only access restrictions, and default-board behavior. Record both board names and the slug in the plan.
Validation: 148 unit/file-based tests pass; the disposable PostgreSQL export integration test also passes with added non-default positive cases and missing-slug, wrong-slug and wrong-board negative cases. The regression test failed with the original guard before implementation. A private scoped diagnostic exercise completed all planned scope, signed-history and Braid steps; no production data or credentials are included in this PR. Diagnostic keys derived from the same source are not independent trust anchors.
Draft for review; no deployment or production mutation. Independent source authentication, historical eligibility and expected contest/area inventory remain operator responsibilities, documented in the package README.