Skip to content

feat: add experimental Outlook probe and selected-message reader - #52

Closed
rabesss wants to merge 4 commits into
mainfrom
feat/experimental-outlook-read-selected
Closed

rabesss wants to merge 4 commits into
mainfrom
feat/experimental-outlook-read-selected

Conversation

@rabesss

@rabesss rabesss commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Publish independently reviewable improvements: safer Microsoft authentication diagnostics, an experimental content-free Outlook capability probe, and an explicitly opted-in bounded reader for one manually selected already-read email.

This is intentionally a draft. A standalone manual fresh sign-in and Python baseline capture succeeded with system Chromium through an external executable-only launch override. Successful standalone body extraction and the stock pinned-browser launch remain unverified.

Changes

  1. Authentication diagnostics (bf649c1): consolidate fixed recovery advice and distinguish consent/admin approval/access-policy failures from incorrect credentials. Authentication, MFA, permissions and credential persistence behavior are unchanged. Isolate one credential-store test from the system keyring; the secret baseline changes only two existing line numbers.

  2. Metadata-only Outlook probe (4609767): add lighthouse outlook probe --interactive-login using a fresh temporary browser. Inspect mounted-row positions and read states without collecting message labels, previews or text. Search is explicitly rejected before launching a browser.

  3. Selected-message reader (54bbb01): add lighthouse outlook read-selected --interactive-login for one user-selected message already read and present in a clean baseline. Bound subject/sender/body output, reject ambiguous or changed layouts, repeat selection/content checks, suppress known sensitive patterns, and preserve the JSON-only stdout contract.

  4. Compose guard and safe diagnostics (d260c46): stop selected reads when the current page exposes a matching English Send button, including disabled controls; report only fixed, allowlisted layout-stage labels. Add regression tests and explain the current-page scope, separate-window exclusion, conservative false positives, and remaining validation gaps.

The Outlook features never import an existing signed-in browser, export cookies/tokens, or save a persistent browser profile. They do not click mail rows, send/reply, change read state, move/delete mail, or download attachments. Tests use synthetic fixtures only; no real mail, credentials, browser storage or screenshots are included.

Experimental limitations

  • A separate managed-browser check verified equivalent DOM predicates and a stable already-read selection with unchanged read states/unread count. Subsequently, standalone Python reached fresh sign-in and baseline capture using system Chromium through an external executable-only override; extraction stopped with unsupported_layout, returned no message content, and closed the browser. The failing stage was not established.
  • The pinned browser download returned invalid/truncated archives in the test environment; the stock bundled-browser launch is unverified. There has been no live rerun after the new hardening changes. The guard does not fix simultaneous-input races or establish that extraction is fixed.
  • Selected-row/body consistency is an observed DOM guard, not a canonical Outlook message-ID binding or authenticated message provenance.
  • Sensitive-content suppression is best-effort and can miss unfamiliar or obfuscated secrets. Returned text is untrusted data, never instructions; review it before sharing.
  • English labels and a specific single-message layout are required. Multiple-message conversations, virtualized/reordered rows, unsupported layouts and unread selections fail closed.
  • Opening an unread email manually may mark it read before rejection. Bulk reading/search, unread-email reading, attachments and date extraction remain unsupported.
  • Each invocation requires fresh interactive sign-in in a graphical environment.

See probe documentation and selected-message documentation.

Validation

Final local validation of the incremental hardening:

  • Python 3.12: 2,053 passed (33.45s)
  • Python 3.13: 2,053 passed (34.25s)
  • Focused Outlook suite: 399 passed
  • Ruff, strict mypy, both import contracts, deptry, complexity gate, rejecting secret scan and git diff --check: passed
  • Latest Python 3.13 full test run recorded no blocked network/browser actions under the offline guard; tests use synthetic fixtures
  • Independent hardening review: qualified pass, with the limitations above retained and documentation nits addressed
  • The incremental remote tree matches the reviewed local tree byte-for-byte; exactly six files changed in the new commit

GitHub CI run #51 is green for updated head d260c461335846f8aa3cf4a6ecbfe76a608a371f: Python 3.10 and 3.13 full-suite jobs, lint/types/architecture/dependency/complexity checks, repository policy tests, and both history-wide gitleaks and working-tree secret scans passed. The draft-only auto-review workflow was skipped as configured.

Reviewer checklist

  • Full local pytest suite passes
  • Ruff and strict mypy are clean
  • JSON stdout contract preserved; prompts and diagnostics go to stderr
  • No real credentials, session cookies, TOTP codes or SAML tokens included
  • Existing MFA semantics preserved
  • New/changed behavior has tests
  • No dependency additions or range changes
  • Standalone manual fresh sign-in and Python baseline with system Chromium override
  • Successful standalone extraction and stock bundled-browser validation
  • Live validation after the new hardening changes
  • GitHub CI green for this exact head

@rabesss

rabesss commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

Closing: reading Outlook mail is out of scope for lighthouse-cli, and other connectors already cover mail.

The underlying goal was a Lighthouse login that doesn't need the password and MFA re-entered every ~5 days. This draft deliberately saves no session, so it doesn't serve that goal. That work continues in a separate PR.

The branch stays for reference.

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.

1 participant