Skip to content

feat(mcp): exponential backoff for comment-inbox polling - #109

Merged
scott merged 1 commit into
mainfrom
feat/108-inbox-poll-backoff
Sep 10, 2026
Merged

feat(mcp): exponential backoff for comment-inbox polling#109
scott merged 1 commit into
mainfrom
feat/108-inbox-poll-backoff

Conversation

@scott

@scott scott commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Persist MCP inbox poll state in inbox-poll.json (profile dir, mode 0600, atomic rename).
  • gander share and hosted gander watch open a 2-hour idle window and reset the interval to 1m. Local preview does not touch the file.
  • Gate only no-path MCP gander_list_comments: skip until next_check_at, return {inbox:[], poll:{done:true}} after the window, otherwise GET /api/shares with If-None-Match.
  • Backoff 1m → 2m → 4m → 8m on 304 or an unchanged snapshot; reset to 1m and slide the window on count-up or a new uuid. Count-down does not reset.
  • Additive poll object on no-path JSON (interval, interval_seconds, next_check_at, stop_at, unchanged, skipped, done).
  • Rewrite mcpInstructions to /loop 1m + poll.interval / poll.next_check_at / poll.done. Path-scoped list, reply/resolve, and gander comments still bypass backoff.

Related Issue

Closes #108

Testing

  • go test ./...
  • go vet ./...
  • go build ./...

Backoff math, skipped/done short-circuit (zero list calls), If-None-Match + 304, share/watch window bump, and mcpInstructions cadence assertions are covered.

Notes

@scott
scott merged commit d528af5 into main Sep 10, 2026
1 check passed
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.

feat: exponential backoff for comment-inbox polling

1 participant