Skip to content

Fix HTTP errors, polling, and autocomplete - #1

Open
Evanroby wants to merge 7 commits into
arrayyandn:mainfrom
Evanroby:fixes1
Open

Evanroby wants to merge 7 commits into
arrayyandn:mainfrom
Evanroby:fixes1

Conversation

@Evanroby

Copy link
Copy Markdown

What this PR does:
Catch closed sessions and preserve network error causes.
Keep rate limit details when waits exceed request deadlines.
Skip unchanged event commits and retry failed interval polls sooner.
Cache normalized catalog names for autocomplete.

@arrayyandn

Copy link
Copy Markdown
Owner

Thanks for the PR. I found four issues to address before merging:

  1. Preserve newer revisions (dankmemer/_stored_events.py:277). Skipping an unchanged value also skips saving its newer revision. Accepting revision 1, then revision 3 with the same value, leaves revision 1 saved—so a stale revision 2 can subsequently be accepted, including after restarting. Please keep persisting advancing revisions.

  2. Distinguish rate limits from server cooldowns (dankmemer/http/_budget.py:68). _cooldown_until also covers HTTP 503 backoff. The new logic can turn a subsequent request’s deadline failure into RateLimited(429) even though no rate limit occurred. Please preserve that distinction.

  3. Fix strict Pyright errors (dankmemer/resources/_queries.py:42). Removing the cast leaves the iterable’s elements typed as Unknown, producing two errors. Explicitly narrowing to Iterable[object] before validating each element should resolve this while preserving support for iterable tags.

  4. Fix the Mypy redefinition error (dankmemer/http/_budget.py:67). retry_after is already defined in the daily-limit branch. Please declare it once or use a separate variable name.

Both behavior bugs reproduce with the PR changes and pass against main. Please add regression tests for those cases, update existing tests for the intentional behavior changes, and get the test suite and quality checks green.

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.

2 participants