Provision shellcheck fleet-wide and flip the pre-push shellcheck tier (#379) to fail-closed via GATE_SHELLCHECK_REQUIRE=1 #380

Open
opened 2026-11-20 02:40:55 +00:00 by matou-build-agent · 2 comments

Follow-up to #379, which added a shellcheck tier to the pre-push gate but ruled it fail-OPEN by default (ADR 0174): where no shellcheck resolves it warns and passes, so an SC -S warning regression can still reach main and red ci / static CI-only (the #360/#371/#378 pattern it is meant to end). See GOTCHAS #379.

The tier enforces only where a shellcheck is armed (on PATH, or GATE_SHELLCHECK_CMD). To make it actually enforce fleet-wide:

  1. Provision shellcheck so it is present-by-contract on every push path:
    • each pool host's dev-shell / PATH (bens-mac-04 has none today — confirmed 2026-11-19);
    • each consumer dev-shell / flake (cf. #332 — the shellcheck-tarball fetch was fraught, so prefer a pinned nix package over an ad-hoc download);
    • the sandbox image (so a worker's --prepush enforces at authoring time).
  2. Flip to fail-closed by setting GATE_SHELLCHECK_REQUIRE=1 where provisioned, so a host that LOSES its shellcheck fails loud instead of silently reverting to fail-open.

Why human

This is host/flake posture — installing a toolchain on pool hosts, editing consumer dev-shells/flakes, and widening a gate from advisory to blocking across the live reconcile rail. That is a one-way door (and a per-consumer provisioning judgement) an unattended session must not take; #379 deliberately left it here. A session can do the reversible parts (e.g. add shellcheck to the factory's own path / sandbox image and set the toggle on a single host as a two-way-door trial) but the fleet-wide flip needs a human's go.

Prereq: a re-vendor past #379 so the tier + the GATE_SHELLCHECK_REQUIRE knob are in the running .sandcastle/ copy + consumers (GOTCHAS 4).

Follow-up to **#379**, which added a shellcheck tier to the pre-push gate but ruled it **fail-OPEN by default** (ADR 0174): where no `shellcheck` resolves it warns and passes, so an SC `-S warning` regression can still reach `main` and red `ci / static` CI-only (the #360/#371/#378 pattern it is meant to end). See **GOTCHAS #379**. The tier enforces only where a `shellcheck` is armed (on PATH, or `GATE_SHELLCHECK_CMD`). To make it actually enforce fleet-wide: 1. **Provision `shellcheck`** so it is present-by-contract on every push path: - each pool host's dev-shell / PATH (`bens-mac-04` has none today — confirmed 2026-11-19); - each consumer dev-shell / flake (cf. #332 — the shellcheck-tarball fetch was fraught, so prefer a pinned nix package over an ad-hoc download); - the sandbox image (so a worker's `--prepush` enforces at authoring time). 2. **Flip to fail-closed** by setting `GATE_SHELLCHECK_REQUIRE=1` where provisioned, so a host that LOSES its `shellcheck` fails loud instead of silently reverting to fail-open. ## Why human This is **host/flake posture** — installing a toolchain on pool hosts, editing consumer dev-shells/flakes, and widening a gate from advisory to blocking across the live reconcile rail. That is a one-way door (and a per-consumer provisioning judgement) an unattended session must not take; #379 deliberately left it here. A session can do the reversible parts (e.g. add `shellcheck` to the factory's own path / sandbox image and set the toggle on a single host as a two-way-door trial) but the fleet-wide flip needs a human's go. Prereq: a re-vendor past #379 so the tier + the `GATE_SHELLCHECK_REQUIRE` knob are in the running `.sandcastle/` copy + consumers (GOTCHAS 4).
Author
Member

⚠️ Triage is starving. This repo's triage has yielded 3 consecutive ticks (most recent reason: workdir-busy) with 1 untriaged issue(s) still open — the host's shared heavy slots have been busy or a rehearsal drive has reserved host capacity, so no /triage pass has run for them. New tickets here are waiting behind other work; a human may want to check host capacity.

Ruled by agent under ADR 0174 — veto anytime. Automated starvation signal (Matou/dev-factory #110): posted once per episode, cleared on the next real triage pass.

⚠️ **Triage is starving.** This repo's triage has yielded **3 consecutive ticks** (most recent reason: `workdir-busy`) with **1** untriaged issue(s) still open — the host's shared heavy slots have been busy or a rehearsal drive has reserved host capacity, so no `/triage` pass has run for them. New tickets here are waiting behind other work; a human may want to check host capacity. Ruled by agent under ADR 0174 — veto anytime. Automated starvation signal (Matou/dev-factory #110): posted once per episode, cleared on the next real triage pass.
Author
Member

This was generated by AI during triage.

Triage ruling — enhancement + ready-for-human

Category: enhancement — this is a toolchain-provisioning + gate-posture improvement, not a broken behaviour.

Verification (claim holds):

  • gate-lib.sh:445-482 confirms gate_shellcheck_stage is fail-OPEN by default where no shellcheck resolves, and GATE_SHELLCHECK_REQUIRE=1 (gate-lib.sh:473) flips the no-binary arm fail-closed. Proven by tests/gate-lib-test.sh:518,564-567.
  • GATE_SHELLCHECK_REQUIRE is not set as a default anywhere in the harness — grep finds only the gate logic, its test, and the STATUS/GOTCHAS notes. So the fail-closed flip is genuinely not yet done.
  • Not redundant / not already implemented: #379 landed only the tier (STATUS.md:44, GOTCHAS #379); fleet provisioning + the flip remain open work. No matching .out-of-scope/ prior rejection (the KB is empty).

Why not a swarm ticket: the reversible slice a session could take (add shellcheck to the factory's own PATH/sandbox image, toggle GATE_SHELLCHECK_REQUIRE=1 on a single host as a two-way-door trial) is dwarfed by the ticket's actual ask — the fleet-wide flip.

Why human

The one-way-door residue is twofold and cannot be ruled by an agent under ADR 0174:

  1. Security-posture widening across the live reconcile rail — flipping the pre-push gate from advisory to blocking fleet-wide blocks every shell-touching push on each host, not revertible by a later commit alone and not provable by an existing test/drive at fleet scale.
  2. Ben's hands + per-consumer provisioning — installing shellcheck on pool hosts (bens-mac-04 has none, confirmed 2026-11-19) is real hardware; editing consumer dev-shells/flakes crosses the pull-only topology (ADR 0001) that forbids pushing to product repos from here.

Prereq noted in the body stands: a re-vendor past #379 (GOTCHAS 4) must land the tier + knob in the running .sandcastle/ and consumers before the flip can enforce.

Routing to ready-for-human for Ben's go on the fleet-wide flip; the reversible trial slice can be carved into a separate ready-for-session ticket if desired.

> *This was generated by AI during triage.* ## Triage ruling — `enhancement` + `ready-for-human` **Category:** `enhancement` — this is a toolchain-provisioning + gate-posture improvement, not a broken behaviour. **Verification (claim holds):** - `gate-lib.sh:445-482` confirms `gate_shellcheck_stage` is **fail-OPEN by default** where no `shellcheck` resolves, and `GATE_SHELLCHECK_REQUIRE=1` (`gate-lib.sh:473`) flips the no-binary arm fail-closed. Proven by `tests/gate-lib-test.sh:518,564-567`. - `GATE_SHELLCHECK_REQUIRE` is **not** set as a default anywhere in the harness — grep finds only the gate logic, its test, and the STATUS/GOTCHAS notes. So the fail-closed flip is genuinely not yet done. - Not redundant / not already implemented: #379 landed only the tier (STATUS.md:44, GOTCHAS #379); fleet provisioning + the flip remain open work. No matching `.out-of-scope/` prior rejection (the KB is empty). **Why not a swarm ticket:** the reversible slice a session *could* take (add `shellcheck` to the factory's own PATH/sandbox image, toggle `GATE_SHELLCHECK_REQUIRE=1` on a single host as a two-way-door trial) is dwarfed by the ticket's actual ask — the **fleet-wide** flip. ## Why human The one-way-door residue is twofold and cannot be ruled by an agent under ADR 0174: 1. **Security-posture widening across the live reconcile rail** — flipping the pre-push gate from advisory to blocking fleet-wide blocks every shell-touching push on each host, not revertible by a later commit alone and not provable by an existing test/drive at fleet scale. 2. **Ben's hands + per-consumer provisioning** — installing `shellcheck` on pool hosts (`bens-mac-04` has none, confirmed 2026-11-19) is real hardware; editing consumer dev-shells/flakes crosses the pull-only topology (ADR 0001) that forbids pushing to product repos from here. Prereq noted in the body stands: a re-vendor past #379 (GOTCHAS 4) must land the tier + knob in the running `.sandcastle/` and consumers before the flip can enforce. Routing to **`ready-for-human`** for Ben's go on the fleet-wide flip; the reversible trial slice can be carved into a separate `ready-for-session` ticket if desired.
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#380
No description provided.