Skip to content

fix(ujust,gnome): fix changelog repos + LTS support + BT auto-switch - #543

Merged
castrojo merged 1 commit into
mainfrom
fix/changelog-bt-fixes
Jun 13, 2026
Merged

fix(ujust,gnome): fix changelog repos + LTS support + BT auto-switch#543
castrojo merged 1 commit into
mainfrom
fix/changelog-bt-fixes

Conversation

@castrojo

@castrojo castrojo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Two independent bug fixes from issue triage.

fix(ujust): changelog namespace + LTS support (Closes #16)

changelog.just had two bugs:

  1. Hardcoded ublue-os/bluefin — wrong since org migration to projectbluefin
  2. LTS users (lts, lts-hwe) always fetched releases from the non-LTS repo — they should use projectbluefin/bluefin-lts

Fix: select repo based on image tag (lts* -> bluefin-lts, else bluefin), and include lts tags in the release fetch path alongside stable/gts.

feat(gnome): BT audio auto-switch on connect (Closes #268)

Add a pipewire-pulse drop-in at /usr/share/pipewire/pipewire-pulse.conf.d/50-bluefin-bt-switch.conf that loads module-switch-on-connect. This makes the system automatically select a newly connected Bluetooth device as audio output and prefer A2DP over HFP/HSP headset mode — no per-user config required.

Verification

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@castrojo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 30 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: afb99688-be25-4145-882d-91dff8ef1453

📥 Commits

Reviewing files that changed from the base of the PR and between 03c12f2 and 88df2a6.

📒 Files selected for processing (2)
  • system_files/bluefin/usr/share/ublue-os/just/changelog.just
  • system_files/shared/usr/share/pipewire/pipewire-pulse.conf.d/50-bluefin-bt-switch.conf
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/changelog-bt-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot Bot added the area/just label Jun 9, 2026
@castrojo
castrojo enabled auto-merge (squash) June 9, 2026 20:09
@castrojo castrojo closed this Jun 9, 2026
auto-merge was automatically disabled June 9, 2026 20:13

Pull request was closed

@castrojo castrojo reopened this Jun 9, 2026
Two independent fixes:

## fix(ujust): update changelog to projectbluefin repos and add LTS support

changelog.just had two bugs:
1. Hardcoded ublue-os/bluefin — wrong after the org migration to projectbluefin
2. LTS images always fetched from the bluefin (non-LTS) repo — should
   use projectbluefin/bluefin-lts for lts/lts-hwe tags

Fix: select repo based on image tag (lts* -> bluefin-lts, else bluefin)
and include lts tags in the release fetch path alongside stable/gts.

Closes #16

## feat(gnome): auto-switch audio output on Bluetooth device connect

Add a pipewire-pulse drop-in that loads module-switch-on-connect,
making the system automatically select a newly connected Bluetooth
device as the audio output and prefer A2DP over HFP/HSP headset mode.

Config drops into /usr/share/pipewire/pipewire-pulse.conf.d/ and
applies system-wide without requiring per-user configuration.

Closes #268

Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo
castrojo force-pushed the fix/changelog-bt-fixes branch from f87b83a to 88df2a6 Compare June 10, 2026 19:03
castrojo added a commit that referenced this pull request Jun 10, 2026
…stfetch, changelog.just + coverage gate

Closes #571 — rechunker-group-fix and ublue-bling-fastfetch bats tests
Closes #572 — changelog.just LTS/repo-selection logic bats tests
Closes #561 — pytest --cov-fail-under=80 coverage threshold gate

Changes:
- rechunker-group-fix: add GSHADOW_FILE/GROUP_FILE env-var overrides for
  test isolation (with TODO comment: remove when upstream systemd#30852 is
  resolved and this workaround script is deleted)
- changelog.just: apply LTS repo-selection logic from PR #542/#543
  (^lts → projectbluefin/bluefin-lts, else projectbluefin/bluefin)
- tests/test_rechunker_group_fix.bats: 7 tests covering append, duplicate
  detection, multi-group, empty-file, and format correctness
- tests/test_bling_fastfetch.bats: 17 tests covering all 9 accent colors,
  default/unknown fallback, dconf/gsettings chain, quote stripping, and
  FASTFETCH_FORCE_THEME override precedence
- tests/test_changelog.bats: 12 tests covering repo selection (lts/stable/
  gts/latest), URL construction, and exit behaviour — using extracted bash
  body with mocked curl/jq/glow/grep
- unit-tests.yml: add --cov-fail-under=80, wire 3 new bats test steps

Verification:
  just check         ✅
  pre-commit         ✅
  bats (rechunker)   7/7 passed
  bats (fastfetch)   17/17 passed
  bats (changelog)   12/12 passed
  pytest --cov       20/20 passed, 100% coverage (≥80% gate passed)

Assisted-by: Claude Sonnet 4.6 via pi
castrojo added a commit that referenced this pull request Jun 10, 2026
…tch, changelog.just + coverage gate (#573)

* test(quality): add bats tests for rechunker-group-fix, ublue-bling-fastfetch, changelog.just + coverage gate

Closes #571 — rechunker-group-fix and ublue-bling-fastfetch bats tests
Closes #572 — changelog.just LTS/repo-selection logic bats tests
Closes #561 — pytest --cov-fail-under=80 coverage threshold gate

Changes:
- rechunker-group-fix: add GSHADOW_FILE/GROUP_FILE env-var overrides for
  test isolation (with TODO comment: remove when upstream systemd#30852 is
  resolved and this workaround script is deleted)
- changelog.just: apply LTS repo-selection logic from PR #542/#543
  (^lts → projectbluefin/bluefin-lts, else projectbluefin/bluefin)
- tests/test_rechunker_group_fix.bats: 7 tests covering append, duplicate
  detection, multi-group, empty-file, and format correctness
- tests/test_bling_fastfetch.bats: 17 tests covering all 9 accent colors,
  default/unknown fallback, dconf/gsettings chain, quote stripping, and
  FASTFETCH_FORCE_THEME override precedence
- tests/test_changelog.bats: 12 tests covering repo selection (lts/stable/
  gts/latest), URL construction, and exit behaviour — using extracted bash
  body with mocked curl/jq/glow/grep
- unit-tests.yml: add --cov-fail-under=80, wire 3 new bats test steps

Verification:
  just check         ✅
  pre-commit         ✅
  bats (rechunker)   7/7 passed
  bats (fastfetch)   17/17 passed
  bats (changelog)   12/12 passed
  pytest --cov       20/20 passed, 100% coverage (≥80% gate passed)

Assisted-by: Claude Sonnet 4.6 via pi

* docs(testing): update TESTING.md with new test coverage and patterns

- Add rechunker-group-fix, ublue-bling-fastfetch, test_changelog to
  test files reference table
- Update coverage target: threshold now active at ≥80% (--cov-fail-under=80)
- Add pattern: extracting bash body from just recipes for bats testing
- Add pitfall note: literal '*' in grep patterns must be escaped as '\*'
  (unescaped '*' is a regex quantifier, silently gives wrong match)

Assisted-by: Claude Sonnet 4.6 via pi

* fix(test): add IMAGE_INFO_FILE override to changelog.just, fix changelog bats in CI

The changelog.just script reads image-info.json via a bash stdin redirect
('< /usr/share/ublue-os/image-info.json'). In the GHA CI environment this
file does not exist, causing the shell to fail the redirect before jq is
invoked, leaving TAG empty. With TAG empty the LTS branch is never taken,
so tests 1-3, 7, 9 failed.

Fix:
- changelog.just: accept IMAGE_INFO_FILE env override (matching the pattern
  used by libsetup, ublue-privileged-setup, and luks-tpm2-autounlock)
- test_changelog.bats: create a temp image-info.json in WORKDIR, export
  IMAGE_INFO_FILE pointing at it; add comment explaining why it is required

Verification:
  bats tests/test_changelog.bats   12/12 ✅
  just check                         ✅
  pre-commit run --all-files         ✅

Assisted-by: Claude Sonnet 4.5 via pi

* fix(ci): --cov target was tests/ not hooks.py — measure actual source coverage

--cov=tests measured coverage of the test files themselves (always ~100%).
The 80% gate was never protecting hooks.py.

Fix: --cov=system_files/bluefin/etc/bazaar reports hooks.py coverage
directly.  Local run: 95% coverage, 20 tests passed, gate passes.

Assisted-by: Claude Sonnet 4.5 via pi

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This was generated by AI during triage.

Verdict: LGTM 🟢

Clean, minimal fix for two independent bugs. Changelog repo selection logic is correct across all streams, and the PipeWire BT auto-switch drop-in is properly placed and well-justified. No blockers.

@castrojo
castrojo added this pull request to the merge queue Jun 11, 2026
@castrojo castrojo added the lgtm label Jun 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 11, 2026
@castrojo
castrojo added this pull request to the merge queue Jun 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 13, 2026
@castrojo
castrojo added this pull request to the merge queue Jun 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 13, 2026
castrojo pushed a commit that referenced this pull request Jun 13, 2026
The upload-sarif step inside scan-image composite action fails in
merge_group events because the ephemeral ref
refs/heads/gh-readonly-queue/... is not found by codeql-action.

PR builds already run the full Trivy scan; the merge queue build is
redundant for CVE checking. Skip both the export and scan steps for
merge_group events.

Fixes the stuck merge queue for PR #543 and all future PRs.

Assisted-by: Claude Sonnet 4.5 via pi
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
castrojo pushed a commit that referenced this pull request Jun 13, 2026
The upload-sarif step inside scan-image composite action fails in
merge_group events because the ephemeral ref
refs/heads/gh-readonly-queue/... is not found by codeql-action.

PR builds already run the full Trivy scan; the merge queue build is
redundant for CVE checking. Skip both the export and scan steps for
merge_group events.

Fixes the stuck merge queue for PR #543 and all future PRs.

Assisted-by: Claude Sonnet 4.5 via pi
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
castrojo added a commit that referenced this pull request Jun 13, 2026
…660)

The upload-sarif step inside scan-image composite action fails in
merge_group events because the ephemeral ref
refs/heads/gh-readonly-queue/... is not found by codeql-action.

PR builds already run the full Trivy scan; the merge queue build is
redundant for CVE checking. Skip both the export and scan steps for
merge_group events.

Fixes the stuck merge queue for PR #543 and all future PRs.

Assisted-by: Claude Sonnet 4.5 via pi

Co-authored-by: Jorge Castro <jorge@projectbluefin.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo castrojo reopened this Jun 13, 2026
@castrojo
castrojo merged commit 31b2fae into main Jun 13, 2026
8 checks passed
@castrojo
castrojo deleted the fix/changelog-bt-fixes branch June 13, 2026 03:38
@castrojo castrojo added 4-review A pull request is awaiting review. and removed lgtm labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4-review A pull request is awaiting review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GNOME Auto switch to new connected BT Device + try setting it to Headphone (A2DP) and avoid Handsfree changelogs show fedora changelogs on lts

2 participants