Skip to content

ci(packaging): make the dormant Homebrew cask job visible, and add the AppStream metadata Flathub needs - #340

Merged
EtienneLescot merged 4 commits into
mainfrom
claude/github-issue-335-a187f9
Aug 11, 2026
Merged

ci(packaging): make the dormant Homebrew cask job visible, and add the AppStream metadata Flathub needs#340
EtienneLescot merged 4 commits into
mainfrom
claude/github-issue-335-a187f9

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two of the four Homebrew checkboxes in #335, plus the upstream prerequisite the Flathub half turns out to need first.

1. The Homebrew cask job no longer reports an unpublished cask as a green release.

The tap configuration lived in the job-level if:, so an unconfigured job resolved to skipped — which is green. Neither HOMEBREW_TAP_OWNER nor HOMEBREW_TAP_REPO had ever existed on this repository, so the cask had never been published once, on any release, with every run reporting success. Exactly #148's failure, fixed the same way publish-winget.yml was: the check moves into a step that names each missing piece in a ::warning::, and the remaining steps gate on its output the way aur-publish.yml already does.

Manual replay also gains the tag guard aur-publish.yml has. workflow_dispatch takes free text and the prerelease filter only covers the release event, so replaying v1.9.4-rc.2 would have published an RC as the cask and handed it to everyone on stable via brew upgrade. Homebrew accepts that version string happily; only this check refuses it.

2. Upstream AppStream metadata (build/com.getopenscreen.OpenScreen.metainfo.xml), validated in CI.

Flathub will not accept a MetaInfo file written by the packager — it has to exist upstream — so no manifest can be submitted until this file lands. It is also missing where it would already help: the shipped 1.9.2 deb installs a .desktop file and nine icon sizes and no /usr/share/metainfo/ at all, so GNOME Software and Discover have nothing to show but an icon.

The component ID is com.getopenscreen.OpenScreen, deliberately not the Electron appId com.etiennelescot.openscreen. Flathub requires the ID to map to a domain the project controls; getopenscreen.com is that domain, etiennelescot.com is not one anyone here owns, and the Electron appId decides the userData path of every existing install.

Nothing consumes the file yet, so the new appstream CI job is the only thing standing between a broken edit and a submission rejected for it months later.

Done outside the diff

Still open, and deliberately not in this PR

  • HOMEBREW_TAP_TOKEN has to be created by a human — contents write on the tap. Until it exists the job runs and warns, which is the point of the change. Then dispatch the workflow on v1.9.2 and verify brew install --cask getopenscreen/openscreen/openscreen.
  • The Flathub manifest. The issue assumes Flathub "needs its own manifest submitted"; what it actually needs is a from-source build. Flathub's current requirement is that "All source available submissions must be built entirely from source code", with no network during the build, so repackaging our own .deb is out. For this app that means compiling the Rust compositor, the C PipeWire helper, ffmpeg with its renamed symbols and the whisper.cpp/Vulkan STT stack offline inside the sandbox. That is its own project, filed separately rather than guessed at here.

Related issue

Refs #335

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Screenshots / video

Not applicable — no UI change.

Testing

No native helper code is touched, so no manual smoke test applies. Everything asserted below was run, not assumed.

  • Metainfo validated with the real tool, in a bare ubuntu:24.04 container (appstreamcli 1.0.2), which is what the new CI job runs. It failed the first attempt on xml-markup-invalid — an XML comment may not contain a double hyphen, and mine named the appstreamcli flags — and passes after the fix. XML well-formedness re-checked locally afterwards.
  • Both workflow files parse, checked with js-yaml, and the resulting step gating was read back: one always-run reporting step in update-homebrew-cask.yml, seven gated on steps.config.outputs.configured.
  • The reporting step was executed in all three states — no config, token-only, fully configured — and produces the right configured output and warning text in each.
  • The tag regex was executed against v1.9.2, v10.20.30 (accept) and v1.9.4-rc.2, 1.9.2, v1.9, an empty tag and a quote-injection attempt (refuse).
  • The deb claim is measured, not assumed: the shipped Openscreen-Linux-1.9.2.deb was downloaded and unpacked, confirming /usr/share/applications/openscreen.desktop with StartupWMClass=Openscreen, nine icon sizes, and no /usr/share/metainfo/. That is where the metainfo's <launchable> value comes from.
  • node scripts/check-docs.mjs → OK (22 files).

The one thing not verified here is the appstream job on a real runner; it runs on this PR.

Summary by CodeRabbit

  • New Features

    • Added comprehensive application metadata, including licensing, descriptions, screenshots, categories, keywords, supported controls, and release history.
    • Improved compatibility with software catalogs that use AppStream metadata.
  • Documentation

    • Expanded release and engineering documentation with clearer packaging, publishing, versioning, and signing information.
  • Chores

    • Added automated validation to help ensure application metadata remains accurate.
    • Improved release publishing checks so incomplete configuration safely skips unavailable packaging steps.
    • Added safer handling for manual releases by requiring stable version tags.

The tap configuration lived in the job-level `if:`, so an unconfigured job
resolved to `skipped` — which is green. Neither HOMEBREW_TAP_OWNER nor
HOMEBREW_TAP_REPO has ever existed on this repository, so the cask has never
been published once, on any release, with every run reporting success. Same
failure as #148 for winget, and fixed the same way: the check moves into a step
that names each missing piece in a warning.

Manual replay also gains the tag guard aur-publish.yml already has.
workflow_dispatch takes free text and the prerelease filter only covers the
release event, so replaying v1.9.4-rc.2 would have published an RC as the
stable cask.

Refs #335
Flathub will not take a MetaInfo file written by the packager, so the file has
to exist upstream before any manifest can be submitted. It is also missing
where it would already help: the shipped 1.9.2 deb installs a .desktop file and
nine icon sizes and no /usr/share/metainfo/ at all, so GNOME Software and
Discover have nothing to show but an icon.

Component ID is com.getopenscreen.OpenScreen, not the Electron appId
com.etiennelescot.openscreen: Flathub requires the ID to map to a domain the
project controls, getopenscreen.com is that domain, and the Electron appId
decides the userData path of every existing install.

Nothing consumes the file yet, so CI validating it is the only thing between an
edit here and a rejected submission months later. Caught its own first bug that
way, in a container: an XML comment may not contain a double hyphen.

Refs #335
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c106c212-47d3-40ad-b6cf-17c3079684d5

📥 Commits

Reviewing files that changed from the base of the PR and between 9647a24 and 588fa1c.

📒 Files selected for processing (2)
  • .github/workflows/update-homebrew-cask.yml
  • technical-documentation/engineering/release-and-secrets.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • technical-documentation/engineering/release-and-secrets.md
  • .github/workflows/update-homebrew-cask.yml

📝 Walkthrough

Walkthrough

The change adds OpenScreen AppStream metadata and offline CI validation. It also updates the Homebrew cask workflow to validate configuration and stable tags before publishing, and documents the related CI and release requirements.

Changes

AppStream metadata validation

Layer / File(s) Summary
AppStream metadata and CI validation
build/com.getopenscreen.OpenScreen.metainfo.xml, .github/workflows/ci.yml, technical-documentation/engineering/ci-workflows.md
Adds OpenScreen MetaInfo metadata, validates it with appstreamcli while offline, and documents the CI job and component ID.

Homebrew release workflow

Layer / File(s) Summary
Tap configuration and tag validation
.github/workflows/update-homebrew-cask.yml, technical-documentation/engineering/ci-workflows.md
Checks tap variables and token availability, warns about missing configuration, and requires stable vMAJOR.MINOR.PATCH tags.
Conditional publishing and release documentation
.github/workflows/update-homebrew-cask.yml, technical-documentation/engineering/release-and-secrets.md
Gates DMG processing, tap checkout, cask generation, and publishing on validated configuration. Documents tap setup and unsigned, unnotarized DMG behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two main changes: Homebrew cask workflow visibility and AppStream metadata.
Description check ✅ Passed The description completes all template sections and provides detailed scope, related issue, impact, and testing information.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/github-issue-335-a187f9

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
.github/workflows/ci.yml (1)

69-76: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Restrict the token for this validation-only job.

This job only reads repository content and runs appstreamcli. Set permissions: contents: read. Set persist-credentials: false on actions/checkout so later steps cannot use a persisted token.

Proposed change
   appstream:
     name: AppStream metadata
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     steps:
-      - uses: actions/checkout@v7
+      - uses: actions/checkout@v7
+        with:
+          persist-credentials: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 69 - 76, Restrict the appstream job by
adding job-level permissions with contents read, and configure its
actions/checkout step with persist-credentials set to false. Keep the existing
checkout and appstream installation behavior unchanged.

Source: Linters/SAST tools

.github/workflows/update-homebrew-cask.yml (1)

172-175: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin actions/checkout to an immutable commit.

Line [175] passes HOMEBREW_TAP_TOKEN to the action. Replace the mutable @v7 reference at Line [172] with the reviewed full commit SHA. GitHub recommends full-length SHA pinning for immutable action execution. (docs.github.com)

Proposed fix
-        uses: actions/checkout@v7
+        uses: actions/checkout@<full-40-character-commit-sha> # v7.0.0
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/update-homebrew-cask.yml around lines 172 - 175, Update
the actions/checkout reference in the checkout step to use the reviewed full
commit SHA instead of the mutable `@v7` tag, while preserving the existing
repository and HOMEBREW_TAP_TOKEN inputs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/update-homebrew-cask.yml:
- Around line 73-76: Update the TAG validation condition in the workflow to
require each major, minor, and patch component to be either 0 or a nonzero digit
followed by digits, rejecting values such as v01.02.03 before deriving VERSION.
Preserve acceptance of stable vMAJOR.MINOR.PATCH tags without leading zeroes.
- Around line 44-50: Update the configuration check before setting
configured=true to require TAP_REPO to follow the documented homebrew-* naming
convention, while preserving the existing owner and token validations. Ensure
nonconforming repository names remain configured=false and use the existing
warning path.

In `@technical-documentation/engineering/release-and-secrets.md`:
- Around line 152-153: Update the release artifact guidance in the documented
cask-publishing note to distinguish credentialed CI outputs (signed, notarized,
stapled, and validated DMGs) from outputs produced without Apple credentials
(ad-hoc-signed and unnotarized). Avoid treating mac.notarize: false as the final
artifact state, and only prescribe the xattr quarantine-removal step for
unnotarized artifacts while preserving the existing discovery and brew upgrade
context.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 69-76: Restrict the appstream job by adding job-level permissions
with contents read, and configure its actions/checkout step with
persist-credentials set to false. Keep the existing checkout and appstream
installation behavior unchanged.

In @.github/workflows/update-homebrew-cask.yml:
- Around line 172-175: Update the actions/checkout reference in the checkout
step to use the reviewed full commit SHA instead of the mutable `@v7` tag, while
preserving the existing repository and HOMEBREW_TAP_TOKEN inputs.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 00a7bea4-0d4b-41a3-8afb-abe48e2de604

📥 Commits

Reviewing files that changed from the base of the PR and between a6795d2 and 9647a24.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • .github/workflows/update-homebrew-cask.yml
  • build/com.getopenscreen.OpenScreen.metainfo.xml
  • technical-documentation/engineering/ci-workflows.md
  • technical-documentation/engineering/release-and-secrets.md

Comment thread .github/workflows/update-homebrew-cask.yml Outdated
Comment thread .github/workflows/update-homebrew-cask.yml
Comment thread technical-documentation/engineering/release-and-secrets.md Outdated
The configuration step accepted any non-empty HOMEBREW_TAP_REPO, so
`openscreen-tap` set configured=true — and the job would then clone, commit
and push a cask to it successfully. Green run, cask published, nothing
installable: `brew tap getopenscreen/openscreen` expands to
`getopenscreen/homebrew-openscreen`, which is a different repository.

That is the same shape as the bug this workflow change exists to fix. The
step already names the homebrew-<something> rule in its warning, and the
release documentation already spells out that a wrongly-named tap "would be
checked out and pushed to successfully and still be untappable" — the check
just never applied the rule it was describing. Now it does.

`homebrew-?*` rather than the prefix alone, so a repository named the bare
`homebrew-` is refused too. A name with a capital H is refused as well,
which Homebrew would in fact resolve; the cost of that strictness is a
warning naming the convention, not a silent mispublish.
The cask note read `mac.notarize: false` out of electron-builder.json5 and
reported it as the state of the shipped artifact. That field only says
electron-builder does not notarize; build.yml does it afterwards by hand —
`Sign DMG`, `Notarize DMG`, `Staple notarization ticket`, `Validate stapled
DMG`, all four gated on the Apple credentials being present, on every tag
including pre-releases.

So the paragraph contradicted its own file: sixty-seven lines above, the
Apple signing section already says every tag signs, notarizes, staples and
validates, and falls back to an ad-hoc signature only when a value is
missing. Both states are now named, and the quarantine step is attached to
the one that actually needs it.
@EtienneLescot
EtienneLescot merged commit d09c0c2 into main Aug 11, 2026
19 checks passed
@EtienneLescot
EtienneLescot deleted the claude/github-issue-335-a187f9 branch August 11, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant