Skip to content

test: architecture.md inventory-count drift gate - #162

Closed
mrbobbytables wants to merge 1 commit into
projectbluefin:mainfrom
mrbobbytables:test/architecture-doc-count-gate
Closed

mrbobbytables wants to merge 1 commit into
projectbluefin:mainfrom
mrbobbytables:test/architecture-doc-count-gate

Conversation

@mrbobbytables

Copy link
Copy Markdown
Contributor

The Coverage section of docs/architecture.md publishes four numbers as verifiable command output (ls -d packages/*/ | wc -l, .packit.yaml packages count, config/upstream-sources.json packages count, and the output of tools/validate.py). Nothing kept them honest, causing the document's coverage contract claims to drift as recipes were added or removed.

This PR:

  1. Updates the inventory counts in docs/architecture.md to reflect current repository state (340 recipes, and 61 packages carrying a hand-assigned stage).
  2. Adds tests/test_architecture_counts.py to dynamically recompute each claim from tools.package_inventory.inventory and tools.package_inventory.source_locks.
  3. Runs tools/validate.py in the test to verify that it succeeds (exit 0) and that docs/architecture.md accurately quotes its output.
  4. Gates the review table's hand-assigned stage count against config/upstream-sources.json.

Closes #102

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

🐝 Hive Agent: contributor | SHA: c3931a8

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 stale counts while the
repository inventory evolved, so the document stating the factory's coverage
contract disagreed with the factory.

Correct the counts in docs/architecture.md, and add
tests/test_architecture_counts.py, which recomputes each one dynamically from
tools.package_inventory.inventory -- the same contract the factory reads --
and compares the quoted validate.py report against tools/validate.py's actual
output. The hand-assigned stage count quoted in the review table is gated the
same way.

Closes projectbluefin#102

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>

@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:

  • Correctness & Robustness: The new tests/test_architecture_counts.py introduces automated drift detection for package inventory assertions in docs/architecture.md, checking against tools.package_inventory and tools.validate.
  • Validation: All 324 unit tests, factory contract, and validate.py 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.

@hanthor hanthor closed this Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants