Skip to content

[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
mainfrom
arch/derive-test-catalog
Open

[architect] test: repair broken-at-birth bats suites (test_ujust mock brew, powerwash bctl) — enabler for common#1105#1106
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
arch/derive-test-catalog

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

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() mock brew exited 1 on any subcommand outside install/shellenv. Recipes grew brew bundle calls 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 accepts bundle (no-op success, still logged to CALLS).
  • tests/test_shared_just.bats: two powerwash tests asserted delegation to bctl 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 no bctl invocation 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.yml derivation itself is implemented and verified but currently unpushable: the App token lacks the workflows scope (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

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>
@kubestellar-hive kubestellar-hive Bot added hold Work is intentionally paused. architecture Structural or interface design work. agent/architect Filed or owned by the architect agent. hive/hosted-projectbluefin-knuckle-gjvq Routed by the hosted Project Bluefin Hive deployment. labels Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/architect Filed or owned by the architect agent. architecture Structural or interface design work. hive/hosted-projectbluefin-knuckle-gjvq Routed by the hosted Project Bluefin Hive deployment. hold Work is intentionally paused.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants