Skip to content

Add a Per-Leg Check Hook or Document That install-test-deps May Run Checks #2853

Closed

Description

@ptr727

Problem

There is no hook for a check that needs one test leg's environment, for example running mypy against a leg's minimum library version.

  • .github/workflows/validate-task.yml:633-638 calls the caller's install-test-deps hook once per test-matrix leg, passing leg and directories, immediately before pytest.
  • docs/reusable-workflows.md:59 describes the hook as taking leg and directories and "reporting nothing back", and docs/reusable-workflows.md:480 and validate-task.yml:43 describe it as the leg's dependency install.
  • The lint job and the validate job run once, outside any leg, so neither sees a leg's resolved dependencies.

A caller wanting to type-check against each leg's pinned minimum library has two options. It can run the check from inside install-test-deps, which the docs frame as install-only, or it can rebuild each leg's environment in a separate job.

Impact

Callers either avoid the check, so a break against the oldest supported library version goes unseen until a user hits it, or they put a check in a hook documented as install-only, where a failure surfaces as a failed install.

Suggested fix

Either state in docs/reusable-workflows.md that install-test-deps may also run per-leg checks (and what a failure there means), or add a second per-leg hook, for example check-test-leg, run after the install step with the same leg and directories inputs and no effect when absent.

Found while: adopting validate-task.yml in ptr727/homeassistant-purpleair

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    on Oct 11, 2026
  2. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Decision needed (decision triage, 2026-11-01)

    Question: For a check needing one test-matrix leg's environment (for example mypy against the leg's minimum library version), should docs/reusable-workflows.md say install-test-deps may also run such checks, or should validate-task.yml gain a separate optional check-test-leg hook?

    Options, recommended first:

    1. Document that install-test-deps may run per-leg checks (recommended): The hook already runs once per leg after the base install and immediately before the tests, with leg and directories, exactly where a check-test-leg hook would sit, so the only gain would be the step's name. Wording in the hook contract, catalog, and test-matrix description, stating a failure fails that leg's unit-test job before its tests. No work in flight.
    2. Add an optional check-test-leg hook: Clearer failure attribution, at the cost of a new interface: a hashFiles-guarded step, a catalog row, docs, a test. No work in flight.
    3. Decline: Callers keep choosing between a check in a hook documented as install-only and rebuilding each leg in their own job, the gap reported from homeassistant-purpleair. No work in flight.

    Evidence: validate-task.yml:700-705 (install-test-deps hook with leg: ${{ toJSON(matrix) }} and directories) runs right before "Run Python tests step" (line 711). docs/reusable-workflows.md:59 says it reports "nothing back", and the catalog row calls it "a test-matrix leg's dependency install". Unchanged since filing.

    Blocks: none

  3. added
    decision
    on Nov 1, 2026
  4. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Maintainer answer (decision triage, 2026-11-01): Option 1: document that install-test-deps may also run per-leg checks, in the hook contract, the hook catalog, and the test-matrix description. A failure fails that leg's unit-test job before its tests run. This is now work for the next burndown round.

  5. removed
    decision
    on Nov 1, 2026
  6. ptr727 commented on Nov 13, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim (round 7, away mode, 2026-11-13): group #2853, #1801 on branch burndown/workflow-hook-deploy-docs, tier frontier.

    Predicted file set:

    • WORKFLOW.md
    • docs/reusable-workflows.md
    • .github/workflows/validate-task.yml
    • tests/test_release_guards.py
    • .agents/skills/workflow-ci-contract/references/d-guarantees.md, .github/skills/workflow-ci-contract/references/d-guarantees.md, .claude-plugin/fleet-skills/skills/workflow-ci-contract/references/d-guarantees.md, .claude-plugin/fleet-skills/.source-digests/workflow-ci-contract
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions