Skip to content

[architect] :testing promotion gate hardcodes the flavor count — a fifth literal outside config/flavors.json #42

Closed

Description

@hivecommons-hive

config/flavors.json exists so that one edit changes the flavor set everywhere. scripts/flavors.py explains this in its own docstring:

There are four places that have to agree about this: the build matrix, the promote matrix, the release matrix, and whether the kernel cache image is worth building at all. They were four separate literals, so narrowing the set in one would have left the others promoting images that no longer exist.

There is a fifth place, and it was missed.

The literal

.github/workflows/post-testing-e2e.yml:39

done < <(find /tmp/digests -name '*.txt' -exec cat {} +)
test "$count" -eq 4

4 is the flavor cardinality. It is not derived from anything.

Why this one is worse than the four that were fixed

The four literals that flavors.py replaced failed loudly — promoting an image nothing produced errors out with a name in the log. This one fails silently and late, on the branch that matters:

  • post-testing-e2e is the workflow that advances the :testing tag. build.yml sets publish_stream_tag: "false" for both matrices (lines 133, 159) precisely so that this job is the only thing that moves :testing.
  • Narrow flavors.json to three flavors: the build goes fully green, four digests become three, test 3 -eq 4 fails, and no image is promoted to :testing at all — including main, which had nothing to do with the change.
  • The symptom is a green Build Utah run and a :testing tag that quietly stopped moving. post-testing-e2e is a workflow_run job, so it does not appear on the PR that caused it.

Why nothing catches it

just check has a guard for exactly this class of drift (Justfile:101):

! grep -rn 'utah-nvidia\|utah-gaming' .github/workflows/

It greps for flavor names. The count is a bare integer, so it passes clean.

Fix

Add a count query to flavors.py, resolve it in the job, and extend just check to assert the gate stays derived. PR to follow.

— hive: agent=architect backend=copilot model=claude-opus-5

Activity

  1. hivecommons-hive commented on Sep 6, 2026

    @hivecommons-hive
    ContributorAuthor

    The fix is written and verified, but cannot be pushed: the agent App token lacks the workflows permission, so any commit touching .github/workflows/post-testing-e2e.yml is rejected at the remote.

    ! [remote rejected] refusing to allow a GitHub App to create or update workflow
      `.github/workflows/post-testing-e2e.yml` without `workflows` permission
    

    #44 lands the half that can be pushed, including the flavors.py count query this needs. What remains is a two-line change a human can apply:

       promote-to-testing:
         runs-on: ubuntu-latest
         permissions:
    +      contents: read
           packages: write
           actions: read
         steps:
    +      - name: Checkout
    +        uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
    +      - name: Resolve the expected image count
    +        id: flavors
    +        run: echo "count=$(python3 scripts/flavors.py count)" >> "$GITHUB_OUTPUT"
           - name: Download all flavor digests
    @@
               REGISTRY: ghcr.io/${{ github.repository_owner }}
    +          EXPECTED: ${{ steps.flavors.outputs.count }}
    @@
    -          test "$count" -eq 4
    +          test "$count" -eq "$EXPECTED"

    Note the job needs contents: read added — the top-level permissions: read-all does not apply once the job declares its own block.

    The matching just check assertion is left in place as a comment in #44 rather than silently dropped, so it can be uncommented in the same change:

    ! grep -nE 'count" -eq [0-9]' .github/workflows/post-testing-e2e.yml
    grep -q 'flavors.py count' .github/workflows/post-testing-e2e.yml
    

    Both assertions were confirmed to fail against the current test "$count" -eq 4.

    🐝 Hive Agent: architect | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: f69f8c9

    — hive: agent=architect backend=copilot model=claude-opus-5

  2. castrojo commented on Sep 26, 2026

    @castrojo
    Contributor

    This was generated by AI during triage.

    Closing as completed / obsolete: resolved by post-testing matrix workflow refactoring (PR #229 / PR #249), eliminating the hardcoded flavor count check.

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

    agent/architectFiled or owned by the architect agent.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions