bewaking-7429e096-f185

job succeeded

starting new job...


→ running command: cd "/etc/byggsteg/job-clone//bewaking/trunk" && git reset --hard && git pull

HEAD is now at 5fa3126 docs: Update README
From https://codeberg.org/jjba23/bewaking
   5fa3126..87be1b7  trunk      -> origin/trunk
Updating 5fa3126..87be1b7
Fast-forward
 default.nix | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 flake.lock  | 45 ++++++++++++++++++++++++++++++++++
 flake.nix   | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 202 insertions(+)
 create mode 100644 default.nix
 create mode 100644 flake.lock
 create mode 100644 flake.nix

→ running command: cd /etc/byggsteg/job-clone/bewaking/trunk && uname -a

Linux wolk-jjba 7.1.5-gnu #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux

→ running command: cd /etc/byggsteg/job-clone/bewaking/trunk && git log --name-status HEAD^..HEAD

commit 87be1b7466403ee1f626e401ba8942938e5ee847
Author: Josep Bigorra <jjbigorra@gmail.com>
Date:   Fri Oct 23 14:42:54 2026 +0200

    feat: Add Nix packaging
    
    Add default.nix and flake.nix, so the checkout builds with `nix build' and
    opens a development shell with `nix develop', without waiting for a
    release to be packaged elsewhere.
    
    default.nix is the derivation of the `guile-bewaking' package in nixpkgs
    -- same phases, same layout under $out -- but it builds the working tree
    rather than a pinned tag, so a packaging break shows up here first.  The
    flake exposes it as both `.#guile-bewaking' and `.#default'.
    
    guile-uuid has no package in nixpkgs yet, so the flake takes it from the
    branch of the jjba23/nixpkgs fork that adds one, through an overlay; the
    comment there names what to drop once it is merged.
    
    The version is written by hand in default.nix: bump it with the tag.
    
    🤖 Generated with [ECA](https://eca.dev) (deepseek/deepseek-flash)
    
    Co-Authored-By: eca-agent <git@eca.dev>

A       default.nix
A       flake.lock
A       flake.nix

→ running command: cd /etc/byggsteg/job-clone/bewaking/trunk && maak test


scanning directories for unit tests...
scanning present working directory for unit tests...

shuffled the files with seed 209905258 (replay with VERITAS_SEED=209905258)

found unit tests: (password-spec.scm cli-spec.scm bewaking-spec.scm web-spec.scm crypto-spec.scm)


running unit tests from file: password-spec.scm, entrypoint: spec


ℹ️ info - shuffled with seed 209905258 (replay with VERITAS_SEED=209905258)
+----------------------------------------------+
[📑 suite] Password entropy
  [🧪 test] password-entropy
    [⚙️ assert] eight lowercase letters are ~37.6 bits
    ✅ got: #t
    [⚙️ assert] adding a character class increases the entropy
    ✅ got: #t
    [⚙️ assert] an empty password has zero entropy
    ✅ got: 0
+----------------------------------------------+
[📑 suite] Password character classes
  [🧪 test] password-character-classes
    [⚙️ assert] an empty password has no classes
    ✅ got: ()
    [⚙️ assert] lowercase letters only
    ✅ got: (lowercase)
    [⚙️ assert] digits only
    ✅ got: (digit)
    [⚙️ assert] uppercase letters only
    ✅ got: (uppercase)
    [⚙️ assert] all four classes are detected
    ✅ got: (lowercase uppercase digit symbol)
+----------------------------------------------+
[📑 suite] Password generation
  [🧪 test] generate-strong-password
    [⚙️ assert] symbols can be excluded
    ✅ got: (lowercase uppercase digit)
    [⚙️ assert] length is respected
    ✅ got: 32
    [⚙️ assert] too-short a request raises an error
    ✅ success catching error: misc-error: (#f ~A (generate-strong-password: length must be at least 4 to cover every character class.) #f)
    [⚙️ assert] default generated passwords use every class
    ✅ got: (lowercase uppercase digit symbol)
+----------------------------------------------+
[📑 suite] Password strength
  [🧪 test] password-strength
    [⚙️ assert] sequential runs are flagged in the feedback
    ✅ got: #t
    [⚙️ assert] common passwords get a specific warning
    ✅ got: #t
  [🧪 test] strong-password?
    [⚙️ assert] a short mixed password is not strong
    ✅ got: #f
    [⚙️ assert] min-score lowers the bar
    ✅ got: #t
    [⚙️ assert] a common word is not strong
    ✅ got: #f
    [⚙️ assert] a long passphrase is strong
    ✅ got: #t
ℹ️ info - ran 4 tasks in: 0 seconds, 3914 microseconds

running unit tests from file: cli-spec.scm, entrypoint: spec


ℹ️ info - shuffled with seed 209905258 (replay with VERITAS_SEED=209905258)
+----------------------------------------------+
[📑 suite] CLI password commands
  [🧪 test] password generate
    [⚙️ assert] the requested length is honoured
    ✅ got: 32
    [⚙️ assert] generation exits successfully
    ✅ got: 0
    [⚙️ assert] symbols are excluded on request
    ✅ got: (lowercase uppercase digit)
  [🧪 test] password strength
    [⚙️ assert] strength exits successfully
    ✅ got: 0
    [⚙️ assert] a common password is reported weak
    ✅ got: #t
+----------------------------------------------+
[📑 suite] CLI rotation metadata
  [🧪 test] expiry is sealed into tokens and enforced
    [⚙️ assert] --max-age-seconds accepts fresh data
    ✅ got: #t
    [⚙️ assert] --allow-expired opens it anyway
    ✅ got: #t
    [⚙️ assert] --ttl-seconds and --expires-at conflict
    ✅ got: #t
    [⚙️ assert] an expired token exits with 1
    ✅ got: #t
  [🧪 test] token inspect audits the header without keys
    [⚙️ assert] inspect reports version, key id and expiry
    ✅ got: #t
    [⚙️ assert] inspect rejects a non-envelope token
    ✅ got: #t
    [⚙️ assert] inspect reports an expired envelope
    ✅ got: #t
+----------------------------------------------+
[📑 suite] CLI token commands
  [🧪 test] key id and keyring rotation
    [⚙️ assert] a keyring round-trips and rejects the wrong key
    ✅ got: #t
  [🧪 test] token round-trip
    [⚙️ assert] generate then decrypt preserves the payload
    ✅ got: #t
  [🧪 test] wrong keys are rejected
    [⚙️ assert] a wrong signing key exits with 1
    ✅ got: #t
+----------------------------------------------+
[📑 suite] CLI dispatch
  [🧪 test] help and exit codes
    [⚙️ assert] a token subcommand is required
    ✅ got: 1
    [⚙️ assert] help exits successfully
    ✅ got: 0
    [⚙️ assert] decrypting without keys fails
    ✅ got: 1
    [⚙️ assert] help lists the token inspect command
    ✅ got: #t
    [⚙️ assert] help documents the keyring option
    ✅ got: #t
    [⚙️ assert] help documents the rotation metadata options
    ✅ got: #t
    [⚙️ assert] an unknown command exits with 1
    ✅ got: 1
    [⚙️ assert] help lists the token generate command
    ✅ got: #t
    [⚙️ assert] help prints the usage banner
    ✅ got: #t
    [⚙️ assert] version exits successfully
    ✅ got: 0
+----------------------------------------------+
[📑 suite] CLI key derivation and dropped formats
  [🧪 test] a refusal does not reveal which key ids the keyring configures
    [⚙️ assert] an unknown key id and an edited body give the same message and exit code
    ✅ got: #t
  [🧪 test] envelopes of dropped formats are refused
    [⚙️ assert] an empty token is refused
    ✅ got: #t
    [⚙️ assert] a BWK1 token cannot be decrypted or inspected
    ✅ got: #t
    [⚙️ assert] a BWK2 token cannot be decrypted or inspected
    ✅ got: #t
  [🧪 test] the key derivation is chosen when sealing and read back when opening
    [⚙️ assert] a KDF parameter without --kdf is refused
    ✅ got: #t
    [⚙️ assert] an Argon2id token round-trips through the CLI
    ✅ got: #t
  [🧪 test] tampering and missing arguments are refused
    [⚙️ assert] sealing an object without keys exits with 1
    ✅ got: #t
    [⚙️ assert] generating without an owner id exits with 1
    ✅ got: #t
    [⚙️ assert] an edited token exits with 1
    ✅ got: #t
+----------------------------------------------+
[📑 suite] CLI object commands
  [🧪 test] object expiry policy
    [⚙️ assert] an object sealed with a past expiry is refused
    ✅ got: #t
  [🧪 test] object round-trip
    [⚙️ assert] object encrypt then decrypt round-trips a datum
    ✅ got: #t
ℹ️ info - ran 6 tasks in: 0 seconds, 10079 microseconds

running unit tests from file: bewaking-spec.scm, entrypoint: spec


owner-details: ((id . "444959d3-7a8e-455e-b608-31e35145a2fa") (email . "someone@jointhefreeworld.org") (name . "Legolas son of Thandruil") (permissions byggsteg:modify-permissions byggsteg:job-create byggsteg:job-delete byggsteg:profile-create byggsteg:profile-delete byggsteg:user-create byggsteg:user-delete))

generate-token: BWK3.default.1792759546.-.0130f637f97363708e9db75c03e4ecb5ae155206fadcc021f51b7f9e4cd4ca0d60625f4246c4f3dba98f45ac52f806610dae04f8887bfe851dc98e4e998a624e22c2598c4f5141ecc62a185f0ad7e87ce12ba83d089d11d5530abc0f69af2632ec70e7ff74bf855005f4638513f35c63cbbdf291cd34bf6a13535ccb88491491ee3c236fce9b4cb87394579ba6c64016a6f595e8d7782bb898f3a7c4328cf23712c610ac2479a63387c4c429da9d6dc911faa432c6eac638b4abc30ded5f86624bb4e04932f2e35c965b58a2d57abee94bb5578b587ad1dbc1f4dc23a19f7a57d4574b00e867d37d98db9010da66f9bcdc82dc4e04ec58d71b7a704c3415ee25fcffc2e599764e1b2692f42fb16fdab08795f819cf613405738badf6bef972b9ee27075c8178ab58f18b22f9e656878d3c1f3a3500dc1aa77632138b90bdf28b25c88cd1968a4f9beb31c0f0b264989f3eaf31cf6355bb984d7fc9cbfe69b1629c83ec13eacb17abfe32b6fdb202a599d9b68ec44d58b4fb94788a3a5fc933906834a60346ea4fd2f4c9fa5c609cc720213896b93dec111d970b8edb2cac7c070ff502b9820d288eab9bdc1d05bc4d296645f775ba2e87f7f3fe22d8b8d968fe70510c78a121a73e7181aef9fc0bf9730b2a537a35cbf62d459a9018725715a15921703c4a12ba0d2cf74ef0a4f647821ceae0d66075b4ee0aebd6420445a7c1efd173092883c23dea6e35312f5f7cb1cc265c8ffdc0ddf8b5fa7c8b9e126647ac588e1b95d8b3f0b2ace5d3f377cf26701d803fc5bbe6aae6a3240569be31d6dcdd66e88226b9fd2b2fc24e5437ed6cca8d786e06916867eb4117601a66dedd4eddd001c72b401e196cf6198356a2078075454d56085c280ac0dd003bebe0dda9b8bdbec98c5e77a9c3fdaffac669a5214a2b43fa7c233e3ca07c6f0a21c981466de4591008e289ceebbe1e1dfb379a15fe88a880fbde56ac066cfeee10a6ce93e2576faed177533951cbfe10c1c2de0686459b8a017d66ec525c51be23ad19839372756901a5a23df66b355e24a5d603eb60a0b1b756058f75b1b40cfcc7ea6184f29fc8fb6d3ede0a17cec62bc86e58b396abaae1de96dab4b9a8f0d4b1414586c7274b172b58969f0c809186017c8fc6b2d3e0d53a44bb32898ee897c093c634f2c6cce8e1db5dcb88fe304abc8eade901edcd1e5939a0029e2e4563e52440e2b71ceb160bf91248b90bce1c3e5e9c5bdeb18bfcb8c5b238cb1484d8d23f5688a6e833f5c162d684e4f6124a19ec4fc910b65b64624f01
error decrypting token: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting token: misc-error: (#f ~A (open-envelope: not a bewaking envelope (expected BWK3).) #f)
owner-details: ((id . "444959d3-7a8e-455e-b608-31e35145a2fa") (email . "someone@jointhefreeworld.org") (name . "Legolas son of Thandruil") (permissions byggsteg:modify-permissions byggsteg:job-create byggsteg:job-delete byggsteg:profile-create byggsteg:profile-delete byggsteg:user-create byggsteg:user-delete))

generate-token: BWK3.default.1792759546.-.01c547fddfdb369f5760e36738eb2320cad72be47f2bc226f5bfb2b22b822482cbeda701b1fb8e563c1b0b960a4afb1a061c20876d6a024c6ffc7f4db307afb9b0c3f8c662c92c572a350f415465cae203c66c6fcf2258785af1ffa2b61c6ea460ce57d3020bcd3366859caf425f2c2a5ef637a0b23f71466e699627cbe6d31b39a3975f4f62faf6a575720ef442e1c60b5a5bc0e2c8c87eefec41cd53ed6dcc20024e8051d69d3b11f209ae2f10c9243f4adadc88230793dd21e0333759ee4559950a401e7d3d925424ec9c85ee17c8ee6d9651dd7b02218f8ff74919eb641f3400fba57dbc383533901e09972addddd4e779449ea0f479a59c57738735c346db9fff8fdedd06632d18b422f16f372532789ffec2782a71b3498abf13f692b8c5a9ba7f25499a433afb568734cc72ce78db989e8693b954a13271910f5de101c9fa18ba553a43806992d357482565869579ef26ac15f4f2246da27949d2b3427e535738df4d1f4491f7131ba835beab676e8f8e9cc58f9bd31cd6a0929b397745d201a162c4447afdbef16f8d9b64bb879855073f2c4e7c9b6f62cd6f2ae057d4a2dc99942a73c560152081fe8b4df4d0c5c887d96caa304512a734c2864006b4c914b70e45c13fc35d9dce20ef95490bbfd21fc8a0284d1fad1c60bcb215dfa2a57e57ebde2ca76204013f7da43b60d305992e597a1b50c59c1387e3b481f439172bab20cc42ec47c72b20a9b7c78b219e852b7e713fc1d66050ae038d76a7bc950f6bbfb7770df696f7e14028fc670a227d25f50b5f83640f8474fe7b06895915af6f018bece4e9b84d41672b7a994820d2366d41c4ba72bde4dfe7a5139242ff52c4087af033b6f10c93bc1969eecab8b00ad1279135577a629ce2385eeee8136e46f69a2ce9e33ddaf1edc9c7b1812c1392f4d827780ad14627fabfb9d0dfb86f24dd76a5ba4cd1c5d1ee632b0e3a0b42a1f5ee7027ce2aae0da3e1d576fb14e7c3373aa9a4661db2b0c65e88a349ffa8710108ec4fed70d17151b65ba924e58a685d8359f3a7f220a2da0c2ec45ceb04bcb3f9d68d7f9c7893a237ef8d621995d9df3b5503af197efc6cf23d858abc7a81afe394a89c3f73a5d8e0bbf371081922da9f81cb13ff4e3ee06d4eb49008eabfbbb091b72ae5a6d14df1550afda6b073dba8f395fba2e5c10a3fc6df10bab8c457f7af87af4762d23049dca103d128cc22f3083f840a530b7fc96a87232ba1bbda9e52f858540cc43076435fcc4df6cff8a85735ad33be1fbe5caa814349abc3bd32ad095b

decoded: ((token-type . bewaking-token) (token-id . df44a682-1564-40b2-a20d-0dc85d4c2f97) (token-created-at . 1792759546) (token-expires-at . 1793364346) (owner-id . 444959d3-7a8e-455e-b608-31e35145a2fa) (owner-email . someone@jointhefreeworld.org) (owner-name . Legolas son of Thandruil) (owner-permissions byggsteg:modify-permissions byggsteg:job-create byggsteg:job-delete byggsteg:profile-create byggsteg:profile-delete byggsteg:user-create byggsteg:user-delete))
error decrypting object: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting token: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting object: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting token: misc-error: (#f ~A (open-envelope: not a bewaking envelope (expected BWK3).) #f)error decrypting object: misc-error: (#f ~A (open-envelope: not a bewaking envelope (expected BWK3).) #f)error decrypting token: misc-error: (#f ~A (open-envelope: not a bewaking envelope (expected BWK3).) #f)error decrypting object: misc-error: (#f ~A (open-envelope: not a bewaking envelope (expected BWK3).) #f)error decrypting object: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting object: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting token: misc-error: (#f ~A (open-envelope: the sealed data expired at 1000 (key 'default').) #f)error decrypting object: misc-error: (#f ~A (open-envelope: the sealed data expired at 1000 (key 'default').) #f)
ℹ️ info - shuffled with seed 209905258 (replay with VERITAS_SEED=209905258)
+----------------------------------------------+
[📑 suite] Permissions
  [🧪 test] has-needed-permissions?
    ✅ got: #t
    ✅ got: #f
    ✅ got: #f
    ✅ got: #f
    ✅ got: #t
    ✅ got: #f
    ✅ got: #t
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Envelope metadata (key id, created-at, expiry)
  [🧪 test] expired tokens and objects are refused
    [⚙️ assert] a token sealed with a past expiry is refused
    ✅ got: #t
    [⚙️ assert] an object sealed with a past expiry is refused
    ✅ got: #t
    [⚙️ assert] expiry auditing ignores non-envelopes
    ✅ got: #f
  [🧪 test] ttl-seconds records an absolute expiry
    [⚙️ assert] expires-at is created-at plus the ttl
    ✅ got: 4600
    [⚙️ assert] the envelope is expired after its expiry
    ✅ got: #t
    [⚙️ assert] created-at is the requested timestamp
    ✅ got: 1000
    [⚙️ assert] the envelope is live before its expiry
    ✅ got: #f
  [🧪 test] keyring validity windows enforce rotation
    [⚙️ assert] a key inside its window seals and opens
    ✅ got: #t
    [⚙️ assert] a key before not-before cannot seal data
    ✅ got: #t
    [⚙️ assert] no keyring is needed to read metadata
    ✅ got: #t
    [⚙️ assert] a key past not-after cannot open data
    ✅ got: #t
  [🧪 test] the metadata is authenticated
    [⚙️ assert] removing the expiry marker breaks the tag
    ✅ got: #t
    [⚙️ assert] extending the expiry in the envelope breaks the tag
    ✅ got: #t
    [⚙️ assert] editing the body breaks the tag
    ✅ got: #t
    [⚙️ assert] backdating created-at breaks the tag
    ✅ got: #t
    [⚙️ assert] editing created-at in a BWK3 envelope breaks its tag
    ✅ got: #t
    [⚙️ assert] editing the key id breaks the tag
    ✅ got: #t
    [⚙️ assert] relabelling the version is refused
    ✅ got: #t
  [🧪 test] a malformed envelope is rejected
    [⚙️ assert] sealing without a signing key is refused
    ✅ got: #t
    [⚙️ assert] an empty key id is refused
    ✅ got: #t
    [⚙️ assert] a non-numeric created-at is refused
    ✅ got: #t
    [⚙️ assert] sealing a non-string plaintext is refused
    ✅ got: #t
    [⚙️ assert] a missing body is refused
    ✅ got: #t
    [⚙️ assert] a truncated body is refused
    ✅ got: #t
    [⚙️ assert] a body that is not hexadecimal is refused
    ✅ got: #t
  [🧪 test] metadata is reported without any key
    [⚙️ assert] an envelope of a dropped format reports no metadata
    ✅ got: #f
    [⚙️ assert] the key id is reported
    ✅ got: default
    [⚙️ assert] the format version is reported
    ✅ got: BWK3
    [⚙️ assert] there is no expiry unless one was requested
    ✅ got: #f
    [⚙️ assert] a malformed BWK3 envelope reports no metadata
    ✅ got: #f
    [⚙️ assert] created-at is a Unix timestamp
    ✅ got: #t
    [⚙️ assert] metadata is only read from envelopes
    ✅ got: #f
  [🧪 test] invalid sealing options are rejected
    [⚙️ assert] expires-at and ttl-seconds are mutually exclusive
    ✅ got: #t
    [⚙️ assert] a key id containing a dot is rejected
    ✅ got: #t
    [⚙️ assert] a non-integer ttl-seconds is rejected
    ✅ got: #t
  [🧪 test] expiry is enforced when opening
    [⚙️ assert] max-age-seconds enforces a rotation policy
    ✅ got: #t
    [⚙️ assert] enforce-expiry? #f still opens it
    ✅ got: ttl payload
    [⚙️ assert] an expired envelope is refused
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Lossless Token Decryption
  [🧪 test] lossless-token
    [⚙️ assert] works properly with correct details
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Token validity helpers
  [🧪 test] token-remaining-seconds and token-valid?
    [⚙️ assert] a freshly generated token is not expired
    ✅ got: #f
    [⚙️ assert] a missing expiry raises an error
    ✅ success catching error: misc-error: (#f token-remaining-seconds: Token is invalid. Missing or malformed 'token-expires-at' () #f)
    [⚙️ assert] remaining seconds is positive for a live token
    ✅ got: #t
    [⚙️ assert] remaining seconds is negative for an expired token
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Sealed envelope (versioned, authenticated)
  [🧪 test] editing a genuine envelope never yields a plaintext
    [⚙️ assert] and every mutation of a real sealed object too
    ✅ got: #t
    [⚙️ assert] every single-digit mutation of a real envelope is refused
    ✅ got: #t
  [🧪 test] key rotation with a keyring
    [⚙️ assert] a keyring seals and opens by key id
    ✅ got: #t
  [🧪 test] no reader is left for the earlier formats
    [⚙️ assert] a BWK2 token is refused even with the keys that sealed it
    ✅ got: #f
    [⚙️ assert] no metadata is read out of a BWK1 envelope
    ✅ got: #f
    [⚙️ assert] no metadata is read out of a BWK2 envelope
    ✅ got: #f
    [⚙️ assert] a BWK1 object is refused likewise
    ✅ got: #f
    [⚙️ assert] an unreadable envelope is never reported as live
    ✅ got: #f
    [⚙️ assert] a BWK2 envelope with no expiry is not recognised
    ✅ got: #f
    [⚙️ assert] a BWK2 envelope is not recognised
    ✅ got: #f
    [⚙️ assert] a BWK1 envelope is not recognised
    ✅ got: #f
  [🧪 test] the requested key id is embedded in generated tokens
    [⚙️ assert] the token carries the key id
    ✅ got: #t
  [🧪 test] tokens and objects are envelopes and reject tampering
    [⚙️ assert] sealed objects are enveloped
    ✅ got: #t
    [⚙️ assert] a tampered object is rejected
    ✅ got: #t
    [⚙️ assert] generated tokens are enveloped
    ✅ got: #t
    [⚙️ assert] a tampered token is rejected
    ✅ got: #t
  [🧪 test] data that is not a BWK3 envelope is refused
    [⚙️ assert] arbitrary text is not an envelope
    ✅ got: #f
    [⚙️ assert] an unsupported version raises rather than being guessed at
    ✅ got: #t
    [⚙️ assert] a pre-versioning bare Base16 token is refused
    ✅ got: #f
    [⚙️ assert] a bare Base16 object is refused
    ✅ got: #f
    [⚙️ assert] recognition is a version-tag check, not a structure check
    ✅ got: #t
    [⚙️ assert] a BWK3 envelope carrying an extra MAC field is refused
    ✅ got: #t
    [⚙️ assert] an unknown envelope version is not recognised
    ✅ got: #f
    [⚙️ assert] a truncated envelope is refused when it is opened
    ✅ got: #t
  [🧪 test] a refusal never says which key id the keyring configures
    [⚙️ assert] nor does it carry any key material
    ✅ got: #f
    [⚙️ assert] an unknown key id and a tampered body fail identically
    ✅ got: (misc-error #f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)
    [⚙️ assert] an expired genuine envelope is still told apart, since it authenticated first
    ✅ got: #f
    [⚙️ assert] the refusal is a refusal, not an accidental success
    ✅ got: #t
    [⚙️ assert] and it does not name a configured key id either
    ✅ got: #f
    [⚙️ assert] a key that is not active yet fails identically
    ✅ got: (misc-error #f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)
    [⚙️ assert] a keyring with no matching entry fails identically
    ✅ got: (misc-error #f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)
    [⚙️ assert] a retired key fails identically
    ✅ got: (misc-error #f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)
    [⚙️ assert] the refusal does not name the key id it could not resolve
    ✅ got: #f
  [🧪 test] seal-envelope and open-envelope
    [⚙️ assert] the module exposes the current format version
    ✅ got: BWK3
    [⚙️ assert] the envelope starts with the version tag
    ✅ got: #t
    [⚙️ assert] a wrong signing key fails the cipher check
    ✅ got: #t
    [⚙️ assert] the plaintext round-trips
    ✅ got: top secret payload
    [⚙️ assert] a tampered envelope fails the integrity check
    ✅ got: #t
    [⚙️ assert] passing a MAC key to open-envelope is refused, not ignored
    ✅ got: #t
    [⚙️ assert] the result is a versioned envelope
    ✅ got: #t
    [⚙️ assert] BWK3 is the only version produced and read
    ✅ got: (BWK3)
  [🧪 test] the same plaintext never seals to the same value
    [⚙️ assert] a fresh salt and nonce make each envelope unique
    ✅ got: #t
    [⚙️ assert] equal objects seal to different strings
    ✅ got: #f
  [🧪 test] knowing the format is not knowing the plaintext
    [⚙️ assert] the public metadata is exactly what is authenticated
    ✅ got: (version key-id created-at expires-at)
    [⚙️ assert] the format is not hidden, only the content is
    ✅ got: #t
    [⚙️ assert] the plaintext, its Base16 and its Base64 do not appear in the envelope
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Token expiry
  [🧪 test] is-token-expired?
    [⚙️ assert] a token whose expiry is in the future is not expired
    ✅ got: #f
    [⚙️ assert] a malformed token-expires-at raises an error
    ✅ success catching error: misc-error: (#f is-token-expired?: Token is invalid. Missing or malformed 'token-expires-at' () #f)
    [⚙️ assert] a token whose expiry is in the past is expired
    ✅ got: #t
    [⚙️ assert] a far-future token is not expired
    ✅ got: #f
    [⚙️ assert] a missing token-expires-at raises an error
    ✅ success catching error: misc-error: (#f is-token-expired?: Token is invalid. Missing or malformed 'token-expires-at' () #f)
+----------------------------------------------+
[📑 suite] Garbling and Ungarbling
  [🧪 test] garble-ungarble
    ✅ got: dlrow olleh
    ✅ got: row
    ✅ got: dlrow
    ✅ got: lrow
    ✅ got: hello world
    ✅ got: meu12izgbtt3d51xd7onnioycmk9wv8wabua6wjwdptdueqdsbkqvq67h8obtdmt24tvn7q240v92c3jseqizn43bb0la3qhrl2y1toj4e22verl42mi800s2wdap1lz
    ✅ got: w
    ✅ got: ow
+----------------------------------------------+
[📑 suite] Decryption
  [🧪 test] decrypt-token
    [⚙️ assert] fails gracefully when token is not valid
    ✅ got: #f
    [⚙️ assert] fails gracefully when signing key is not valid
    ✅ got: #f
    [⚙️ assert] works properly with valid token
    ✅ got: #t
+----------------------------------------------+
[📑 suite] generate-token
  [🧪 test] works properly with correct details
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Generic object encryption
  [🧪 test] encrypt-object and decrypt-object
    [⚙️ assert] fails gracefully with a wrong signing key
    ✅ got: #f
    [⚙️ assert] round-trips a plain string payload
    ✅ got: just a string
    [⚙️ assert] round-trips a list payload
    ✅ got: (1 2 3)
    [⚙️ assert] round-trips a number payload
    ✅ got: 1234
  [🧪 test] decrypted data is data, never code
    [⚙️ assert] a sealed payload that looks like code stays a string
    ✅ got: #.(+ 1 2)
    [⚙️ assert] Guile refuses the #. read-eval syntax
    ✅ got: #t
ℹ️ info - ran 10 tasks in: 0 seconds, 21135 microseconds

running unit tests from file: web-spec.scm, entrypoint: spec

error decrypting token: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting token: misc-error: (#f ~A (bewaking: malformed BWK3 envelope (created-at)) #f)error decrypting token: misc-error: (#f ~A (open-envelope: not a bewaking envelope (expected BWK3).) #f)error decrypting token: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting object: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting token: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)error decrypting token: misc-error: (#f ~A (bewaking: the sealed data could not be opened: unknown, retired or wrong key, or the data was altered.) #f)
ℹ️ info - shuffled with seed 209905258 (replay with VERITAS_SEED=209905258)
+----------------------------------------------+
[📑 suite] Web chapter: keys, rotation and revocation
  [🧪 test] rotation needs no downtime and no forced logout
    [⚙️ assert] and so does a new one
    ✅ got: #t
    [⚙️ assert] the key id is embedded in the envelope
    ✅ got: #t
    [⚙️ assert] new logins are sealed with the current key
    ✅ got: #t
    [⚙️ assert] an old token still opens: nothing to migrate
    ✅ got: #t
  [🧪 test] retiring a key logs every session sealed with it out at once
    [⚙️ assert] the current key keeps working
    ✅ got: #t
    [⚙️ assert] the retired key id stops opening sessions
    ✅ got: #f
  [🧪 test] keys stay secret and distinct, which is the whole requirement
    [⚙️ assert] swapping the two keys does not open the session
    ✅ got: #f
    [⚙️ assert] nor does the signing key
    ✅ got: #f
    [⚙️ assert] the encryption key does not appear in the token
    ✅ got: #f
+----------------------------------------------+
[📑 suite] Web chapter: protecting a route
  [🧪 test] an expired session is refused, and sign-out clears the cookie
    [⚙️ assert] and the helper returns #f for it
    ✅ got: #f
    [⚙️ assert] sign-out deletes the cookie, the only cleanup there is
    ✅ got: 
    [⚙️ assert] the deletion cookie expires immediately
    ✅ got: 0
    [⚙️ assert] sign-out redirects to the login page
    ✅ got: 302
    [⚙️ assert] a token whose payload lifetime has passed is refused
    ✅ got: 302
  [🧪 test] a permission that was never granted is refused on the server
    [⚙️ assert] the browser route refuses a route the user may not use
    ✅ got: 302
    [⚙️ assert] the helper returns #f, not a partially authorized payload
    ✅ got: #f
    [⚙️ assert] the API route answers 401 rather than 403-by-omission
    ✅ got: 401
    [⚙️ assert] a route needing nothing is open to a valid session
    ✅ got: #t
    [⚙️ assert] the permission the user does have is enough
    ✅ got: #t
  [🧪 test] the same session works as an API bearer token
    [⚙️ assert] the granted permissions are what the token says
    ✅ got: (read-only access-files)
    [⚙️ assert] the API route admits the header token
    ✅ got: 200
    [⚙️ assert] the token identifies the caller without a database round-trip
    ✅ got: u-1
  [🧪 test] every failure mode is a refusal, never an admission
    [⚙️ assert] a request with no cookie is redirected to /login
    ✅ got: 302
    [⚙️ assert] a keyring that cannot resolve the key id is refused
    ✅ got: 302
    [⚙️ assert] an empty cookie is refused
    ✅ got: 302
    [⚙️ assert] a tampered cookie is refused
    ✅ got: 302
    [⚙️ assert] a second user's genuine session is admitted, as that user
    ✅ got: 200
    [⚙️ assert] arbitrary text is refused
    ✅ got: 302
    [⚙️ assert] and it admits the *second* user, not the first
    ✅ got: u-2
    [⚙️ assert] a cookie that is not a real envelope is refused
    ✅ got: 302
  [🧪 test] the payload is the identity, not the request
    [⚙️ assert] a client-supplied user id is a hint, never the identity
    ✅ got: #f
    [⚙️ assert] the owner id comes from the sealed payload
    ✅ got: u-1
  [🧪 test] the signed-in user is admitted
    [⚙️ assert] and its own payload expiry
    ✅ got: #t
    [⚙️ assert] and 'name' came back as 'owner-name'
    ✅ got: Joe
    [⚙️ assert] the browser route runs the handler
    ✅ got: 200
    [⚙️ assert] permissions travel inside the token
    ✅ got: (read-only access-files)
    [⚙️ assert] the thunk's 'email' came back as 'owner-email'
    ✅ got: joe@example.com
    [⚙️ assert] the handler sees the owner id from the payload
    ✅ got: u-1
    [⚙️ assert] the payload carries its own token id
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Web chapter: sign-in seals a session into a cookie
  [🧪 test] the cookie lifetime can be aligned with the token's
    [⚙️ assert] the payload lifetime is separate from the cookie's
    ✅ got: #f
    [⚙️ assert] the requested lifetime is recorded in the cookie
    ✅ got: 86400
    [⚙️ assert] the envelope is sealed now
    ✅ got: #t
  [🧪 test] a verified user gets a sealed session cookie
    [⚙️ assert] (c) path "/" applies the cookie to the whole site
    ✅ got: /
    [⚙️ assert] sign-in redirects, as the README's controller does
    ✅ got: 302
    [⚙️ assert] the redirect target is the dashboard
    ✅ got: /dashboard
    [⚙️ assert] the cookie value is a BWK3 envelope
    ✅ got: #t
    [⚙️ assert] the cookie is named as documented
    ✅ got: x-bewaking-session
    [⚙️ assert] (d) the cookie's lifetime matches #:token-validity-seconds
    ✅ got: 604800
    [⚙️ assert] (a) HttpOnly puts the cookie out of reach of JavaScript
    ✅ got: #t
    [⚙️ assert] (b) Secure keeps it off plain HTTP
    ✅ got: #t
  [🧪 test] bad credentials get no cookie at all
    [⚙️ assert] no session is created for a failed sign-in
    ✅ got: #f
    [⚙️ assert] the failure is reported, not swallowed
    ✅ got: invalid credentials
    [⚙️ assert] a wrong password is a plain 401
    ✅ got: 401
+----------------------------------------------+
[📑 suite] Web chapter: auditing what is safe to log
  [🧪 test] the envelope header is readable with no keys at all
    [⚙️ assert] a fresh session is not expired
    ✅ got: #f
    [⚙️ assert] not the encryption key and not the signing key either
    ✅ got: #f
    [⚙️ assert] the audit output carries no key material
    ✅ got: #f
    [⚙️ assert] the creation time is reported
    ✅ got: #t
    [⚙️ assert] the version is reported for the log
    ✅ got: BWK3
    [⚙️ assert] the key id is reported, which is what rotation is keyed on
    ✅ got: default
  [🧪 test] an expiry is reported as a time, and its absence as nothing
    [⚙️ assert] and the audit helper agrees it is live
    ✅ got: #f
    [⚙️ assert] the audit reports no envelope expiry by default
    ✅ got: #f
    [⚙️ assert] a token sealed with a TTL records its expiry
    ✅ got: #t
  [🧪 test] auditing garbage is #f, not an exception
    [⚙️ assert] a malformed BWK3 value yields no metadata
    ✅ got: #f
    [⚙️ assert] an unparseable cookie yields no metadata
    ✅ got: #f
    [⚙️ assert] a missing cookie yields no metadata
    ✅ got: #f
+----------------------------------------------+
[📑 suite] Web chapter: sealed objects as stateless state
  [🧪 test] an expired link is refused by the server, not by the client
    [⚙️ assert] and the header says so, for the log
    ✅ got: #t
    [⚙️ assert] before the expiry the link opens
    ✅ got: ((user . u-1) (action . reset-password))
    [⚙️ assert] after the expiry the server refuses it
    ✅ got: #f
  [🧪 test] an edited link is worth nothing
    [⚙️ assert] and garbage is not a link either
    ✅ got: #f
    [⚙️ assert] the link was edited in the mail client
    ✅ got: #f
  [🧪 test] the link answers only to the key that sealed it
    [⚙️ assert] a link sealed elsewhere does not open here
    ✅ got: #f
  [🧪 test] a cursor or half-finished form can be sealed the same way
    [⚙️ assert] a sealed cursor round-trips
    ✅ got: page-3
    [⚙️ assert] a client cannot page anywhere it was not sent
    ✅ got: #t
  [🧪 test] a password-reset link round-trips with no table row
    [⚙️ assert] the link is a sealed envelope
    ✅ got: #t
    [⚙️ assert] the user id is not readable in the link
    ✅ got: #f
    [⚙️ assert] the state comes back as an ordinary alist
    ✅ got: ((user . u-1) (action . reset-password))
    [⚙️ assert] the hour-long lifetime is recorded in the header
    ✅ got: #t
ℹ️ info - ran 5 tasks in: 0 seconds, 11878 microseconds

running unit tests from file: crypto-spec.scm, entrypoint: spec


ℹ️ info - shuffled with seed 209905258 (replay with VERITAS_SEED=209905258)
+----------------------------------------------+
[📑 suite] Sealed payloads (key derivation is recorded)
  [🧪 test] an Argon2id payload round-trips and resists the wrong key
    [⚙️ assert] another key does not
    ✅ got: #t
    [⚙️ assert] the same key opens it
    ✅ got: #t
  [🧪 test] sizes and headers are validated
    [⚙️ assert] a 16-byte PBKDF2 salt is refused
    ✅ got: #t
    [⚙️ assert] an 8-byte Argon2id salt is refused
    ✅ got: #t
    [⚙️ assert] a payload with no known header is refused
    ✅ got: #t
  [🧪 test] both readers keep their contracts
    [⚙️ assert] kdf-decrypt opens payloads produced by OpenSSL
    ✅ got: #t
    [⚙️ assert] openssl-decrypt refuses what the OpenSSL CLI could not read
    ✅ got: #t
  [🧪 test] the default KDF keeps the OpenSSL layout byte for byte
    [⚙️ assert] a fixed-salt PBKDF2 payload equals OpenSSL's own output
    ✅ got: #t
  [🧪 test] an Argon2id payload records its derivation and parameters
    [⚙️ assert] the pass count is recorded
    ✅ got: 1
    [⚙️ assert] the header names the derivation
    ✅ got: Argon2id
    [⚙️ assert] the memory cost is recorded, in KiB
    ✅ got: 8192
    [⚙️ assert] the lane count is recorded
    ✅ got: 1
  [🧪 test] tampering with the recorded parameters is not honoured
    [⚙️ assert] a changed pass count no longer decrypts
    ✅ got: #t
+----------------------------------------------+
[📑 suite] OpenSSL-compatible sealing
  [🧪 test] the salt must be 8 bytes
    [⚙️ assert] a short salt raises
    ✅ success catching error: misc-error: (#f bewaking: a PBKDF2 salt must be 8 bytes long. () #f)
  [🧪 test] a fixed-salt vector matches OpenSSL byte for byte
    [⚙️ assert] and it decrypts back
    ✅ got: bewaking
    [⚙️ assert] the ciphertext of a known salt and key
    ✅ got: U2FsdGVkX18AAQIDBAUGByAGpafcjamTQUX3eOyvQUE=
  [🧪 test] data produced by OpenSSL itself can be opened
    [⚙️ assert] an openssl-encrypted string, random salt and all
    ✅ got: a secret that openssl sealed
  [🧪 test] round-trips
    [⚙️ assert] the empty string round-trips
    ✅ got: 
    [⚙️ assert] a longer payload round-trips
    ✅ got: a secret that openssl sealed
    [⚙️ assert] one padded block follows the 16-byte Salted__ header
    ✅ got: 32
  [🧪 test] failures are reported rather than ignored
    [⚙️ assert] a truncated body raises rather than returning garbage
    ✅ got: #t
    [⚙️ assert] the wrong key raises for OpenSSL-produced data too
    ✅ got: #t
    [⚙️ assert] Base64 without a Salted__ header raises
    ✅ got: #t
    [⚙️ assert] input that is not Base64 raises
    ✅ got: #t
    [⚙️ assert] the wrong key raises
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Argon2id key derivation (RFC 9106)
  [🧪 test] every parameter changes the derived bytes
    [⚙️ assert] a different passphrase gives a different tag
    ✅ got: #f
    [⚙️ assert] a different salt gives a different tag
    ✅ got: #f
    [⚙️ assert] a different pass count gives a different tag
    ✅ got: #f
  [🧪 test] the RFC 9106 Argon2id vector is reproduced
    [⚙️ assert] password 32x01, salt 16x02, secret 8x03, data 12x04, m=32, t=3, p=4
    ✅ got: 0d640df58d78766c08c037a34a8b53c9d01ef0452d75b65eb52520e96b01e659
  [🧪 test] invalid parameters are rejected
    [⚙️ assert] zero passes is refused
    ✅ got: #t
    [⚙️ assert] zero lanes is refused
    ✅ got: #t
    [⚙️ assert] a non-integer memory cost is refused
    ✅ got: #t
    [⚙️ assert] a non-bytevector secret is refused
    ✅ got: #t
    [⚙️ assert] less than 8 KiB per lane is refused
    ✅ got: #t
    [⚙️ assert] this libgcrypt provides Argon2
    ✅ got: #t
+----------------------------------------------+
[📑 suite] HMAC-SHA256 (RFC 4231)
  [🧪 test] the digest is 32 bytes and key-sensitive
    [⚙️ assert] 64 hexadecimal digits, i.e. 32 bytes
    ✅ got: 64
    [⚙️ assert] changing the key changes the MAC
    ✅ got: #f
  [🧪 test] RFC 4231 test case 2
    [⚙️ assert] the key "Jefe" over its test message
    ✅ got: 5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843
  [🧪 test] RFC 4231 test case 1
    [⚙️ assert] a 20-byte key of 0x0b over "Hi There"
    ✅ got: b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7
+----------------------------------------------+
[📑 suite] PBKDF2-HMAC-SHA256
  [🧪 test] the key and IV material OpenSSL derives
    [⚙️ assert] 48 bytes over 10000 iterations, as `openssl kdf' reports
    ✅ got: cb14e1e1f7ac2fe57f2fcaa462d4ad903867450d9778d2ccf939d8ad3cb99982e0edbd06820c0a636f6fd53d4be339fd
  [🧪 test] published password/salt vectors
    [⚙️ assert] two iterations
    ✅ got: ae4d0c95af6b46d32d0adff928f06dd02a303f8ef3c251dfd6e2d85a95474c43
    [⚙️ assert] 4096 iterations
    ✅ got: c5e478d59288c841aa530db6845c4c8d962893a001ce4e11a4963873aa98134a
    [⚙️ assert] one iteration
    ✅ got: 120fb6cffcf8b32c43e7225256c4f837a86548c92ccc35480805987cb70be17b
+----------------------------------------------+
[📑 suite] Encodings of raw bytes
  [🧪 test] Base64 round-trips arbitrary bytevectors
    [⚙️ assert] bytes that are not valid UTF-8 survive the round trip
    ✅ got: 3
  [🧪 test] Base16 round-trips arbitrary bytevectors
    [⚙️ assert] bytes that are not valid UTF-8 survive the round trip
    ✅ got: #t
    [⚙️ assert] the empty bytevector round-trips
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Derived key material
  [🧪 test] an unknown derivation is refused
    [⚙️ assert] no other function can be named
    ✅ got: #t
  [🧪 test] Argon2id key material honours its parameters
    [⚙️ assert] changing the pass count changes the material
    ✅ got: #t
    [⚙️ assert] changing the passphrase changes the material
    ✅ got: #t
    [⚙️ assert] the full key-and-IV length can be derived
    ✅ got: 48
  [🧪 test] PBKDF2 key material is the PBKDF2 derivation's
    [⚙️ assert] the requested length is produced
    ✅ got: 32
    [⚙️ assert] derive-key-material agrees with the primitive it names
    ✅ got: 25ff9d4852ea4ea0ff9caf7aa33ed9e25f8d8a4eb2915445e0ff398292d67473
+----------------------------------------------+
[📑 suite] Key-derivation specifications
  [🧪 test] Argon2id defaults are filled in and reported
    [⚙️ assert] given parameters are kept and the rest defaulted
    ✅ got: ((kdf . argon2id) (memory-kib . 262144) (iterations . 4) (parallelism . 1))
    [⚙️ assert] the defaults are 64 MiB, 3 passes, 1 lane
    ✅ got: ((kdf . argon2id) (memory-kib . 65536) (iterations . 3) (parallelism . 1))
  [🧪 test] the default is PBKDF2 with its fixed cost
    [⚙️ assert] the module default names PBKDF2
    ✅ got: pbkdf2
    [⚙️ assert] its iteration count is the OpenSSL one
    ✅ got: 10000
  [🧪 test] unsupported specifications are refused
    [⚙️ assert] a PBKDF2 cost the OpenSSL format cannot record is refused
    ✅ got: #t
    [⚙️ assert] an out-of-range Argon2id memory cost is refused
    ✅ got: #t
    [⚙️ assert] an unknown KDF name is refused
    ✅ got: #t
    [⚙️ assert] a string is not a KDF specification
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Base64 encoding
  [🧪 test] malformed input is rejected
    [⚙️ assert] data after padding raises
    ✅ success catching error: misc-error: (#f bewaking: malformed base64 input (data after padding). () #f)
    [⚙️ assert] an impossible amount of padding raises
    ✅ success catching error: misc-error: (#f bewaking: malformed base64 input (bad length or padding). () #f)
    [⚙️ assert] a truncated group raises
    ✅ success catching error: misc-error: (#f bewaking: malformed base64 input (bad length or padding). () #f)
    [⚙️ assert] non-alphabet characters raise
    ✅ success catching error: misc-error: (#f bewaking: malformed base64 input. () #f)
  [🧪 test] RFC 4648 test vectors
    [⚙️ assert] three bytes of input
    ✅ got: Zm9v
    [⚙️ assert] one byte of input
    ✅ got: Zg==
    [⚙️ assert] six bytes of input
    ✅ got: Zm9vYmFy
    [⚙️ assert] two bytes of input
    ✅ got: Zm8=
    [⚙️ assert] empty
    ✅ got: 
    [⚙️ assert] five bytes of input
    ✅ got: Zm9vYmE=
    [⚙️ assert] four bytes of input
    ✅ got: Zm9vYg==
  [🧪 test] decoding is tolerant of line breaks
    [⚙️ assert] a trailing newline is ignored
    ✅ got: hello
    [⚙️ assert] encoding then decoding is lossless
    ✅ got: hello world
+----------------------------------------------+
[📑 suite] Base16 encoding
  [🧪 test] malformed input is rejected
    [⚙️ assert] non-hexadecimal characters raise
    ✅ success catching error: misc-error: (#f bewaking: malformed hexadecimal input. () #f)
    [⚙️ assert] embedded whitespace raises
    ✅ success catching error: misc-error: (#f bewaking: malformed hexadecimal input (odd number of digits). () #f)
    [⚙️ assert] an odd number of digits raises
    ✅ success catching error: misc-error: (#f bewaking: malformed hexadecimal input (odd number of digits). () #f)
  [🧪 test] decoding accepts both cases
    [⚙️ assert] lowercase hex decodes
    ✅ got: hello
    [⚙️ assert] uppercase hex decodes too
    ✅ got: hello
    [⚙️ assert] encoding then decoding is lossless
    ✅ got: hello
  [🧪 test] known encodings
    [⚙️ assert] the empty string encodes to nothing
    ✅ got: 
    [⚙️ assert] a word encodes byte per byte
    ✅ got: 626577616b696e67
    [⚙️ assert] lowercase hex digits are produced
    ✅ got: 68656c6c6f
+----------------------------------------------+
[📑 suite] Authenticated payload hygiene
  [🧪 test] the recorded derivation cost is bounded before it is spent
    [⚙️ assert] a memory cost above the cap is refused, not allocated
    ✅ got: #t
    [⚙️ assert] less than 8 KiB per lane is refused
    ✅ got: #t
    [⚙️ assert] a lane count above the cap is refused
    ✅ got: #t
    [⚙️ assert] a cost inside the bounds is derived, then fails the tag: the bound is not a blanket refusal
    ✅ got: #t
    [⚙️ assert] a zero pass count is refused
    ✅ got: #t
  [🧪 test] every payload uses a fresh salt and nonce
    [⚙️ assert] the recorded nonces differ as well
    ✅ got: #f
  [🧪 test] an empty plaintext is still authenticated
    [⚙️ assert] the empty plaintext round-trips
    ✅ got: #t
    [⚙️ assert] even an empty payload carries a salt, a nonce and a tag
    ✅ got: #t
  [🧪 test] the salt and the nonce are used, not decorative
    [⚙️ assert] editing a salt digit breaks the tag
    ✅ got: #t
    [⚙️ assert] editing an Argon2id parameter digit is refused
    ✅ got: #t
    [⚙️ assert] editing a nonce digit breaks the tag
    ✅ got: #t
  [🧪 test] the associated data is authenticated but not stored
    [⚙️ assert] one extra associated-data byte breaks the tag
    ✅ got: #t
    [⚙️ assert] the associated data does not appear in the payload
    ✅ got: #f
+----------------------------------------------+
[📑 suite] Authenticated payloads (AES-256-GCM)
  [🧪 test] the payload records which derivation to use
    [⚙️ assert] the memory cost is recorded, in KiB
    ✅ got: 8192
    [⚙️ assert] the pass count is recorded
    ✅ got: 1
    [⚙️ assert] PBKDF2 is identified by its own id
    ✅ got: 1
    [⚙️ assert] Argon2id is identified by a different id
    ✅ got: 2
    [⚙️ assert] the lane count is recorded
    ✅ got: 1
  [🧪 test] the tag refuses every alteration
    [⚙️ assert] an unknown key-derivation id is refused, not guessed at
    ✅ got: #t
    [⚙️ assert] a flipped tag digit is refused
    ✅ got: #t
    [⚙️ assert] different associated data is refused
    ✅ got: #t
    [⚙️ assert] the wrong key is refused
    ✅ got: #t
    [⚙️ assert] a truncated payload is refused
    ✅ got: #t
    [⚙️ assert] a flipped ciphertext digit is refused
    ✅ got: #t
  [🧪 test] hexadecimal that stands for bytes decodes to bytes
    [⚙️ assert] and keeps the raw octets, which base16-decode cannot
    ✅ got: 255
    [⚙️ assert] base16->bytes returns a bytevector
    ✅ got: #t
  [🧪 test] fresh salt and nonce still round-trip
    [⚙️ assert] associated data is optional: empty means none
    ✅ got: #t
    [⚙️ assert] a payload sealed with random salt and nonce opens
    ✅ got: #t
    [⚙️ assert] a payload sealed without it does not open with it
    ✅ got: #t
    [⚙️ assert] and so does an Argon2id one
    ✅ got: #t
  [🧪 test] the payload is byte for byte the reference implementation's
    [⚙️ assert] Argon2id with its parameters recorded, likewise
    ✅ got: 020000200000000001000000010707070707070707070707070707070709090909090909090909090996b424d50c29974261cc56650752a5237f7528271202d70046f0bc49c8c0bfefb86150c0b946a554a1590bec6d5f03409bbff197af7d782651
    [⚙️ assert] PBKDF2-HMAC-SHA256, as Python's cryptography seals it
    ✅ got: 010707070707070707070707070707070709090909090909090909090915d0ed647041883a00a39c1a98153992e43396ca2ef78f30cf603552820a8ed81e320d38a87aee14ad4a7f41b2df7b369d6614500294e59e58
+----------------------------------------------+
[📑 suite] Randomness
  [🧪 test] random-bytes returns genuinely fresh bytes
    [⚙️ assert] a draw is not a constant
    ✅ got: #f
    [⚙️ assert] the requested length is honoured
    ✅ got: 32
    [⚙️ assert] the default length is the OpenSSL salt length
    ✅ got: 8
    [⚙️ assert] two calls do not return the same bytes
    ✅ got: #t;;; note: source file ./src/bewaking/password.scm
;;;       newer than compiled /gnu/store/397y8x0mk0blvzc4wq74zszyqf43c6i2-profile/lib/guile/3.0/site-ccache/bewaking/password.go
;;; found fresh local cache at /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/bewaking/trunk/src/bewaking/password.scm.go
;;; note: source file ./src/bewaking/cli.scm
;;;       newer than compiled /gnu/store/397y8x0mk0blvzc4wq74zszyqf43c6i2-profile/lib/guile/3.0/site-ccache/bewaking/cli.go
;;; found fresh local cache at /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/bewaking/trunk/src/bewaking/cli.scm.go
;;; note: source file ./src/bewaking/bewaking.scm
;;;       newer than compiled /gnu/store/397y8x0mk0blvzc4wq74zszyqf43c6i2-profile/lib/guile/3.0/site-ccache/bewaking/bewaking.go
;;; found fresh local cache at /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/bewaking/trunk/src/bewaking/bewaking.scm.go
;;; note: source file ./src/bewaking/crypto.scm
;;;       newer than compiled /gnu/store/397y8x0mk0blvzc4wq74zszyqf43c6i2-profile/lib/guile/3.0/site-ccache/bewaking/crypto.go
;;; found fresh local cache at /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/bewaking/trunk/src/bewaking/crypto.scm.go

    [⚙️ assert] a draw is not all zeroes
    ✅ got: #t
ℹ️ info - ran 13 tasks in: 0 seconds, 21619 microseconds

finished running tests


--------------------------------------------------------------

Maak: the infinitely extensible command runner

Loading tasks from Maak file: /etc/byggsteg/job-clone/bewaking/trunk/maak.scm

Executing Maak tasks: test

--------------------------------------------------------------

=> Running Maak task: test

  Run project's tests.

→ running command: cd /etc/byggsteg/job-clone/bewaking/trunk && sudo maak deploy

API documentation saved to doc/api
index.texi: warning: must specify a title with a title command or @top
renamed './index' -> './doc/api-dist'
removed '/srv/http/jointhefreeworld.org/api-docs/bewaking/API.html'
removed '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fbewaking.html'
removed '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fcli.html'
removed '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fcrypto.html'
removed '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fpassword.html'
removed directory '/srv/http/jointhefreeworld.org/api-docs/bewaking'
mkdir: created directory '/srv/http/jointhefreeworld.org/api-docs/bewaking'
renamed 'doc/api-dist/API.html' -> '/srv/http/jointhefreeworld.org/api-docs/bewaking/API.html'
renamed 'doc/api-dist/bewaking_005fbewaking.html' -> '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fbewaking.html'
renamed 'doc/api-dist/bewaking_005fcli.html' -> '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fcli.html'
renamed 'doc/api-dist/bewaking_005fcrypto.html' -> '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fcrypto.html'
renamed 'doc/api-dist/bewaking_005fpassword.html' -> '/srv/http/jointhefreeworld.org/api-docs/bewaking/bewaking_005fpassword.html'
removed 'doc/api/index.texi'
removed directory 'doc/api'
removed directory 'doc/api-dist'
removed directory 'doc'


--------------------------------------------------------------

Maak: the infinitely extensible command runner

Loading tasks from Maak file: /etc/byggsteg/job-clone/bewaking/trunk/maak.scm

Executing Maak tasks: deploy

--------------------------------------------------------------

=> Running Maak task: deploy

  Generate documentation for the project and publish to web directory.
inspect the job's lambda expression
(lambda()
  `((task . ("maak-test" "maak-deploy"))
    (project . "bewaking")
    (branch-name . "trunk")
    (clone-url . "https://codeberg.org/jjba23/bewaking.git")))