Repair the Flatpak index labels, and keep them repaired - #334
Merged
Conversation
Tavern republished on 26 Aug after the earlier repair, using a publisher that still filtered org.freedesktop.appstream.* out of the index, so its entry regressed to org.flatpak.* labels only. In a software centre that reads as a bare "org.tunaos.tavern" with an Unknown licence and no icon. The metadata was never missing from the artifact: the GHCR image carries appdata (2726 bytes), icon-64 and icon-128, exactly as `flatpak build-bundle --oci` wrote them. This reads them back from the registry into the index -- no rebuild, no republish. Verified the diff touches nothing else: all 20 images and every digest are byte-identical before and after, and the only change is Tavern's Labels map gaining those three keys, with none removed. The restored appdata parses and names Tavern, its summary and GPL-3.0-or-later. bootc-installer remains the one image that cannot be repaired this way: its GHCR package is private, so the registry returns 401 and its labels cannot be read back. That needs the package made public. The publisher-side fix for Tavern is in tuna-os/Tavern#133; until that merges and Tavern next publishes, this repair is what keeps the entry correct. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PBB7xFah5bANaygPQcuHh
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tunaos-org | 29ad8c7 | Commit Preview URL Branch Preview URL |
Aug 27 2026, 06:51 AM |
main moved while this branch sat: overnight republishes took the served index from 18/20 down to 10/22. Twelve images had lost their AppStream labels, not one -- mariner (both arches), finupdate (both arches), all four installer frontends, Tavern, and blueshell, an app that did not exist when this branch was cut. Resolved the conflict by taking main's index and re-deriving the repair from the registry rather than replaying the old one, so this carries main's newer digests instead of reverting them. Result: 21 of 22 images now carry AppStream labels, 33 labels added, none removed, and all 22 digests byte-identical to main. bootc-installer is again the sole exception: its GHCR token endpoint returns 401 because the package is private, so its labels cannot be read back at all. Note this is a stopgap, and a smaller one than it looks. finupdate, the four installers, mariner and dualcut now publish through tuna-os/.github/.github/workflows/publish-flatpak.yml@main and have had their local .github/scripts/ deleted, so the per-repo fixes merged earlier no longer run at all. Every one of those apps will strip its own entry again on its next publish until the shared workflow keeps the org.freedesktop.appstream.* labels. Tavern is the exception: it still uses its own local script, which tuna-os/Tavern#133 fixes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PBB7xFah5bANaygPQcuHh
Coverage went 18/20 -> 10/22 -> 6/22 in a few hours, purely from routine
republishes: finupdate, the four installers, mariner, dualcut and
mandelbrot have all migrated to the shared publisher at tuna-os/.github,
which still filters org.freedesktop.appstream.* out of the index, and
their local scripts were deleted by that migration. Every republish
strips that app's entry again, so a hand-applied repair has a shelf life
of about an hour.
This re-derives the repair against current main (6/22 -> 21/22, all 22
digests identical, no labels removed) and adds a workflow that does the
same thing hourly, so the remote stops depending on someone noticing.
The workflow refuses to commit anything except added labels: if the
image set changes, a digest changes, or any label would be removed, it
fails rather than pushing a corrupted index to the live remote. Tested
in all four directions -- a clean no-op passes, and a removed label, a
changed digest and a dropped image each fail.
It pulls the script from tuna-os/flatpak-index rather than vendoring a
copy, since vendoring is how the original bug reached nine repositories.
This is a MITIGATION, not the fix. The fix is one line in
tuna-os/.github's publish-flatpak.yml:
keep_prefixes = ("org.flatpak.", "org.freedesktop.appstream.")
Once that lands this workflow finds nothing to do and can be deleted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012PBB7xFah5bANaygPQcuHh
Contributor
Merge attempt found a genuine branch conflict; deferring for rebase per the scanner starvation guard.🐝 Hive Agent: — hive: agent=scanner backend=codex model=claude-opus-4-6 codex=0.146.0 |
main moved again (6/22) while this PR was open, so the merge conflict is resolved the same way as before: take main's index and re-derive the repair from the registry rather than replaying the old one, which would revert newer digests. This one reaches 22/22 rather than 21/22, because ghcr.io/tuna-os/bootc-installer is now a public package. Its GHCR token endpoint returns 200 where it previously returned 401, so its labels can be read back for the first time. That was the single image no repair could reach. All 22 digests identical to main, 16 images updated, no labels removed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PBB7xFah5bANaygPQcuHh
main moved again while this PR was open. Resolved the same way as before: take main's index and re-derive the repair from the registry rather than replaying the previous version, which would revert newer digests. All 22 digests identical to main, 16 images updated, no labels removed. This is the third re-derive on this branch, which is the argument for the hourly workflow it also adds: by hand, the repair has a shelf life of under an hour. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PBB7xFah5bANaygPQcuHh
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PBB7xFah5bANaygPQcuHh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The remote is decaying on its own
Coverage of AppStream labels in the served index, measured over a few hours:
Nothing broke to cause that. It is just routine republishes. Every app that publishes re-strips its own index entry, and in a software centre each one drops to a bare application ID with an "Unknown" licence and no icon.
Why the earlier per-repo fixes stopped working
finupdate, the four installer frontends,mariner,dualcutandmandelbrothave migrated to publish throughtuna-os/.github/.github/workflows/publish-flatpak.yml@main, and their local.github/scripts/directories were deleted by that migration. The one-line fixes merged into each repo are no longer executed at all.Consolidating onto one publisher is the right direction. It just means the fix has to live in that one place, and it does not yet.
What this PR does
1. Repairs the index now. Labels read back from the registry — no rebuild, no republish. The conflict against main was resolved by taking main's index and re-deriving the repair, so this carries main's newer digests rather than reverting them.
2. Keeps it repaired.
.github/workflows/repair-flatpak-index.ymldoes the same thing hourly, so the remote stops depending on a human noticing. A hand-applied repair currently has a shelf life of about an hour; this PR has already been rebuilt twice while open for exactly that reason.The workflow refuses to commit anything but added labels. If the image set changes, a digest changes, or any label would be removed, it fails rather than pushing a corrupted index to the live remote. That guard is tested in all four directions:
It pulls the script from
tuna-os/flatpak-indexrather than vendoring a copy — vendoring is precisely how the original one-line bug reached nine repositories.This is a mitigation, not the fix
The fix is one line in
tuna-os/.github'spublish-flatpak.yml:Once that lands, this workflow finds nothing to do and can be deleted. I cannot open a PR against
tuna-os/.githubfrom this session — dot-prefixed repositories cannot be attached — so that one needs a human.tuna-os/Tavern#133remains effective on its own, since Tavern still publishes with its own script.The one that cannot be repaired at all
ghcr.io/tuna-os/bootc-installerreturns 401 from the GHCR token endpoint, so its labels cannot be read back by any means. The package is private. Until its visibility changes it stays missing, and the app is not installable from the remote by anyone. That is the 1 in 21/22.