Repository navigation
Document meta-sync's Audible search fallback and the bot's notify hold - #308
Merged
Merged
Conversation
When libex's live store search does not answer, meta-sync now asks Audible's catalogue the same title and author search and keeps a hit only when it states the production's SKU group in the store asked. Describe the trigger, the separate SYNC_AUDIBLE_SEARCH_BUDGET, the dead-store rule, the new cycle-record fields and the /healthz degraded reason.
meta-bot now waits NOTIFY_HOLD (6h by default, 0 to 24h) before the DM for a new feed entry, so meta-sync's later cycles can add the book's other stores first. Describe the hold, how stop, replace and pause treat held entries, and tell readers of the User Guide that DMs come a few hours after a book appears.
The fallback's description sat in the middle of 'Every store's copy of a book', so the region follow-up's paragraphs fell under its heading and its bullets named the follow-up before the page introduced it. Move it to the end of that section, name who does what, give the measured counts, and say in the User Guide that the DM wait lets the book's page fill in.
The search fallback section used 'a store on hold' without saying what it is, named the Audible breaker in a way that clashed with the escalation ladder's circuit breaker, and restated the retry order, the budget's failure rule and the cycle record's counters in several places. Define the hold once, name the breaker, keep each rule in one place, list an unanswered search among the external errors, and say that a copy is proven by the SKU group libex or Audible's catalogue states. Part of the Audible search fallback work.
Say that status counts waiting entries among its queued notifications (they join the delivery queue only once due), state the replacement rule in plain order, link the reason for the hold to meta-sync's region follow-up, and give the state backup its own paragraph.
A rejected libex search is not counted as answered, so it is no longer called a plain answer; a store's hold is capped at an hour whatever Retry-After asks; a store that stays slow gets the full timeout once in every four searches, not once a cycle; a dead store is asked of libex again once the Audible breaker opens; and a search budget of 0 turns the whole search fallback off, the held-store and dead-store routing included. Part of the Audible search fallback work.
When the feed cannot be read on the poll where an entry's hold ends, the bot sends the copy it last read and a later change follows as a second DM, so the page no longer promises one DM with the latest version. The description now uses the page's own word for the wait.
meta-sync now asks a store that went unanswered three times in a row one inline search a cycle, waiting up to 60 seconds. An answer keeps the store alive with no further inline try that cycle, a timeout or server fault makes it dead and sends its searches to Audible, and a rejection, a 429 or libex saying it cannot reach Audible decides nothing (the last holds the store). The page said a slow store got the full timeout once in every four searches. Part of the Audible search fallback work.
meta-sync now treats libex's 503 upstream_unavailable on a store's inline try as a dead store for the cycle, since a hold alone lapses after 5 minutes and would bring another inline wait through a long outage. Only a refusal or a 429 gives the store its inline try again, and a hold met as the try comes due sends nothing and settles nothing. Part of the Audible search fallback work.
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.
Documents two changes made after Unintended Cultivator: Volume Ten was announced on 2026-11-14 with its US store alone.
sku_litesame-production rule,SYNC_AUDIBLE_SEARCH_BUDGET(1200, its own budget sharing the breaker and pace), the dead-store rule (3 unanswered, then one 60 s inline try a cycle), the/healthzdegraded mark, and the new/statuscycle fields.NOTIFY_HOLD(6h by default, 0 to 24h). New watch-feed entries wait that long so the region follow-up can fill a work's other stores; changes to entries already sent go out at once. Also whatstop, replace andpausedo with held entries.Reviewed at high (simplify and code-review), fact-checked against both code branches.
npm run buildpasses. No screenshots: neither change has a UI.Pairs with KodeStar/audiosilo-meta-sync#85 and KodeStar/audiosilo-meta-bot#15.