Skip to content

ci: derive the ci-status lane list instead of restating it in results: #57

Closed

Description

@kyle-sexton

Context

.github/workflows/ci.yml declares the lane roster three times: the eight lane job definitions, the needs: list on ci-status (line 144), and the results: input, which interpolates needs.<lane>.result eight times by hand.

All three agree today. The hazard is that only two of them are checked by anything. A lane dropped from results: alone still gates the merge — needs: makes ci-status wait for it — but its verdict never reaches the aggregator, so ci-status reports green on that lane's failure. No linter, schema, or actionlint rule catches the omission, and the failure is silent in the direction that matters: the gate passes when it should not.

Adding a lane currently means three coordinated edits, one of which fails open.

Proposed work

Replace the hand-written results: string with a derived expression:

results: ${{ join(needs.*.result, ' ') }}

This is verified viable against the composite, not assumed. ci-workflows/.github/actions/ci-status/action.yml documents results as "Whitespace-separated job results, one per aggregated lane — the caller builds this from needs.<lane>.result", and its implementation word-splits the value unquoted on IFS. join() with a space separator produces exactly that form. The composite already fails closed on empty input ("a gate with nothing to aggregate is a miswired needs list, not a pass"), so a mistake in the expression goes red rather than green.

After the change the roster is declared twice, and both remaining declarations are load-bearing.

Required stages before implementation

None. The shape is a one-line change whose viability was checked against the consuming composite's implementation before filing. Go straight to the change and its verification.

Acceptance criteria

  • results: in the ci-status job is a single derived expression, not an eight-term hand-written list.
  • A CI run on the PR shows ci-status green with all eight lanes passing.
  • A deliberately failed lane (temporary, not merged) shows ci-status red — proving the derived list still carries every lane's verdict.

References

  • .github/workflows/ci.yml — the three declarations; needs: at line 144.
  • melodic-software/ci-workflows .github/actions/ci-status/action.yml — the results input contract and its word-splitting implementation.

Note on the adjacent finding, deliberately out of scope here: the eight lane bodies are near-identical (checkout + one remote action) and cannot be collapsed in this repo — GitHub Actions forbids expressions in uses: and has no YAML anchors. Collapsing them would mean a single composite in ci-workflows running every lint lane, which is a larger design question and not part of this change.

Surfaced by an architecture deepening scan of this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions