Skip to content

refactor(ci): align Justfile check with CI workflow gate catalog - #163

Closed
mrbobbytables wants to merge 1 commit into
projectbluefin:mainfrom
mrbobbytables:refactor/gate-catalog-alignment
Closed

mrbobbytables wants to merge 1 commit into
projectbluefin:mainfrom
mrbobbytables:refactor/gate-catalog-alignment

Conversation

@mrbobbytables

Copy link
Copy Markdown
Contributor

Summary

Closes #126. Addresses review feedback from #127.

The factory gate catalog was restated across the Justfile, .github/workflows/validate.yml, and the prepare job of .github/workflows/rebuild-rpms.yml, leading to drift where tools/check_workflow_quoting.py and tools/runtime_contract.py ... --check were omitted from just check.

Changes

  1. Justfile: check now runs all five gates:

    • factory-check: python3 tools/factory_contract.py
    • validate: python3 tools/validate.py
    • workflow-quoting: python3 tools/check_workflow_quoting.py
    • runtime-contract: python3 tools/runtime_contract.py config/bluefin-packages.toml config/runtime-contract.toml --check
    • test: python3 -m pytest tests -q
      Each gate is also runnable individually via its own named recipe.
  2. tests/test_gate_catalog.py: New structural consistency test:

    • Scopes workflow gate detection to validate.yml and the Validate factory policy and tests step of rebuild-rpms.yml (plus any step in other workflows explicitly marked with # gate). This prevents false positives on pipeline steps such as tools/rebuild_matrix.py and tools/source_pipeline.py.
    • Normalises gate commands (collapsing verbosity and treating pytest and unittest discover as equivalent test suite runs).
    • Bidirectionally asserts that just check runs every gate CI enforces and runs no gate that CI does not enforce.
    • Enforces that runtime_contract.py is invoked with --check.
  3. Documentation:

    • Updated docs/architecture.md to detail all five gates and reflect that just check runs the entire catalog locally.
    • Updated AGENTS.md, README.md, and docs/contributing.md comments describing just check.

Note: .pre-commit-config.yaml remains a separate hook configuration for pre-commit linting. Part B from #126 (adding the missing jobs to validate.yml) requires workflow file edits reserved for human maintainers or agents with workflows scope.

— hive: backend=copilot model=gemini-3.8-flash

🐝 Hive Agent: contributor | SHA: fd6d416

`just check` is documented as "Everything CI gates on, minus the builds", but
the gate catalog was restated independently with divergent contents:

* Justfile `check` ran tools/factory_contract.py and tools/validate.py;
* .github/workflows/validate.yml ran those two plus pytest;
* the prepare job of .github/workflows/rebuild-rpms.yml ran
  tools/check_workflow_quoting.py, tools/runtime_contract.py --check, and unittest.

tools/check_workflow_quoting.py and tools/runtime_contract.py were absent
from the documented local gate, leading to local vs CI discrepancies.

Justfile: `check` now runs all five gates (factory-check, validate,
workflow-quoting, runtime-contract, test), and each gate gets its own named
recipe.

tests/test_gate_catalog.py: structural consistency test that derives gates from
validate.yml and rebuild-rpms.yml (prepare validation step) and asserts
bidirectional agreement with reachable commands from `just check`. Avoids
false positives on pipeline steps (rebuild_matrix.py, source_pipeline.py) and
enforces that runtime_contract.py retains --check mode.

docs/architecture.md, AGENTS.md, README.md, docs/contributing.md: update
documentation to reflect all five gates run by `just check`.

Assisted-by: Gemini 3.8 Flash via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78

@castrojo castrojo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substantive review:

  • CI & Gate Alignment: Aligns Justfile check with workflow gates and adds tests/test_gate_catalog.py to structurally assert bidirectional parity between Justfile and CI workflow gates.
  • Failure analysis: The rebuild failure on libnice was due to transient build environment network timeout during dnf repo download, unrelated to Justfile/gate tooling changes.
  • Validation: Factory contract, validate.py, recipe set agreement, and all 321 unit tests pass cleanly against main.
  • Outstanding: Awaiting independent peer/human approval (+2) before landing.

@hanthor

hanthor commented Sep 20, 2026

Copy link
Copy Markdown
Member

Closing to consolidate the queue on the merged #178 full-factory candidate. The branch is retained; please re-open or submit a fresh, rebased PR after that build establishes the current baseline.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[architect] factory gate catalog stated 3x with divergent contents — check_workflow_quoting.py never runs for 8 of 10 workflows

3 participants