maak-db7c785f-1f9b

job failed

→ running command: cd "/etc/byggsteg/job-clone//maak/trunk" && git reset --hard && git pull
HEAD is now at 6481600 chore: Release v0.10.0
From https://codeberg.org/jjba23/maak
   6481600..46fd097  trunk      -> origin/trunk
Updating 6481600..46fd097
Fast-forward
 README.org       |  13 ++++
 maak.scm         |  59 +++++++++----------
 src/maak/git.scm | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 218 insertions(+), 30 deletions(-)
 create mode 100644 src/maak/git.scm

→ running command: cd /etc/byggsteg/job-clone/maak/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/maak/trunk && git log --name-status HEAD^..HEAD
commit 46fd0970d61316fbe4b69f3baaaff479acd92148
Author: Josep Bigorra <jjbigorra@gmail.com>
Date:   Mon Oct 19 07:49:50 2026 +0200

    feat: Add git helpers to DSL

M       README.org
M       maak.scm
A       src/maak/git.scm

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

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

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

found unit tests: (shell.scm errors.scm dsl.scm cli.scm commands.scm guix.scm integration.scm tasks.scm docstrings.scm)


running unit tests from file: shell.scm, entrypoint: spec

;;; note: source file ./src/maak/dsl.scm
;;;       newer than compiled /run/current-system/profile/lib/guile/3.0/site-ccache/maak/dsl.go
;;; found fresh local cache at /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/maak/trunk/src/maak/dsl.scm.go
mkdir: created directory '/tmp/maak-test-files-2290'
removed '/tmp/maak-test-files-2290/a.txt'
removed directory '/tmp/maak-test-files-2290'
mkdir: created directory '/tmp/maak-test-parents-2290'
mkdir: created directory '/tmp/maak-test-parents-2290/deep'
mkdir: created directory '/tmp/maak-test-parents-2290/deep/nested'
removed '/tmp/maak-test-parents-2290/deep/nested/a.txt'
removed directory '/tmp/maak-test-parents-2290/deep/nested'
removed directory '/tmp/maak-test-parents-2290/deep'
removed directory '/tmp/maak-test-parents-2290'
mkdir: created directory '/tmp/maak-test-append-2290'
removed '/tmp/maak-test-append-2290/a.txt'
removed directory '/tmp/maak-test-append-2290'
mkdir: created directory '/tmp/maak-test-missing-2290'
mkdir: created directory '/tmp/maak-test-touch-2290'
removed '/tmp/maak-test-touch-2290/touched'
removed directory '/tmp/maak-test-touch-2290'
mkdir: created directory '/tmp/maak-test-spaces-2290'
mkdir: created directory '/tmp/maak-test-spaces-2290/a b'
removed directory '/tmp/maak-test-spaces-2290/a b'
removed directory '/tmp/maak-test-spaces-2290'
mkdir: created directory '/tmp/maak-test-touch-space-2290'
removed '/tmp/maak-test-touch-space-2290/a b.txt'
removed directory '/tmp/maak-test-touch-space-2290'
mkdir: created directory '/tmp/maak-test-cp-space-2290'
removed '/tmp/maak-test-cp-space-2290/a b.txt'
removed '/tmp/maak-test-cp-space-2290/c d.txt'
removed directory '/tmp/maak-test-cp-space-2290'
mkdir: created directory '/tmp/maak-test-mv-space-2290'
renamed '/tmp/maak-test-mv-space-2290/a b.txt' -> '/tmp/maak-test-mv-space-2290/c d.txt'
removed '/tmp/maak-test-mv-space-2290/c d.txt'
removed directory '/tmp/maak-test-mv-space-2290'
mkdir: created directory '/tmp/maak-test-ln-space-2290'
removed '/tmp/maak-test-ln-space-2290/a b.txt'
removed '/tmp/maak-test-ln-space-2290/c d.txt'
removed directory '/tmp/maak-test-ln-space-2290'
mkdir: created directory '/tmp/maak-test-chmod-space-2290'
removed '/tmp/maak-test-chmod-space-2290/a b.sh'
removed directory '/tmp/maak-test-chmod-space-2290'
mkdir: created directory '/tmp/maak-test-rm-space-2290'
mkdir: created directory '/tmp/maak-test-rm-space-2290/a b'
removed directory '/tmp/maak-test-rm-space-2290/a b'
removed directory '/tmp/maak-test-rm-space-2290'
mkdir: created directory '/tmp/maak-test-expand-rm-2290'
removed '/tmp/maak-test-expand-rm-2290/a b.txt'
removed '/tmp/maak-test-expand-rm-2290/c.txt'
removed '/tmp/maak-test-expand-rm-2290/keep.log'
removed directory '/tmp/maak-test-expand-rm-2290'
mkdir: created directory '/tmp/maak-test-expand-cp-2290'
mkdir: created directory '/tmp/maak-test-expand-cp-2290/dest'
removed '/tmp/maak-test-expand-cp-2290/a b.txt'
removed '/tmp/maak-test-expand-cp-2290/c.txt'
removed '/tmp/maak-test-expand-cp-2290/dest/a b.txt'
removed '/tmp/maak-test-expand-cp-2290/dest/c.txt'
removed directory '/tmp/maak-test-expand-cp-2290/dest'
removed directory '/tmp/maak-test-expand-cp-2290'
mkdir: created directory '/tmp/maak-test-expand-chmod-2290'
removed '/tmp/maak-test-expand-chmod-2290/a.txt'
removed '/tmp/maak-test-expand-chmod-2290/b.txt'
removed directory '/tmp/maak-test-expand-chmod-2290'

+----------------------------------------------+
[📑 suite] Shell quoting and lookup
  [🧪 test] shell-quote wraps in single quotes
    ✅ got: 'a b'
    ✅ got: ''
  [🧪 test] shell-quote escapes embedded single quotes
    ✅ got: 'it'\''s'
  [🧪 test] which finds a program that exists
    ✅ got: #t
  [🧪 test] which returns #f for a missing program
    ✅ got: #f
  [🧪 test] command-exists? mirrors which
    ✅ got: #f
    ✅ got: #t
  [🧪 test] require-command returns the path it found
    ✅ got: #t
  [🧪 test] require-command raises for a missing program
    ✅ success catching error: %exception: (#<&maak-error message: "required command not found on PATH: definitely-not-a-real-command-maak-test" hint: "Install `definitely-not-a-real-command-maak-test', or add it to PATH.">)
+----------------------------------------------+
[📑 suite] File helpers
  [🧪 test] write-file then read-file round-trips
    ✅ got: hello
  [🧪 test] write-file creates parent directories
    ✅ got: deep
  [🧪 test] write-file appends when asked
    ✅ got: onetwo
  [🧪 test] read-file returns its default for a missing file
    ✅ got: fallback
  [🧪 test] read-file of a missing file is #f without a default
    ✅ got: #f
  [🧪 test] touch creates a file
    ✅ got: #t
  [🧪 test] with-directory changes the directory
    ✅ got: #t
  [🧪 test] with-directory restores the directory
    ✅ got: /etc/byggsteg/job-clone/maak/trunk
+----------------------------------------------+
[📑 suite] Capturing output
  [🧪 test] capture returns the output of a successful command
    ✅ got: fine

  [🧪 test] capture raises when the command fails
    ✅ success catching error: %exception: (#<&maak-error message: "command failed (exit code 3): exit 3" hint: "Fix the command above, or run `maak --dry-run' to inspect it first.">)
  [🧪 test] capture keeps partial output only when allowed to fail
    ✅ got: partial

  [🧪 test] capture includes standard error when asked
    ✅ got: oops

+----------------------------------------------+
[📑 suite] File helpers keep paths with spaces whole
  [🧪 test] mkdir-p creates one directory, not a directory per word
    ✅ got: #t
  [🧪 test] touch creates a file whose name has a space
    ✅ got: #t
  [🧪 test] cp copies paths whose names have spaces
    ✅ got: #t
  [🧪 test] mv moves paths whose names have spaces
    ✅ got: #t
  [🧪 test] ln-s links a path whose name has a space
    ✅ got: #t
  [🧪 test] chmod-file changes the mode of a path with a space
    ✅ got: 448
  [🧪 test] delete-file-recursively removes a directory with a space
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Shell expansion when asked for
  [🧪 test] delete-file-recursively expands a wildcard when asked
    ✅ got: #t
  [🧪 test] cp expands a wildcard when asked
    ✅ got: #t
  [🧪 test] chmod-file expands a wildcard when asked
    ✅ got: (384 384)
+----------------------------------------------+
[📑 suite] Environment helpers
  [🧪 test] home-dir and tmp-dir return strings
    ✅ got: #t
    ✅ got: #t
  [🧪 test] env-set! then env-get round-trips
    ✅ got: value
  [🧪 test] env-unset! removes the variable
    ✅ got: #f
  [🧪 test] env-get falls back to its default
    ✅ got: default
  [🧪 test] with-env sets and restores the variable
    ✅ got: inner
    ✅ got: #f
  [🧪 test] with-env restores an existing value
    ✅ got: outer
  [🧪 test] with-env-vars sets every pair
    ✅ got: (1 2)
+----------------------------------------------+
[📑 suite] Environment files
  [🧪 test] the assignments are read in the order they are written
    ✅ got: ((CI . 1) (MAAK_SMOKE . hello) (MAAK_SMOKE_QUOTED . quoted value) (SINGLE . single quoted) (EMPTY . ) (DATABASE_URL . postgres://localhost/dev?sslmode=disable) (INDENTED . spaced))
  [🧪 test] environment files skip lines without an =
    ✅ got: #f
  [🧪 test] environment files skip comments
    ✅ got: #f
  [🧪 test] a file that does not exist has no assignments
    ✅ got: ()
  [🧪 test] loading sets the names and reports them
    ✅ got: hello
    ✅ got: (CI MAAK_SMOKE MAAK_SMOKE_QUOTED SINGLE EMPTY DATABASE_URL INDENTED)
    ✅ got: quoted value
  [🧪 test] the environment keeps a name it already has
    ✅ got: from-the-environment
  [🧪 test] overriding is possible when asked for
    ✅ got: hello
  [🧪 test] loading a file that is not there changes nothing
    ✅ got: ()
ℹ️ info - ran 7 tasks in: 0 seconds, 10708 microseconds

running unit tests from file: errors.scm, entrypoint: spec


+----------------------------------------------+
[📑 suite] Messages of caught errors
  [🧪 test] an error message is reported as it stands
    ✅ got: boom
  [🧪 test] an unbound variable is named
    ✅ got: Unbound variable: no-such-binding
  [🧪 test] a primitive failure explains itself
    ✅ got: expecting pair
  [🧪 test] a primitive failure is not named by the procedure
    ✅ got: #f
  [🧪 test] a missing module is named the way Guile names it
    ✅ got: no code for module (no such module)
  [🧪 test] the irritants of a user error are shown
    ✅ got: custom a b
  [🧪 test] a template that cannot be filled is shown as it stands
    ✅ got: thrown ~S here
+----------------------------------------------+
[📑 suite] Reporting to the user
  [🧪 test] a maak error is labelled
    ✅ got: maak: error:
  [🧪 test] a maak error prints its message
    ✅ got: Unknown task: nope
  [🧪 test] a maak error prints its hint
    ✅ got: hint: Available tasks: build, test
  [🧪 test] a maak error prints no backtrace
    ✅ got: #f
  [🧪 test] a maak error without a hint prints its message
    ✅ got: nope
  [🧪 test] a maak error without a hint prints no hint
    ✅ got: #f
  [🧪 test] an unexpected error prints what went wrong
    ✅ got: boom
  [🧪 test] an unexpected error points at the debug switch
    ✅ got: MAAK_DEBUG=1
  [🧪 test] an unexpected error prints no backtrace
    ✅ got: #f
  [🧪 test] a missing module names the module
    ✅ got: no code for module (no such module)
  [🧪 test] a missing module points at the load path switch
    ✅ got: -L/--load-path
  [🧪 test] a missing module names the load path variable
    ✅ got: MAAK_LOAD_PATH
  [🧪 test] an unbound variable is named
    ✅ got: no-such-binding
  [🧪 test] an unbound variable says where it is not bound
    ✅ got: is not bound here
  [🧪 test] an unbound variable explains the import rule
    ✅ got: resolve-module
ℹ️ info - ran 2 tasks in: 0 seconds, 8888 microseconds

running unit tests from file: dsl.scm, entrypoint: spec

;;; note: source file ./src/maak/main.scm
;;;       newer than compiled /run/current-system/profile/lib/guile/3.0/site-ccache/maak/main.go
;;; found fresh local cache at /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/maak/trunk/src/maak/main.scm.go
;;; note: source file ./src/maak/maak.scm
;;;       newer than compiled /run/current-system/profile/lib/guile/3.0/site-ccache/maak/maak.go
;;; found fresh local cache at /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/maak/trunk/src/maak/maak.scm.go
mkdir: created directory '/tmp/maak-test-processes-2290'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/out.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/stage-env.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/pipeline-env.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/override.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/printed.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
ONE
TWO
removed '/tmp/maak-test-processes-2290/teed.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/teed.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/printed.txt'
removed '/tmp/maak-test-processes-2290/kept.txt'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'

[DRY-RUN]: printf 'x
'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/keep.log'
removed directory '/tmp/maak-test-processes-2290'
mkdir: created directory '/tmp/maak-test-processes-2290'
removed '/tmp/maak-test-processes-2290/*.txt'
removed directory '/tmp/maak-test-processes-2290'

+----------------------------------------------+
[📑 suite] Pretty multiline strings
  [🧪 test] dedent removes the common indentation
    ✅ got: a
  b
    ✅ got: hello
  [🧪 test] dedent drops surrounding blank lines
    ✅ got: a
b
  [🧪 test] dedent keeps interior blank lines
    ✅ got: a

b
  [🧪 test] dedent expands tabs
    ✅ got: a
b
  [🧪 test] dedent of a single word is the word
    ✅ got: word
  [🧪 test] indent adds spaces to every line
    ✅ got:   a
  b
  [🧪 test] indent can leave the first line flush
    ✅ got: a
  b
  [🧪 test] the text macro joins and dedents its lines
    ✅ got: a
b
    ✅ got: x
y
  [🧪 test] string-lines splits on newlines
    ✅ got: (a b)
  [🧪 test] unlines joins with newlines
    ✅ got: a
b
  [🧪 test] unwords joins with spaces
    ✅ got: a b
  [🧪 test] blank-line? recognises whitespace
    ✅ got: #t
    ✅ got: #f
    ✅ got: #t
  [🧪 test] leading-whitespace-count counts spaces and tabs
    ✅ got: 2
    ✅ got: 0
    ✅ got: 3
+----------------------------------------------+
[📑 suite] Load paths
  [🧪 test] split-load-path splits on colons
    ✅ got: (a b)
  [🧪 test] split-load-path drops empty entries
    ✅ got: (a b)
  [🧪 test] split-load-path handles the empty cases
    ✅ got: ()
    ✅ got: ()
  [🧪 test] with-load-path adds the directories
    ✅ got: #t
  [🧪 test] with-load-path restores the load path
    ✅ got: #f
  [🧪 test] with-load-path restores the load path after an error
    ✅ got: #f
    ✅ success catching error: misc-error: (#f deliberate failure () #f)
  [🧪 test] add-load-path! records the directory
    ✅ got: /tmp/maak-test-add
    ✅ got: #t
    ✅ got: #t
  [🧪 test] add-load-paths! adds every directory
    ✅ got: #t
    ✅ got: #t
+----------------------------------------------+
[📑 suite] Maak errors
  [🧪 test] make-maak-error builds a typed error
    ✅ got: #f
    ✅ got: message
    ✅ got: hint
    ✅ got: #t
  [🧪 test] raise-maak-error raises a catchable maak error
    ✅ got: boom
  [🧪 test] raise-maak-error carries its hint
    ✅ got: try this
  [🧪 test] find-maak-error returns #f for a foreign error
    ✅ got: #f
  [🧪 test] raise-maak-error is catchable with assert-error
    ✅ success catching error: %exception: (#<&maak-error message: "nope" hint: #f>)
+----------------------------------------------+
[📑 suite] Programs, arguments and jobs
  [🧪 test] run returns #t when the program exits with 0
    ✅ got: #t
  [🧪 test] run keeps a space inside one argument
    ✅ got: #t
  [🧪 test] run returns #f when a failure is allowed
    ✅ got: #f
  [🧪 test] run raises when a command fails
    ✅ success catching error: %exception: (#<&maak-error message: "command failed (exit code 3): sh -c 'exit 3'" hint: "Fix the command above, or run `maak --dry-run' to inspect it first.">)
  [🧪 test] run refuses an empty argument list
    ✅ success catching error: %exception: (#<&maak-error message: "run expects a non-empty list of strings, starting with the program" hint: "Write (run (list \"mkdir\" \"-p\" dir)) instead of one long command.">)
  [🧪 test] run refuses an argument that is not a string
    ✅ success catching error: %exception: (#<&maak-error message: "run expects a non-empty list of strings, starting with the program" hint: "Write (run (list \"mkdir\" \"-p\" dir)) instead of one long command.">)
  [🧪 test] a dry run does not start the program
    ✅ got: #f
  [🧪 test] an async run returns a job with a pid
    ✅ got: #t
  [🧪 test] wait-job is #t for a successful job
    ✅ got: #t
  [🧪 test] wait-job is #f for a failing job
    ✅ got: #f
  [🧪 test] job-exit-code reports the exit code
    ✅ got: 4
  [🧪 test] a job can be waited on twice
    ✅ got: #t
  [🧪 test] job-done? does not wait for a running job
    ✅ got: #f
  [🧪 test] job-done? is true once the job has finished
    ✅ got: #t
  [🧪 test] a background shell command is a job too
    ✅ got: #t
  [🧪 test] job-command keeps the command as written
    ✅ got: sh -c 'exit 0'
+----------------------------------------------+
[📑 suite] Pipelines and shell expansion
  [🧪 test] a pipeline feeds each stage into the next
    ✅ got: hello

  [🧪 test] a failing stage fails the whole pipeline
    ✅ got: #f
  [🧪 test] a pipeline raises when a stage fails
    ✅ success catching error: %exception: (#<&maak-error message: "pipeline failed: stage 1 (false) exited with code 1" hint: "Fix the failing stage above, or run `maak --dry-run' to inspect the pipeline first.">)
  [🧪 test] a pipeline with no stages is refused
    ✅ success catching error: %exception: (#<&maak-error message: "run-pipeline expects a non-empty list of stages: argument lists or (stage ...) forms" hint: "Write (run-pipeline (list (list \"cat\" file) (stage (list \"grep\" pattern) #:env '(\"LC_ALL=C\")))).">)
  [🧪 test] a pipeline with an empty stage is refused
    ✅ success catching error: %exception: (#<&maak-error message: "run-pipeline expects a non-empty list of stages: argument lists or (stage ...) forms" hint: "Write (run-pipeline (list (list \"cat\" file) (stage (list \"grep\" pattern) #:env '(\"LC_ALL=C\")))).">)
  [🧪 test] a dry run does not start the pipeline
    ✅ got: #f
  [🧪 test] a stage whose program is missing fails the pipeline
    ✅ got: #f
  [🧪 test] a stage takes environment variables of its own
    ✅ got: stage
  [🧪 test] a pipeline gives its environment to every stage
    ✅ got: shared
  [🧪 test] a stage's environment wins over the pipeline's
    ✅ got: stage
  [🧪 test] a dry run shows a stage's environment and sudo
    ✅ got: #t
  [🧪 test] a captured pipeline returns what every stage wrote
    ✅ got: (one
two
 ONE
TWO
)
  [🧪 test] a capture of more than a pipeful loses nothing
    ✅ got: 20000

  [🧪 test] a captured pipeline prints nothing itself
    ✅ got: 
  [🧪 test] a capture leaves no temporary file behind
    ✅ got: #f
  [🧪 test] a captured pipeline reports the stages that failed
    ✅ got: #f
  [🧪 test] a stage's tee file keeps what the stage wrote
    ✅ got: one
two

  [🧪 test] the stage after a tee reads the same bytes
    ✅ got: one

  [🧪 test] a tee on the last stage prints what it keeps
    ✅ got: hello

  [🧪 test] a tee that cannot be written is refused before the pipeline
    ✅ success catching error: %exception: (#<&maak-error message: "stage 1 (printf 'x\n') cannot record its output to /tmp/maak-test-processes-2290/missing/log.txt: No such file or directory: \"/tmp/maak-test-processes-2290/missing/log.txt\"" hint: "Point #:tee at a file the task may write, or drop it and read the pipeline's output another way.">)
  [🧪 test] a stage refuses a tee that is not a file name
    ✅ success catching error: %exception: (#<&maak-error message: "stage expects #:tee to name a file, got 42" hint: "Write (stage (list \"grep\" pattern) #:tee \"clean.txt\").">)
  [🧪 test] a background pipeline cannot capture its output
    ✅ success catching error: %exception: (#<&maak-error message: "a background pipeline cannot capture its output" hint: "Wait for the job and capture a foreground pipeline, or give the stage a file with (stage argv #:tee file).">)
  [🧪 test] a dry run shows the tee a stage writes to
    ✅ got: #t
  [🧪 test] a dry run of a captured pipeline returns an empty result
    ✅ got: ()
  [🧪 test] a stage refuses an empty argument list
    ✅ success catching error: %exception: (#<&maak-error message: "stage expects a non-empty list of strings, starting with the program" hint: "Write (stage (list \"grep\" pattern) #:env '(\"LC_ALL=C\")).">)
  [🧪 test] a pipeline refuses a stage that is not an argument list
    ✅ success catching error: %exception: (#<&maak-error message: "run-pipeline expects a non-empty list of stages: argument lists or (stage ...) forms" hint: "Write (run-pipeline (list (list \"cat\" file) (stage (list \"grep\" pattern) #:env '(\"LC_ALL=C\")))).">)
inspect the job's lambda expression
(lambda()
  (list
   `((task . "maak-test")
     (project . "maak")
     (branch-name . "trunk")
     (clone-url . "https://codeberg.org/jjba23/maak.git"))
   `((task . "trivial")
     (project . "maak")
     (branch-name . "trunk")
     (clone-url . "https://codeberg.org/jjba23/maak.git")
     (trivial-cmds . ("cd /etc/byggsteg/job-clone/maak/trunk &&
                              sudo guix shell -f guix.scm -- maak deploy")))))