Skip to content

fix(update): report upstream Flatpak permission drift - #970

Merged
jing2uo merged 2 commits into
flatpark:mainfrom
3ddruck12:fix/upstream-manifest-drift
Nov 5, 2026
Merged

jing2uo merged 2 commits into
flatpark:mainfrom
3ddruck12:fix/upstream-manifest-drift

Conversation

@3ddruck12

Copy link
Copy Markdown
Contributor

Summary

The pin sweep rewrites the download and leaves finish-args and modules untouched. That is how WordCraft's Flatpak gained CUPS printing upstream while this package kept shipping an empty printer list. A package can now name the upstream Flatpak manifest. The update sweep fetches it from the default branch and opens an issue when the finish-args, the module names, or a helper module's archive URL differ.

Nothing is copied and nothing is merged. Closing the issue is a pull request: grant what a feature needs, or record the omission under upstream: with a comment saying why. A new permission is not always enough on its own. The print dialog needed lpstat and lp as well as --socket=cups, and those tools are a module, so the report lists both.

Packaging

scripts/check-upstream-manifests.mjs does the comparison. update-check.yml runs it with --alert after the pin refresh, through the existing ci-alert issues (upstream-manifest/<app-id>), refreshed each run and closed when the manifests agree. A drift does not fail the pin job.

WordCraft (ai.storyteller.wordcraft) is the first package to opt in, against packaging/linux/flatpak/ai.storyteller.wordcraft.yml. Two upstream grants stay omitted on purpose:

  • --share=network, because update checks and --control stay opt-in
  • --filesystem=xdg-data/ArtCraft/versions:ro, because this package does not ship that launcher

The app's own module is not part of the archive comparison. Upstream builds it from a directory; this package unpacks the release tarball, whose URL moves on every release. A helper that is an archive on both sides, such as cups-client, is compared.

Sandbox

No permission change in this pull request. The next sweep will report what WordCraft's manifest is still missing. Checked against the default branch just now:

  • --socket=cups
  • --system-talk-name=org.freedesktop.Avahi
  • --filesystem=~/.cups:ro
  • module cups-client

The two accepted omissions above were not reported. #969 is the pull request that adds those four, which makes this report go quiet.

Tested

tests/test_upstream_manifest.sh: a new permission and a new module are reported, an accepted permission is not, a helper archive URL change is reported, and the extra-data app module's URL is not compared with upstream's directory build. scripts/audit-descriptor.mjs rejects an upstream.manifest path that leaves the upstream repository. The descriptor audit and this test passed. test_gen_site.sh failed in this shallow checkout before the site deps were installed; it looks for a rendered install count and does not touch this check.

Flathub

Not a new app.

Made with Cursor

3ddruck and others added 2 commits November 4, 2026 08:14
The pin sweep rewrites only the download, so a new finish-arg or helper
module in upstream's Flatpak manifest never reaches the package. Report
that difference as an issue instead of copying it.

Co-authored-by: Cursor <[email protected]>
The drift step already exits 0 under --alert, so a failure there means the
script itself broke. Without continue-on-error that failure skipped the
final gate, and a held-back or unresolved pin would no longer turn the run red.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jing2uo

jing2uo commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Pushed one commit on top of yours: 3aca28c.

Report upstream Flatpak manifest drift now has continue-on-error: true. Under --alert a drift already exits 0, so if this step fails, the script itself broke. Without the flag that failure skipped the last step, Fail if any pin was held back or failed to resolve, and a held-back pin would no longer turn the daily run red. With the flag the step still shows as failed in the run, and the gate after it still runs.

tests/test_upstream_manifest.sh passes. I did not rebase. The branch is behind main but has no conflicts.

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.

2 participants