Repository navigation
test: architecture.md inventory-count drift gate — docs/architecture.md Coverage counts vs tools/package_inventory.py - #103
Closed
hivecommons-hive[bot] wants to merge 1 commit into
Closed
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…rchitecture.md vs tools/package_inventory.py The Coverage section of docs/architecture.md publishes four numbers as verifiable command output: 'ls -d packages/*/ | wc -l', the .packit.yaml and config/upstream-sources.json entry counts, and the line tools/validate.py prints. Nothing kept them honest. All four claimed 193 while the repository carries 192 recipes, so the only document stating the factory's coverage contract disagreed with the factory, and every package added or removed moved it further apart. Correct the four counts, and add tests/test_architecture_counts.py, which recomputes each one from tools.package_inventory.inventory -- the same contract the factory reads -- and fails when the document and the inventory disagree. The hand-assigned stage count quoted in the review table is gated the same way, and validate.py is asserted to still succeed, since quoting its output is only meaningful if it passes. Docs and tests only; no tool or workflow behavior changes. Closes #102 Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
This was referenced Sep 14, 2026
Closed
Member
|
Closing: it conflicts with Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor
Closes #102
docs/architecture.mdpublishes four inventory counts as verifiable command output —ls -d packages/*/ | wc -l, the.packit.yamlandconfig/upstream-sources.jsonentry counts, and the quotedtools/validate.pyline — and invites the reader to reproduce them. All four said193; the repository carries192. The review table's "31 of 193 packages carry a hand-assignedstage" had the same stale denominator (the31is still correct).Nothing gated them, so the only document stating the factory's coverage contract drifted away from the factory, and every package added or removed would have widened the gap.
Exact ground this PR claims
docs/architecture.md— the Coverage section counts (lines ~80–91) and the stage row of the review table.193→192in five places.tests/test_architecture_counts.py— new file. Recomputes every documented count fromtools.package_inventory.inventoryandsource_locks, the same contract the factory itself reads, and fails when the document and the inventory disagree. Also assertstools/validate.pystill returns0, since quoting its output is only meaningful if it passes.Nothing else is touched: no tool behavior, no workflow, no config, no recipe. The
193indocs/superpowers/specs/2026-09-05-full-packit-rpm-factory-design.mdis a dated design snapshot and is deliberately left alone.This follows the pattern the repository already uses for generated artifacts —
tests/test_render_packit_config.pygating.packit.yaml,tools/publish_gate.pygating the publish rule — extended to the coverage claims that had no owner.Verification
python3 -m pytest tests -q→188 passed, 27 subtests passedpython3 -m unittest discover -s tests(the runnerrebuild-rpms.ymlprepareuses) → passespython3 tools/validate.py,python3 tools/factory_contract.py,python3 tools/check_workflow_quoting.py→ pass193failstest_prose_coverage_claim_matches_the_inventory, so the gate is load-bearing rather than tautological.Not claimed here
The related but disjoint finding #101 — the
preparejob's inline matrix heredoc re-parsingconfig/upstream-sources.jsonoutsidetools/package_inventory.py— is not in this PR. Its fix necessarily edits.github/workflows/rebuild-rpms.yml, which the bot push token cannot write (refusing to allow a GitHub App to create or update workflow ... without 'workflows' permission). It is left as an issue for a human.Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-5 copilot=1.0.78