Match installed catalog apps by trusted repo identity - #38
Merged
hamzamerzic merged 1 commit intoAug 23, 2026
Merged
Conversation
The App Store recognized an installed app by its volatile #manifest-id=<id> string, which skews against the persisted row on a commit pin, a stale baked snapshot, or a source rename (previous_id -> id). Each skew desynced the "installed" display and the other-installed de-dupe from the backend, so a genuinely-installed app could show as "Not installed" and render twice. Match on the stable per-repository identity instead (one app per trusted mobius-os root-manifest repo), which survives all of those skews. Exact canonical-key matching still comes first for non-mobius-os and subdirectory manifests. Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
miljanm
reviewed
Aug 21, 2026
miljanm
left a comment
Contributor
There was a problem hiding this comment.
Reviewer: all clear
I didn't find a concrete issue in this revision. This is a QA second look, not a maintainer approval.
Reviewed revision 33d987a011b9.
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.
Problem
The App Store decides whether a catalog entry is installed by matching its canonical
<repo>#manifest-id=<id>key against installed rows. The<id>is volatile — it skews against the persisted install row whenever:mainwhile the row is pinned to a reviewed commit,previous_id→id), which the backend already adopts in_select_install_targetbut the client matcher did not.Any of these desynced both the "installed" label and the
otherInstalledCatalogItemsde-dupe from the backend, so a genuinely-installed app could render as Not installed and appear twice — once as a curated card, once under "Other installed apps".Fix
findInstallednow matches on the stable per-repository identity for trusted mobius-os root manifests — the "one app per repository" invarianttrustedCatalogRepoBasealready encodes — instead of the manifest-id string. Repo identity survives commit pins, snapshot staleness, and renames, so the display and de-dupe stay aligned with the backend without a client-side mirror ofprevious_id.Exact canonical-key matching still runs first, so non-mobius-os and repo-subdirectory manifests (which have no trusted repo identity) match precisely, and a null-manifest legacy row still matches nothing.
Tests
Adds coverage in
tests/helpers.test.mjs:findInstalledmatches across manifest-id skew (stale snapshot, rename, reverse rename) and stays repo-scoped (a different repo reusing the same id string does not match).otherInstalledCatalogItemsemits no duplicate card for a curated app whose installed row has a skewed manifest-id.All helper tests pass locally (
node --test tests/*.mjs).