fix(ferndesk): 429 backoff + slug cache (COR-444) - #14
Merged
Merged
Conversation
After CF 1010 and pagination fixes, sync creates articles then exhausts FernDesk rate limits. Increase 429 retries/backoff, slow upsert pacing, recover create conflicts via slug lookup+PATCH, request limit=100 pages, and cache slug maps across Actions runs.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
echobt
added a commit
that referenced
this pull request
Sep 14, 2026
…444)
The write path (POST /articles, PATCH /articles/{id}, publish, collection
create) retried 429s with a fixed ladder and ignored Retry-After, so a
rate-limited run could stall or hang without reporting.
- Retry-After (delta-seconds or HTTP-date) now drives the wait when the
server sends it and it exceeds the exponential backoff; values over 300s
are treated as unusable and fall back to backoff.
- Bounded three ways: FERNDESK_WRITE_RETRIES (12/write),
FERNDESK_WRITE_DEADLINE (1800s/write), FERNDESK_WRITE_BUDGET (5400s/run).
Hard 4xx still fails fast without retrying.
- Retry logs name the article slug, status, and why it waited.
- A page that exhausts its retries no longer aborts the run: the sync
continues, logs FAILURES, records failed/failed_slugs in SUMMARY, exits 1,
and caches nothing for that slug so the next run retries cleanly.
Builds on the parallel COR-444 fix already on main (#14), which raised the
429 retry count and added a slower 429 cool-down. This keeps that 5s-to-180s
429 ladder and the create-conflict slug lookup + PATCH recovery, and layers
Retry-After handling, the per-write deadline, the run-wide budget, and honest
failure reporting on top. Pacing (1.2s/1.5s) and limit=100 pagination from
#14 are unchanged.
scripts/tests/ferndesk-sync-retry.test.py covers the policy offline (faked
transport, virtual clock) — 42 checks, including #14's conflict recovery —
and runs in the Docs site CI job.
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
echobt
added a commit
that referenced
this pull request
Sep 14, 2026
…444) (#15) The write path (POST /articles, PATCH /articles/{id}, publish, collection create) retried 429s with a fixed ladder and ignored Retry-After, so a rate-limited run could stall or hang without reporting. - Retry-After (delta-seconds or HTTP-date) now drives the wait when the server sends it and it exceeds the exponential backoff; values over 300s are treated as unusable and fall back to backoff. - Bounded three ways: FERNDESK_WRITE_RETRIES (12/write), FERNDESK_WRITE_DEADLINE (1800s/write), FERNDESK_WRITE_BUDGET (5400s/run). Hard 4xx still fails fast without retrying. - Retry logs name the article slug, status, and why it waited. - A page that exhausts its retries no longer aborts the run: the sync continues, logs FAILURES, records failed/failed_slugs in SUMMARY, exits 1, and caches nothing for that slug so the next run retries cleanly. Builds on the parallel COR-444 fix already on main (#14), which raised the 429 retry count and added a slower 429 cool-down. This keeps that 5s-to-180s 429 ladder and the create-conflict slug lookup + PATCH recovery, and layers Retry-After handling, the per-write deadline, the run-wide budget, and honest failure reporting on top. Pacing (1.2s/1.5s) and limit=100 pagination from #14 are unchanged. scripts/tests/ferndesk-sync-retry.test.py covers the policy offline (faked transport, virtual clock) — 42 checks, including #14's conflict recovery — and runs in the Docs site CI job. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.
Summary
COR-444 follow-up after #11–#13:
429 rate_limitedmid-upsert (34899748203)This PR: longer 429 backoff (12 retries, up to 180s), slower create/update pacing, create-conflict recovery,
limit=100list pages, Actions cache for slug maps.Note
FernDesk UI still needs Connect domain for
docs.cortex.foundationHTTPS (separate from api CF 1010).Test plan