Skip to content

worktree-agent-a6372d4befea54672 - #22

Merged
neilgfoster merged 2 commits into
mainfrom
worktree-agent-a6372d4befea54672
Jul 24, 2026
Merged

worktree-agent-a6372d4befea54672#22
neilgfoster merged 2 commits into
mainfrom
worktree-agent-a6372d4befea54672

Conversation

@neilgfoster

Copy link
Copy Markdown
Owner

What and why

  • feat: expose isRead and categories in mail-list --format detailed

Conventions

  • Runtime stays stdlib-only, zero-dependency, zero-backend (urllib/json; ruff/pytest are
    dev tooling only).
  • No secrets/tokens in the repo — they live outside it in an XDG path (0600).
  • Any new/changed skill follows docs/AGENT-FRIENDLY.md (description + CLI I/O are the contract).
  • Read-only safety model intact: Mail.Read-only read path, scope ratchet for writes,
    verify-then-install (read-only catch-set), file-to-folder (never delete).

Verification

ruff check . && ruff format --check .
python3 -m pytest -q
  • ruff check . and ruff format --check . pass.
  • python3 -m pytest -q passes.

mail-list --format detailed only returned a minimal projection (from, id,
receivedDateTime, subject), so no read-only verb could surface per-message
read status or category tags — blocking any read-only client from
enumerating unread, category-tagged mail without degrading to folder-level
unread counts.

Add isRead and categories to the Graph $select (and therefore the JSON
output) for mail-list --format detailed. No new OAuth scope: both fields
are readable under the existing Mail.Read grant. --format concise is
unchanged.

Closes #20

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011NWPnfcJ9JXDvRThCCUcCH

@neilgfoster neilgfoster left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review (isolated, cold pass):

No correctness bugs found.

Minor efficiency note: plugin/src/msgraph/verbs.py:124 — the $select clause now includes isRead,categories unconditionally for both --format concise and --format detailed (the sel string is built once regardless of args.format), so concise calls now transfer these extra fields over the wire even though they're not rendered. Not a defect — matches the existing single-$select pattern in this file — just worth noting if payload size/rate-limits matter for large mailboxes.

The .gitattributes/.gitignore additions are unrelated kord/speckit substrate scaffolding, no logic to review there.

… format

Concise mail-list calls don't render isRead/categories, so requesting
them in $select wasted bandwidth on every concise call. Now the extra
fields are only added to the Graph $select when --format detailed is
used; concise keeps the original minimal select.

Addresses adversarial-review efficiency note on PR #22.
@neilgfoster
neilgfoster merged commit 126dd92 into main Jul 24, 2026
1 check passed
@neilgfoster
neilgfoster deleted the worktree-agent-a6372d4befea54672 branch July 24, 2026 05:55
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