Pace mailmind requests and retry transient rate limits #38
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
svd:skip
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/people-mind-mcp!38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/svd-dev-people-mind-mcp-35-pace-the-mailmind-client-20-p-3cf65163"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add configurable token-bucket pacing with a 4 requests/s default and burst of 10. Reopen MCP sessions for bounded rate-limit retries, honour Retry-After, and retain accepted pages and completed evidence calls within each pass. Preserve persisted state and value-free error codes.
Add deterministic pacing and HTTP retry tests. Validation: pristine baseline 143 passed; focused tests 59 passed; neighbouring suites 167 passed; make check passed with 282 passed and 5 skipped. Source distribution and wheel built successfully. Standards self-review found no remaining issues.
Closes #35
Co-Authored-By: gpt-6.1-sol noreply@openai.com
Architect verification (host, scratch worktree)
2224edd61c11cc(dispatch)c27d5f6(integrate rework, PR head)tests/test_mailmind.pytest_mailmind test_config_cli test_carddav test_vcard_sync)685a131(git merge-tree).gitunder worktreeThe 9 skips are Radicale (3), deploy integration (4) and the two embed model tests (no
models/in the scratch worktree). Not a PR effect.Scope note for the merger
The gate ruled D1 in-pass resume only (see the Agent Adjustments section of the spec and the gate comment on #35) and filed #36 for the cross-pass checkpoint. The dispatch commit
61c11cchonoured that ruling. The integrate rework round then read the spec's Test Strategy table literally, called the missing checkpoint a blocker, and added it inc27d5f6:MailmindSource.resumable = True, per-pageself.statewithcursor,pendingandfull, and a failure-pathUPSERT_STATEinsync.run_passguarded byfetched_ok(fetch failures checkpoint; ingest rollback keeps the loaded state).Read as code,
c27d5f6is the spec's own worked design for #36 and matches the issue's acceptance criterion 3 as written. Six new tests cover resume at both cursors, ingest rollback, malformed page replay, and the stored shape. The one item it does not settle is a size bound onpendingfor a large first pass (#36 item 3).Two merge options:
c27d5f6. #35 closes with the issue's full acceptance list delivered; #36 narrows to the size bound.c27d5f6to this branch first; #36 keeps the whole decision.Architect recommendation: option 1. The guard is the one the spec designed, the shared
run_passchange is nine lines behind aresumableopt-in that only the mailmind Source sets, and the behaviour is what #35 asked for. The runner's post-gate scope change is filed against dev/stables separately.