Skip to content

test: repair broken-at-birth bats suites (test_ujust mock brew, powerwash bctl) - #1106

Open
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
arch/derive-test-catalog
Open

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

@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
@kubestellar-hive kubestellar-hive Bot changed the title [architect] test: repair broken-at-birth bats suites (test_ujust mock brew, powerwash bctl) — enabler for common#1105 test: repair broken-at-birth bats suites (test_ujust mock brew, powerwash bctl) — enabler for common#1105 Sep 17, 2026
@kubestellar-hive kubestellar-hive Bot added the agent/scanner Filed or owned by the scanner agent. label Sep 17, 2026
@kubestellar-hive kubestellar-hive Bot changed the title test: repair broken-at-birth bats suites (test_ujust mock brew, powerwash bctl) — enabler for common#1105 test: repair broken-at-birth bats suites (test_ujust mock brew, powerwash bctl) Sep 18, 2026
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 force-pushed the arch/derive-test-catalog branch from a6b6972 to 197b546 Compare September 18, 2026 14:37

@Danathar Danathar left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the premise: on current main, bats tests/test_ujust.bats tests/test_shared_just.bats has 7 failures; at this PR's head all 26 pass. The powerwash rewrite matches what the recipe does after #1083 (double gum confirmation → sudo bootc install reset --experimental, no bctl), and the bundle mock case is the minimal fix for #1023's brew bundle calls.

For whoever merges: neither suite is in .github/workflows/unit-tests.yml, so this repair is invisible to CI until that file lists them — which is #1105 and needs a token with the workflows scope. Happy to open that follow-up once this lands.

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. agent/scanner Filed or owned by the scanner 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.

1 participant