chore(packaging): make Flatpak metadata Flathub-ready - #223
Conversation
The Flatpak manifest and metainfo still used the former thewrz identity while generated icons and the repository itself already moved to the wrzonance org, leaving the app-id, desktop file, and icon install path disagreeing with each other. This makes the in-repo Flatpak packaging Flathub submission-ready: manifest, desktop install name, icon set, and bundle command now share one app-id; the metainfo gains a real captured screenshot, a corrected release date/URLs, and a full OARS-1.1 content rating; and flatpak_validate.sh gains a stale-identity regression guard plus a strict AppStream validation gate wired into CI. Closes #207. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The thewrz -> wrzonance Flatpak rename (#207) had no automated check that the sweep was complete or scoped correctly — only the ad-hoc grep recorded in the task notes. Add flatpak_identity_sweep.sh, which pins two invariants at the migration boundary: no stale 'io.github.thewrz' substring remains anywhere under the Flatpak packaging surface, the workflow, or the Flatpak test scripts (except the two canary literals inside flatpak_validate.sh's own regression guard, counted explicitly so a real leftover can't hide behind that exception); and packaging/aur/** stays byte-identical to origin/main, so this migration can't silently leak edits into out-of-scope packaging. Verified RED by temporarily reintroducing a stale reference, a wrong canary count, and a committed aur/ drift — each caught by name — before confirming GREEN on the clean tree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
The "Install AppStream tools" step ran apt-get inside bilelmoussaoui/flatpak-github-actions:freedesktop-24.08, which is a Fedora 41 image — it has dnf, not apt-get. The step failed with "apt-get: command not found", taking the whole tag-triggered release job with it. Because flatpak.yml only runs on tag push, PR CI would never have caught this. The step was also unnecessary: appstreamcli is already present at /usr/bin/appstreamcli in that image, and flatpak_validate.sh passes 20/20 there with no install step at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`cp -r assets/icons/generated/hicolor /app/share/icons/` silently collapses the theme level when /app/share/icons does not already exist: cp then treats the destination as the copy target and produces /app/share/icons/64x64/apps/... instead of /app/share/icons/hicolor/64x64/apps/..., so the desktop entry's Icon= key resolves to nothing. Create the theme directory first and copy the contents into it, which is correct whether or not the parent pre-exists. Also drop --filesystem=xdg-config/honkhonk and --filesystem=xdg-data/honkhonk. Flatpak redirects the XDG base dirs to ~/.var/app/<app-id>/, which is what directories::ProjectDirs resolves to inside the sandbox, so the app never reads the host paths those grants opened up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both 0.1.0 and v0.1.0-alpha.1 shipped a honkhonk.flatpak bundle built from a manifest with app-id io.github.thewrz.HonkHonk, and those assets have real download counts. Renaming the id without migration metadata makes software centres treat the result as a separate application: the old install stays behind with its own launcher, icon and state under ~/.var/app/io.github.thewrz.HonkHonk. Declare the old id under <provides> and <replaces> so the rename upgrades in place, and add the metadata copyright header Flathub expects. The metainfo is now the one file that legitimately names the old id, so flatpak_validate.sh no longer greps it for absence. It parses the XML and asserts the real invariant instead: <id> is the new app-id, and the old one appears in both <provides> and <replaces>. A DOCTYPE/ENTITY guard keeps the stdlib parser off the entity-expansion paths — defusedxml is not installable in the Flatpak builder image, which has no pip. Verified with appstreamcli validate --strict inside that image. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The sweep did not guard anything. Nothing invoked it — no workflow referenced it and cargo test cannot discover shell scripts — and even run by hand it only grepped six hard-coded files, skipping any that were missing. Reintroducing the old app-id in assets/honkhonk.desktop, in src/, in a new packaging file, or by renaming the manifest back all passed cleanly. Sweep every tracked file's content and every tracked filename instead, with an explicit allowlist for the places the old id is legitimate: the two scripts that assert its absence, the metainfo migration block, and the dated docs/superpowers/ plans, which are a historical record and should not be rewritten. Missing files are now a failure rather than a silent pass. The second invariant is replaced. Asserting packaging/aur/** is byte-identical to origin/main is a scope assertion about this branch, not a durable property — committed as a permanent test it would fail every future PR that legitimately touches the AUR packaging. It now asserts what should hold forever: each canonical identity-bearing field names the new app-id. Wired into rust.yml, which runs on every PR, deliberately without a paths filter — the drift being guarded against can land in any file. Verified failing on all three scenarios above before wiring in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The repository moved to the wrzonance org, and the new Flatpak app-id io.github.wrzonance.HonkHonk claims that location, but Cargo.toml's repository field and SECURITY.md's private-vulnerability-reporting link still pointed at thewrz/HonkHonk. The advisory link matters most: it is where a reporter is sent to disclose privately. The thewrz handle is left alone everywhere it identifies the maintainer rather than the repo — AUR PKGBUILD headers, the Cargo maintainer/copyright fields, and the historical design documents. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Draft-phase adversarial review (Codex GPT-5.5, xhigh) — outcomesRan Codex as the draft-phase reviewer, plus an independent pass of my own. Every Fixed
(1) The step this PR added ran (2) (3) Flatpak redirects the XDG base dirs into (4) Confirmed the old ID genuinely shipped: both (6) This was the PR's own headline deliverable and it did not work. Nothing Its second invariant was also replaced. Asserting Declined — tracked, not droppedFour Codex
One Heads-up, needs a human callCodex flagged that current Flathub policy restricts AI-generated submission PRs Verification
Note: the three red 🤖 Co-authored by Claude Opus 5. |
This was written agentically; verify its assertions and edit accordingly:
Why
The Flatpak manifest still carried the former
io.github.thewrz.HonkHonkidentity while the generated icons already useio.github.wrzonance.HonkHonk, leaving the repository unready for Flathub submission (parent tracking issue: #84). This PR is the bounded in-repository readiness slice — no external account actions, no AUR or signed-repo work.What
io.github.wrzonance.HonkHonkand update every internal reference (manifest modules, desktop/icon install names, bundle command,flatpak.ymlCI workflow).cargo-sources.jsonfreshness against the current lockfile (freshness gate stays green).flatpak_validate.shgains a stale-identity guard, and a newtests/packaging/flatpak_identity_sweep.shpins two invariants — noio.github.thewrzreference remains in active Flatpak packaging/CI, andpackaging/aur/**stays byte-identical (out-of-scope protection).Design decisions
Implemented autonomously from the issue body (no brainstorm phase). The identity sweep counts the two intentional canary literals inside
flatpak_validate.sh's own guard explicitly rather than excluding the file, so a real leftover cannot hide behind the exception.Testing
cargo test: 751 passed, 0 failedcargo fmt --checkandcargo clippy --all-targets -- -D warningscleanflatpak_validate.sh20/20 (includesappstreamcli validate --strict);flatpak_cargo_sources_fresh.shclean;flatpak_identity_sweep.sh3/3; shellcheck clean🤖 Co-authored by Claude Sonnet 5 (parallel-issues ultracode workflow). Closes #207.