Skip to content

Implement the Graph inbox driver against the contract #4

Description

@jbagsik

Parent

#1

What to build

The Graph implementation of the inbox driver, living in moox/msgraph. After this ticket the driver is a working, tested alternative to the code still sitting in moox/mail-inbox — but nothing calls it yet.

Implement the contract: resumable paged fetch backed by Graph's delta query with the delta link stored as the opaque cursor; attachment listing and content download; claiming a message; and settling it, which on this driver means moving the message into the folder that corresponds to the outcome. Folder resolution, creation-if-missing and the configured folder names all live here — the domain package must never learn a folder name.

Bring across the retry, rate-limit and error-mapping behaviour that already exists rather than reinventing it.

Acceptance criteria

  • Fetch returns a page plus a cursor, and passing that cursor back resumes where the previous call stopped
  • The per-run page limit is honoured, so an initial catch-up spans several runs instead of one unbounded pass
  • Each outcome maps to its configured folder; the folder is created when missing
  • Folder names come from this package's configuration only — the domain package passes an outcome and nothing else
  • A settle call for a message that is not where it was expected is handled without aborting the run, matching current best-effort behaviour
  • Rate-limit responses are retried with the delay the server asks for, rather than a fixed sleep
  • Attachment content round-trips byte-identically
  • All of the above is tested against a mocked HTTP handler — no tenant, no network
  • README documents folder configuration and outcome mapping; CHANGELOG updated

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentSpec is ready for an agent to implement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions