catalogue: refresh pins on a miss (newly-pinned apps spawn without a daemon restart)#328
Open
Alexgodoroja wants to merge 1 commit into
Open
catalogue: refresh pins on a miss (newly-pinned apps spawn without a daemon restart)#328Alexgodoroja wants to merge 1 commit into
Alexgodoroja wants to merge 1 commit into
Conversation
…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.
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
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.Publishertriggers 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
TestProvider_RefreshOnMissPicksUpNewlyPinnedApp(-racegreen).… is not pinned by the signed catalogue) → pin ideon + re-sign → daemon spawned it ~24s later, no restart (started pid).🤖 Generated with Claude Code