Skip to content

fix: missing host class in batteries#606

Merged
sini merged 2 commits into
denful:mainfrom
KP64:fix/standalone-hm-unfree-battery
Jun 11, 2026
Merged

fix: missing host class in batteries#606
sini merged 2 commits into
denful:mainfrom
KP64:fix/standalone-hm-unfree-battery

Conversation

@KP64

@KP64 KP64 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

With PR #605 standalone homes have a host identity. This caused the check to pass even though the host has no class causing the unfree battery to fail with the following error:

       error: attribute 'class' missing
       at /nix/store/wnv7bc1psj89ylp29z3kabkbpwja0npn-source/modules/aspects/batteries/unfree/unfree.nix:44:28:
           43|           && host != null
           44|           && builtins.elem host.class validClasses
             |                            ^
           45|         ) { ${host.class}.unfree.packages = allowed-names; };

This PR changes a host existence check to the availability of its class.

@KP64 KP64 requested review from sini and vic as code owners June 11, 2026 13:39
@drupol

This comment was marked as resolved.

@KP64

This comment was marked as resolved.

@KP64 KP64 changed the title fix: unfree battery for synthesized hosts fix: missing host class in batteries Jun 11, 2026

@sini sini left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sini sini added the allow-ci allow all CI integration tests label Jun 11, 2026
@sini sini enabled auto-merge (squash) June 11, 2026 14:23
@sini

sini commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

@KP64 thanks for the catch, by the way -- i should really try to dogfood at least one standalone home. :)

@sini sini merged commit d8f94c2 into denful:main Jun 11, 2026
31 of 42 checks passed
@KP64 KP64 deleted the fix/standalone-hm-unfree-battery branch June 11, 2026 16:00
sini added a commit that referenced this pull request Jun 11, 2026
## Why

PR #606 exposed a CI gating bug: re-running the failed `allow-ci` job
kept failing even after the `allow-ci` label was added. The label check
read `github.event.pull_request.labels` — a payload frozen at trigger
time, which re-runs reuse verbatim. A general audit of the workflows
turned up several more robustness issues.

## Changes

### test.yml
- **`allow-ci` queries labels live** via the API instead of the event
payload, so re-runs see labels added after the triggering event.
Permission-check fallback kept (auto-allow-ci's `GITHUB_TOKEN` labeling
doesn't re-trigger workflows).
- **`ci-deep` and `flake-check` are now actually gated by `allow-ci`** —
previously they ran for fork PRs regardless; the gate only protected the
cheap template jobs. They fail (via a `Require allow-ci` first step)
rather than skip, because skipped required checks count as passing under
the ruleset and would let an unvetted PR satisfy `Tests ubuntu-latest`.
**Behavior change:** external PRs get no CI until labeled, matching the
gate's stated intent.
- **Main builds are never cancelled**: `cancel-in-progress` is now
conditional. Back-to-back merges to main previously cancelled each
other's runs, leaving main untested.
- **`non-draft` emits a `nix-changed` output** instead of failing `grep
'.nix'` on docs-only PRs (red ❌ on every review of a non-nix PR).
Downstream jobs skip cleanly, preserving the skipped-required-checks
path that lets docs-only PRs merge. Also fixes the unescaped-dot regex.
- **Only approved reviews re-trigger CI** — `pull_request_review:
submitted` previously fired full CI on comment/changes-requested reviews
too.

### benchmark.yml
- Same live-label-query fix for `allow-bench` and `bench-skip`.

### bogus.yml / docs.yml
- `branches: ["!main"]` was a dead trigger — a filter with only negative
patterns matches no branch at all. Replaced with `branches-ignore:
[main]`.
- docs concurrency group is per-ref; the global `"docs"` group made
concurrent PRs cancel each other's builds. Review-triggered docs builds
gated to approvals.
- `nothing-but-nix` pinned to `@v10` in bogus.yml for consistency.

### gh-pages.yml
- Artifact listing paginates (previously capped at 30 — old doc versions
silently dropped) and picks the newest artifact per `docs-*` name
instead of an arbitrary one.

## Not changed (flagged)

- Actions are tag-pinned, not SHA-pinned (`EndBug/latest-tag@latest` in
particular) — separate supply-chain hardening if desired.
- `pull_request_review` keeps no paths filter by design: it's the
re-trigger lever and the docs-only-merge mechanism.

Validated with `actionlint` (only pre-existing info-level SC2086 notes
remain) and `just fmt`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-ci allow all CI integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants