Repository navigation
test(packit): cover package_chunks and the packit_workflow CLI - #152
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
package_chunks and main() had no assertions, so nothing protected the 256-job matrix cap that packit-srpm-pilot.yml depends on. A matrix past that cap expands to zero jobs without failing the run, which is a green build that built no package at all. The cap is anchored to GitHub's documented limit rather than to MATRIX_CHUNK, so raising the constant past the platform ceiling is itself a failure. main() is driven through a subprocess, matching the other script gates in tests/, because the workflow consumes stdout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
|
Deferring this PR's red Evidence (run https://github.com/projectbluefin/utah-packages/actions/runs/35395821077, job 105863707946) is the same broken factory soname closure tracked in #153: Identical output on No per-PR re-runs; this stays deferred until #153 closes or the baseline goes green.🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.78 |
castrojo
left a comment
There was a problem hiding this comment.
Substantive review:
- Test Coverage: Adds comprehensive coverage for package_chunks and command-line execution of tools/packit_workflow.py, ensuring matrix chunks stay within GitHub's 256-job platform limits.
- Subprocess validation: Commands are tested via subprocess to accurately verify json output consumed by GitHub Actions.
- Validation: Factory contract, validate.py, and unittest suite pass cleanly against current main.
- Outstanding: PR carries the hold label and requires maintainer review to remove hold before merge.
|
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. |
1 similar comment
|
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. |
Test Improvement
Adds coverage for the two untested halves of
tools/packit_workflow.py. Touches exactly one file:tests/test_packit_workflow.py.package_chunks()andmain()had zero assertions (37 stmts, 20 miss, 46%)..github/workflows/packit-srpm-pilot.yml:58,67runspackit_workflow.py packagesand... chunksand feeds the output intomatrix.chunk, sopackage_chunksis the only thing standing between 345 packages and GitHub's 256-job matrix cap — and a matrix past that cap expands to zero jobs without failing the run. That is a green build that built no package.New cases:
package_chunkskeeps a sub-cap list whole, splits at the first package past the cap, and never emits a chunk larger than the capsizeof0or-1raisesValueErrorpackages/chunks/resultare driven through a subprocess, aspackit-srpm-pilot.ymldrives them, asserting the JSON shapesfromJson()consumes (including that eachchunksentry itself parses as a package list)--status maybeand a missing subcommand both exit non-zeroThe cap assertion is anchored to GitHub's documented limit (
GITHUB_MATRIX_CAP = 256), not toMATRIX_CHUNK. Asserting against the constant would follow it wherever it moved; anchoring makes raisingMATRIX_CHUNKpast the platform ceiling a failure in its own right.main()is exercised by subprocess, matchingtests/test_validate.pyandtests/test_check_workflow_quoting.py. In-processcoveragetherefore still reports those lines unhit — that is a property of the measurement, not of the tests.Verification
Mutation check — each of these turns the suite red:
MATRIX_CHUNK = 500test_the_default_chunk_size_stays_under_the_github_capnames[start : start + size + 1]test_chunks_honours_an_explicit_sizeif size < -99:test_a_non_positive_chunk_size_is_rejectedNo production code is touched.
Related Issue
Closes #151
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.78