Skip to content

catalogue: refresh pins on a miss (newly-pinned apps spawn without a daemon restart)#328

Open
Alexgodoroja wants to merge 1 commit into
mainfrom
fix/catalogue-refresh-on-miss
Open

catalogue: refresh pins on a miss (newly-pinned apps spawn without a daemon restart)#328
Alexgodoroja wants to merge 1 commit into
mainfrom
fix/catalogue-refresh-on-miss

Conversation

@Alexgodoroja

Copy link
Copy Markdown
Collaborator

Problem

Installing io.telepat.ideon-free (Telepat) on a running v1.12.3 daemon failed with publisher not trusted: … is not pinned by the signed catalogue.

Diagnosis

The catalogue already pins ideon (commit 7fe0b86, #326) and a fresh daemon spawns it fine. But a running daemon only refreshes its pins every 10 minutes. If an app is pinned after that refresh and you install it, the supervisor refuses it until the next tick (or a restart) — that's the window users hit.

Fix

A pin miss in Provider.Publisher triggers a rate-limited (30s) background catalogue refresh. The next supervisor scan (seconds later) finds the new pin and spawns the app. Non-blocking; single-flight so an unpinned app can't cause a refresh storm.

Tested

  • Unit test TestProvider_RefreshOnMissPicksUpNewlyPinnedApp (-race green).
  • e2e: daemon up with ideon unpinned → install → refused (… is not pinned by the signed catalogue) → pin ideon + re-sign → daemon spawned it ~24s later, no restart (started pid).

🤖 Generated with Claude Code

@Alexgodoroja Alexgodoroja requested a review from TeoSlayer as a code owner June 24, 2026 04:00
…a restart

The daemon refreshes its catalogue publisher pins on a 10-minute timer. If an
app is pinned in the catalogue after the last refresh and the user installs it,
the supervisor finds no pin and refuses it ("not pinned by the signed catalogue")
for up to 10 minutes — exactly what happened with io.telepat.ideon-free after its
catalogue entry (#326) landed while daemons were already running.

Fix: a pin miss in Provider.Publisher kicks off a rate-limited (30s) background
catalogue refresh. The next supervisor scan (seconds later) then finds the pin
and spawns the app — no restart, no 10-minute wait. Non-blocking and single-flight
so a genuinely unpinned app can't cause a refresh storm.

Tested: unit test for refresh-on-miss (-race); e2e reproduced the refusal, then
the daemon self-healed ~24s after the pin landed, with no restart.
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