Skip to content

sqsolve 1.2.2

Choose a tag to compare

@github-actions github-actions released this 26 Oct 16:16
· 12 commits to main since this release

Stabilization after the repository audit of 2026-10-25 (backup paths, job journal, audit log,
destructive jobs, durability, unique jobs, accessibility), checked on the test installation and
with Resolve (docs/acceptance/1.2.2.md).

  • Reference compose, tuned for TrueNAS: the image tag is 1, which every 1.x release moves, so
    TrueNAS offers "Update available" for every release, minor versions included; the image
    workflow publishes that tag (ADR 0027). x-portals and x-notes give the TrueNAS app a "Web
    UI" button to the panel and a notes card. The three host paths are written once (x-volumes)
    and TZ once. sqsolve-init runs with a read-only root file system and only the capabilities
    CHOWN, DAC_OVERRIDE, FOWNER and FSETID, without the image's health check; postgres
    runs without capabilities and its health check calls pg_isready itself instead of the Perl
    wrapper.
  • Backup paths are confined to the backups volume. A manifest is read only when it is a complete
    version 1 manifest (api/schemas/manifest.v1.json, SQS-B042) whose file is the base name of
    a .backup file; rebuilding the catalog also requires the manifest to name its own backup file
    and both to stay on the volume once symlinks are resolved. A catalog row whose path is absolute,
    contains .., is not a .backup under libraries/ or leaves the volume through a symlink is
    never read, verified, restored, downloaded or deleted (SQS-B043, 409 in the API), retention
    leaves it alone, and it is not rewritten: every start and every catalog check report such rows
    in one critical backup.path_invalid event, and after review sqsolve catalog forget <backup-id> removes the row without touching any file (SQS-B044,
    docs/runbooks/invalid-backup-path.md). A blocked backup does not count as verified for any
    safety rule: not as the latest verified backup, not toward the verified backups retention
    keeps, not for the guard on the newest usable one, and not as the final backup a purge needs.
  • The job journal is required. A step is stored before it runs, and when its row cannot be
    stored the step does not run (SQS-J040); a journal that changes no row, or fails, is
    SQS-J041, and the action it describes is not done. Restoring by replacing now also requires
    the journal of the copy being restored and the one written between the two renames
    (SQS-R059): without the second one the original database goes back under its name.
  • Audit log (ADR 0026 finished): every state change and disclosure was inventoried. Settings,
    pinning a backup, unlocking a user, turning the second factor on or off, and notification
    channels are now stored in one transaction with their entry; editing a library, changing a
    backup policy, adding a person, installing a panel certificate and cancelling a job write
    accepted before the change and their result after it; verifying a backup and rebuilding the
    catalog from the console write their entry with the job. Without the entry the action is not
    done (SQS-X040, 503 in the API); a result that cannot be written after the change is
    SQS-X041. Logins, logouts, refusals and what sqsolve does on its own stay best effort, but
    a failed entry is now logged instead of ignored, and a second-factor login no longer fails
    after completing the session when only its entry could not be written.
  • Purge and recreate no longer report a false success. Every PostgreSQL and SQLite call they
    depend on is checked: role and database lookups, credential storage, grants, the library state
    and the schedules. A purge journals what it is about to drop and records the purged library in
    one transaction; a recreate stops with SQS-R061 before creating the database when it cannot
    rebuild the access. When either fails after its irreversible step (SQS-L047, SQS-R060), the
    job fails and stays pending reconciliation, and the next start finishes the purge or adopts the
    restored database; backups are always kept. A drop of the trash database that reports a
    failure may still have happened on the server, so it leaves the purge pending too.
  • Changing a password closes the user's other sessions in the same transaction as the new
    password and its audit entry: if they cannot be closed, the password does not change.
  • Deleting a backup records it deleted only once the removal of its files is durable: a folder
    that cannot be synced makes the deletion fail and leaves the row, and a retry syncs it again;
    retention removes the row of an old failed backup the same way. The power-loss model of the
    file helpers covers the removal.
  • A unique job is its type, its library and its parameters (ADR 0028): a second recreate or
    revert, or a second automatic purge of expired trash, with the same parameters gets the queued
    job, and one with different parameters (for example another backup) is refused with
    SQS-J005 (409 in the API) instead of silently getting the job of the first request. Backups
    keep "the first request wins".
  • sqsolve-init checks the mode an existing secret, a TLS key or a folder that holds secrets has
    after it sets it: a volume whose ACL keeps a wider mode (TrueNAS datasets with inherited NFSv4 entries, which
    can also give other users access to the secrets) stops it with SQS-C085 ... it stays 0700
    instead of printing done and leaving sqsolve to fail with SQS-C010. Found when updating
    the test installation from 1.1; docs/12-deployment.md ("Permissions and ACLs") says how to
    strip the ACL.
  • Found while raising coverage: creating a library or restoring a backup as a new one with the
    audit log down left a provisioning row, so the same request then failed with SQS-L004;
    nothing is left now. A schedule whose date never comes (31 February) is refused with
    SQS-J020 when the policy is saved, instead of failing without a code after storing it.
    GET /api/v1/libraries/{id}/backup-policy answers 404 SQS-L002 for an unknown library. The
    recovery form of the setup wizard now shows why a recovery was refused (a wrong code or key
    sent you back to the form without a word); a schedule expression typed for the default policy
    is checked also in activity mode (a default policy saved by 1.2.1 with an expression that had
    no effect still gives new libraries their policy and schedule); an unknown maintenance action is SQS-C041.
  • Tests: statement coverage of internal/ rises from 70.6 % to 87.1 % (docs/16-testing.md),
    with handler tests for every API route and most panel forms, and fault tests for recovery,
    system jobs, PostgreSQL failures and audit failures.
  • The identifier suggested for a name that does not start with a letter now starts with
    library_ (it was the Spanish biblioteca_), as the panel already suggested while typing.
  • Panel: notices are one block of text next to their shape again, so a long list (for
    example the open connections on the restore page) wraps inside the card instead of turning
    each address into a column that overflows it. Every control takes taps on at least 44 x 44 px
    at every width: buttons, small buttons, "Sign out", the account link and the badges of the
    top bar keep their look with an invisible area around them; sidebar links, tabs and fields
    are 44 px tall. On a phone the top bar no longer grows on short pages.
  • Documentation: the restore and delete screens and the mobile navigation in docs/09 now say
    what the panel does (no reauthentication, ADR 0021; a top bar with a row of sections, no
    dropdown and no bottom actions).
  • The replace and revert pages always ask to close the project in Resolve on every workstation
    first. Checked with Resolve 21.1.1 on Linux: Resolve shows nothing when its sessions are
    closed, reconnects on its own, its next save writes its pending changes into the restored
    library, and the open project can keep showing the previous state until it is reopened.

Upgrade: take a control-plane backup, then change the image tag to 1 once (user guide,
"Updating"); on TrueNAS it appears three times in the stored YAML. Pasting the new file instead
needs your paths, TZ and user again. There is no SQLite migration. If sqsolve-init stops with
SQS-C085 (or sqsolve with SQS-C010), the volume has an ACL wider than the file modes: strip
it as docs/12-deployment.md ("Permissions and ACLs") says. A critical backup.path_invalid
event at the first start lists catalog rows whose path is refused:
docs/runbooks/invalid-backup-path.md.

Rollback: image 1.2.1; there is no schema change. Roll back only when Activity shows no
"reconciliation pending" warning, and keep the control-plane backup: a rollback must not discard
catalog or audit entries written by 1.2.2.