oliver-zehentleitner / maity

ci: bash -n and shellcheck for tools/*.sh and hub/scripts/*.sh

Sign in to report

tsk-b3se789y683w Done Maity Coder Claude 004

Found in review A1642 (#2037): CI runs no bash -n and no shellcheck on the shell scripts (tools/run_slot.sh, hub/scripts/with_postgres.sh and the others), and two PR bodies wrongly said CI lint covered it. Add one CI step (in the existing lint job, cheap) that runs bash -n and shellcheck (pinned version, current findings baselined or fixed) on every tracked *.sh. Docs in context/process.md where CI checks are listed.

Notes

  1. Maity Test Team · Nov 30, 2026, 08:14 UTC

    deploy/scripts/test-backup-signing.sh, run end to end: PASS at both heads. No differences beyond time stamps and fingerprints.

    Environment: Linux box, gpg (GnuPG) 2.4.7, GNU tar 1.35, python3 with PyYAML (venv). No cluster. gpg-agent started fine. No gpg-agent of the run was left over after the script's trap.

    • PR #2292 head `dae9d0877`: exit 0, 47 lines, 45 ok, 0 FAIL, last line "all scenarios pass".
    • Baseline main `d6ce14742`: exit 0, 47 lines, 45 ok, 0 FAIL, last line "all scenarios pass".
    • Diff of the two outputs, with fingerprints taken out: only the two signed: maity-<timestamp>… lines differ, by their time stamp. The glob-helper change keeps every scenario and result as it was.

    Output at the PR head (fingerprints shortened):

    dae9d0877
    ok   unsigned: dump and tar written
    ok   unsigned: no signature
    ok   unsigned: the log warns
    ok   unsigned: the Job says so first thing
    ok   unsigned: the dump ok line says unsigned
    ok   signed: maity-20261130T081409Z.attachments.tar.gpg verifies with the signing key, under its own name
    ok   signed: maity-20261130T081409Z.dump.gpg verifies with the signing key, under its own name
    ok   signed: the dump ok line names the fingerprint
    ok   signed: no warning
    ok   signed: an orphaned signature is removed
    ok   signed: no .part left
    ok   signed: a changed file does not verify
    ok   passphrase: the Job fails before writing (cannot sign)
    ok   public-only: the Job fails before writing (cannot sign)
    ok   decrypting: the Job fails before writing (can also decrypt)
    ok   encryption-key: the Job fails before writing (can also decrypt)
    ok   same-key: the Job fails before writing (is the key in maity-backup-key)
    ok   two-keys: the Job fails before writing (holds more than one key)
    ok   restore/dump-own-name (restores, exit 0)
    ok   restore/dump-renamed (stops, exit 1)
    ok   restore/dump-second-signature (stops, exit 1)
    ok   restore/dump-second-signature: names the reason
    ok   restore/dump-renamed: names the reason
    ok   restore/attachments.tar-own-name (restores, exit 0)
    ok   restore/attachments.tar-renamed (stops, exit 1)
    ok   restore/attachments.tar-second-signature (stops, exit 1)
    ok   restore/attachments.tar-second-signature: names the reason
    ok   restore/attachments.tar-renamed: names the reason
    ok   restore/dump-unsigned (stops, exit 2)
    ok   restore/dump-unsigned-no-fingerprint (stops, exit 1)
    ok   restore/dump-unsigned-no-fingerprint: names the switch
    ok   restore/dump-unsigned-emergency (restores, exit 0)
    ok   restore/dump-unsigned-emergency: says so
    ok   restore/attachments.tar-unsigned (stops, exit 2)
    ok   restore/attachments.tar-unsigned-no-fingerprint (stops, exit 1)
    ok   restore/attachments.tar-unsigned-no-fingerprint: names the switch
    ok   restore/attachments.tar-unsigned-emergency (restores, exit 0)
    ok   restore/attachments.tar-unsigned-emergency: says so
    ok   restore/dump-revoked-key (stops, exit 1)
    ok   restore/dump-revoked-key: names the reason
    ok   restore/attachments.tar-revoked-key (stops, exit 1)
    ok   restore/attachments.tar-revoked-key: names the reason
    ok   setup run 1: the Secret gets only the new key (DD2C4F8A…)
    ok   setup run 2: the Secret gets only the new key (CBE248B3…)
    ok   setup: the second run made a new key
    all scenarios pass
  2. Maity Test Team · Nov 30, 2026, 08:44 UTC

    PR #2292 local black-box test at dae9d0877 (base b0fe483ec). Result: PASS. No hub, no browser, nothing on prod.

    • tsk-h4jdwqvpa2cx: workspace.listed() with a name holding a line break, a 300-character name and 3000 more names gives one line of 213 characters: the line break becomes ?, the long name is cut to 100, 20 names are shown, then "and 2983 more". _named() still escapes an ESC byte (a?[31m). Both supervisor prune log lines now use listed(); the hub note still carries only the count and <path>.
    • tsk-3jdm7gbxgtek: pr.sh open with origin https://alice:<secret>@github.com/a/b/c.git is refused, and the message prints the URL without the user and password.
    • tsk-hq56zjtmx55j: that same three-segment path is refused ("cannot read an owner and a repository"), not read as its last two segments. https://…@127.999.999.999/git/a/b is refused as a host ("cannot read a host"), so it is not taken for the loopback.
    • tsk-b3se789y683w: tools/test_shell_syntax.py (bash -n) passes locally. shellcheck isn't installed here. CI's changelog job, which runs the shellcheck step, is green on this head.
    • python3 -m unittest discover in tools/: 398 tests OK, 40 skipped (needs make or locales on this box).

    Not run: cli pytest (pytest isn't installed here; CI's cli jobs are green on this head). When I checked, hub-postgresql and one hub-sqlite job were still running.