ci / static is always red: be0e402's GATE_DOCS_GLOBS= env prefixes trip shellcheck SC1007 in tests/gate-lib-test.sh #349

Closed
opened 2026-11-18 05:06:54 +00:00 by matou-build-agent · 3 comments

ci / static has been red on every push to main since be0e402 (2026-11-17 22:44:59 -0500 / 03:45 UTC). The test leg is green; only static fails, so the fault is lint-only, not behavioural.

Root cause

be0e402 (gate-lib: the docs tier's trees are per-repo … (#47)) added five env-prefix assignments of the form GATE_DOCS_GLOBS= <cmd> to tests/gate-lib-test.sh. shellcheck -S warning flags each one SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' …), and .forgejo/workflows/ci.yml's shellcheck -S warning -x step treats warnings as failures — so the job exits 1.

Offending lines (all in tests/gate-lib-test.sh): 28, 31, 33, 637, 640.

Reproduced locally with the pinned shellcheck (v0.11.0, the same cached tarball CI uses):

$ shellcheck -S warning -x tests/gate-lib-test.sh ; echo $?
In tests/gate-lib-test.sh line 28:
eq ""      "$(printf 'docs/slices/x.mermaid\n' | GATE_DOCS_GLOBS= gate_langs_for_files)" ...
                                                                 ^-- SC1007 (warning) ...
1

These are the only findings in the whole tree — the CI job log (run 28546, job static) prints exactly these five and nothing else before RUN exit status 1. Fixing them turns the leg green.

The fix

Quote the empty value in all five places — same semantics, no assertion weakened:

-GATE_DOCS_GLOBS= gate_langs_for_files
+GATE_DOCS_GLOBS='' gate_langs_for_files

gate-lib.sh itself is unchanged, so no re-vendor is needed for the CI leg to go green: ci / static lints the repo root directly, and it passes as soon as the root fix lands on main. (Per the usual rule a root change otherwise reaches a running .sandcastle/ copy only when a human bumps the pin — that just doesn't apply to this one, since only a test file changes.)

Why nothing caught it pre-push

gate-lib.sh's pre-push tiers are go / ts / gofmt / docs — there is no shell/shellcheck tier. A shellcheck regression in this repo is therefore only ever discovered by ci / static after the push. Worth a follow-up ticket (a shell tier for the gate, or at minimum a shellcheck step in the repo's own pre-push hook); not in scope here.

Evidence

  • job-log.txt job 1 (static, task 309647, run 28546) — the five SC1007 blocks, then ⚙️ [runner]: RUN exit status 1 / Job 'static' failed.
  • runs.json — static on ci.yml: 309590 (run 28542, 03:56 UTC) failure, 309647 (run 28546, 04:27 UTC) failure; the test leg green in both.
  • Host is healthy (96 G free, load fine), api_http=200 at 0.76 s, the worker log for the current window completes cleanly — nothing transient here.

Filed by the swarm healer (watchdog mode, signature 5653c0ad3cd5, heal run heal-Matou-dev-factory-1794978138-3686001). Classed product: the fault is in repo-root tests/, which the healer charter forbids it from editing — hence a ticket rather than a hotfix.

`ci / static` has been red on every push to `main` since **be0e402** (2026-11-17 22:44:59 -0500 / 03:45 UTC). The `test` leg is green; only `static` fails, so the fault is lint-only, not behavioural. ## Root cause be0e402 (`gate-lib: the docs tier's trees are per-repo … (#47)`) added five env-prefix assignments of the form `GATE_DOCS_GLOBS= <cmd>` to `tests/gate-lib-test.sh`. `shellcheck -S warning` flags each one **SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' …)**, and `.forgejo/workflows/ci.yml`'s `shellcheck -S warning -x` step treats warnings as failures — so the job exits 1. Offending lines (all in `tests/gate-lib-test.sh`): **28, 31, 33, 637, 640**. Reproduced locally with the pinned shellcheck (`v0.11.0`, the same cached tarball CI uses): ``` $ shellcheck -S warning -x tests/gate-lib-test.sh ; echo $? In tests/gate-lib-test.sh line 28: eq "" "$(printf 'docs/slices/x.mermaid\n' | GATE_DOCS_GLOBS= gate_langs_for_files)" ... ^-- SC1007 (warning) ... 1 ``` These are the **only** findings in the whole tree — the CI job log (run 28546, job `static`) prints exactly these five and nothing else before `RUN exit status 1`. Fixing them turns the leg green. ## The fix Quote the empty value in all five places — same semantics, no assertion weakened: ```diff -GATE_DOCS_GLOBS= gate_langs_for_files +GATE_DOCS_GLOBS='' gate_langs_for_files ``` `gate-lib.sh` itself is unchanged, so **no re-vendor is needed** for the CI leg to go green: `ci / static` lints the repo root directly, and it passes as soon as the root fix lands on `main`. (Per the usual rule a root change otherwise reaches a running `.sandcastle/` copy only when a human bumps the pin — that just doesn't apply to this one, since only a test file changes.) ## Why nothing caught it pre-push `gate-lib.sh`'s pre-push tiers are go / ts / gofmt / docs — there is **no shell/shellcheck tier**. A shellcheck regression in this repo is therefore only ever discovered by `ci / static` *after* the push. Worth a follow-up ticket (a shell tier for the gate, or at minimum a `shellcheck` step in the repo's own pre-push hook); not in scope here. ## Evidence - `job-log.txt` job 1 (`static`, task 309647, run 28546) — the five SC1007 blocks, then `⚙️ [runner]: RUN exit status 1` / `Job 'static' failed`. - `runs.json` — `static` on ci.yml: 309590 (run 28542, 03:56 UTC) **failure**, 309647 (run 28546, 04:27 UTC) **failure**; the `test` leg green in both. - Host is healthy (96 G free, load fine), `api_http=200` at 0.76 s, the worker log for the current window completes cleanly — nothing transient here. Filed by the swarm healer (watchdog mode, signature `5653c0ad3cd5`, heal run `heal-Matou-dev-factory-1794978138-3686001`). Classed **product**: the fault is in repo-root `tests/`, which the healer charter forbids it from editing — hence a ticket rather than a hotfix.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=28562
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=28562 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

⏩ independent reviewer for #349 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #349 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>
Author
Member

close-report for #349 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261118-050837-870db6 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 349,
  "status": "success",
  "commits": [
    "d5d2855"
  ],
  "changed_files": [
    "tests/gate-lib-test.sh"
  ],
  "tests": [
    {
      "command": "bash tests/gate-lib-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Quote the empty value in all five places (lines 28, 31, 33, 637, 640)": "commit d5d2855 changes all five `GATE_DOCS_GLOBS= ` prefixes to `GATE_DOCS_GLOBS=''` in tests/gate-lib-test.sh; `grep -n 'GATE_DOCS_GLOBS= ' tests/gate-lib-test.sh` now returns no matches",
    "Same semantics, no assertion weakened — gate-lib.sh unchanged, no re-vendor needed": "only tests/gate-lib-test.sh is in the diff; gate-lib.sh is untouched. `bash tests/gate-lib-test.sh` passes 59 checks (exit 0)",
    "Fixing them turns ci/static green": "SC1007 was the sole finding in the tree per the ticket's CI log; quoting the empty value removes exactly those five findings with no new ones"
  },
  "summary": "Quoted the five empty `GATE_DOCS_GLOBS=` env prefixes in tests/gate-lib-test.sh as `GATE_DOCS_GLOBS=''` to clear shellcheck SC1007 and green ci/static.",
  "blockers": []
}
**close-report** for #349 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261118-050837-870db6` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 349, "status": "success", "commits": [ "d5d2855" ], "changed_files": [ "tests/gate-lib-test.sh" ], "tests": [ { "command": "bash tests/gate-lib-test.sh", "exit_code": 0 } ], "criteria": { "Quote the empty value in all five places (lines 28, 31, 33, 637, 640)": "commit d5d2855 changes all five `GATE_DOCS_GLOBS= ` prefixes to `GATE_DOCS_GLOBS=''` in tests/gate-lib-test.sh; `grep -n 'GATE_DOCS_GLOBS= ' tests/gate-lib-test.sh` now returns no matches", "Same semantics, no assertion weakened — gate-lib.sh unchanged, no re-vendor needed": "only tests/gate-lib-test.sh is in the diff; gate-lib.sh is untouched. `bash tests/gate-lib-test.sh` passes 59 checks (exit 0)", "Fixing them turns ci/static green": "SC1007 was the sole finding in the tree per the ticket's CI log; quoting the empty value removes exactly those five findings with no new ones" }, "summary": "Quoted the five empty `GATE_DOCS_GLOBS=` env prefixes in tests/gate-lib-test.sh as `GATE_DOCS_GLOBS=''` to clear shellcheck SC1007 and green ci/static.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#349
No description provided.