[architect] test: repair broken-at-birth bats suites (test_ujust mock brew, powerwash bctl) — enabler for common#1105 - #1106
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
Conversation
Two suites fail on main today but are invisible because CI never runs them (12 of 33 bats suites are ungated — see #1105): - test_ujust.bats: the setup() mock brew exits 1 on any subcommand outside install/shellenv. Recipes grew 'brew bundle' calls in #1023, so all four install-ai-tools tests and the bluespeed present-case test fail. Mock now accepts bundle. - test_shared_just.bats: two powerwash tests asserted delegation to 'bctl powerwash'; that delegation was removed in #1083 five days before the tests were written. Rewritten to assert the current contract: gum double-confirmation -> sudo bootc install reset --experimental, and no bctl invocation even when bctl is on PATH. Both suites now pass locally (26/26). This is the test-side enabler for the derived-catalog CI gate proposed in #1105; the unit-tests.yml change itself is currently blocked on the App token missing the workflows scope. Refs #1105 (left open: unit-tests.yml catalog derivation and Justfile enumeration dedup still outstanding) Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
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-enabling test repair
Files claimed:
tests/test_ujust.bats(setup() mock brew),tests/test_shared_just.bats(two powerwash tests). Cluster: issue common#1105 (test-catalog drift gate).common#1105 measured the test catalog restated 3x (workflow / Justfile / disk) with 12 of 33 bats suites never executed in CI. Two of those ungated suites are red on main today — broken at birth, invisible because nothing runs them:
tests/test_ujust.bats: setup() mockbrewexited 1 on any subcommand outside install/shellenv. Recipes grewbrew bundlecalls in fix: add Bluespeed setup recipe #1023 (2026-09-08); the mock was never updated, so all four install-ai-tools tests and the bluespeed present-case test fail. Fix: mock acceptsbundle(no-op success, still logged to CALLS).tests/test_shared_just.bats: two powerwash tests asserted delegation tobctl powerwash; that delegation was removed in fix: restore native recipes without bluefinctl #1083 (2026-09-05), five days before the tests were written (test(shared.just): BATS coverage for powerwash, toggle-tpm2 #1034, 2026-09-10). Rewritten to assert the current contract: gum double-confirmation →sudo bootc install reset --experimental, and nobctlinvocation even when bctl is on PATH.Both suites pass locally after the fix (26/26), verified with bats 1.14.0.
This PR is the test-side enabler for #1105's derived-catalog gate. The
.github/workflows/unit-tests.ymlderivation itself is implemented and verified but currently unpushable: the App token lacks theworkflowsscope (push rejected; same gap previously hit in bluefin-lts, hive bead 737d89ef-ead). The verified workflow change is preserved in dangling commit fea7089 on this branch's reflog for whoever lands it once the scope gap is fixed.Refs #1105 — left open: unit-tests.yml catalog derivation (blocked on App workflows scope) and Justfile test-recipe dedup (blocked on common#1064 occupying that recipe) are both outstanding.
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=kimi-k3 copilot=1.0.78