Skip to content

iterate-on-implementation: quality-gate Step 7 swallows linter exit code via pipe-to-tail #150

@jankneumann

Description

@jankneumann

Problem

/iterate-on-implementation Step 7 (quality-gate run) pipes linter output through | tail (or equivalent), which collapses the pipeline exit code to the last command's status. Bash defaults to returning the exit code of the right-most command in a pipeline unless set -o pipefail is enabled, so a failing linter on the left of the pipe looks like a green check.

The Parallel-Agent tier of the same skill has the same shape.

Evidence

In the wire-autopilot-phase-subagents run, an E402 (module-level import not at top of file) survived 4 IMPL_REVIEW rounds because the quality gate reported success. The error was only caught at cleanup time when SonarCloud surfaced it.

Proposed fix

Either:

  1. Add set -o pipefail at the top of the quality-gate shell block, OR
  2. Drop the | tail and capture full output to a file, then truncate for display while preserving $? from the linter directly.

Option 2 is preferred — pipefail is correct but easy to forget to re-add the next time someone edits the script. Capturing to a file and inspecting $? directly is harder to accidentally regress.

Acceptance

  • A deliberately failing ruff/mypy run in Step 7 causes the skill to surface the failure and block progression on both the single-Agent and Parallel-Agent tiers.
  • Add a unit/integration test that pipes a failing command through the quality-gate runner and asserts non-zero exit.

Source

Follow-up from wire-autopilot-phase-subagents change run (2026-05-10).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions