Hiro development journal

Hard-excluding USPS and sign-in notices

Published Machine-readable JSON

Executive summary

Hiro now applies two deterministic mailbox rules before local Qwen sees a conversation: USPS-originated mail is always excluded, and automated sign-in or login notices are excluded from task and reading creation.

The rules override the normal Important and self-sent eligibility channels. Excluded conversations receive durable rule-excluded source records so later scans advance without repeatedly presenting them to the model.

Automated cleanup is kept separate from owner preference learning. Soft-removing a USPS or sign-in item does not become a negative Qwen example.

A live reconciliation found eight existing tasks that violated the new rules: five USPS-derived tasks and three sign-in-notice tasks. All eight were soft-removed with audit and source evidence retained; no reading items required removal.

Hiro was restarted and the private task page now discloses the exclusions alongside the existing self-sent and durable-reading rules.

Work completed

Deterministic source rules

Completed
  • Added sender-based USPS detection for usps.com addresses and United States Postal Service sender identities.
  • Added subject-based detection for sign-in, login, and logged-in notices.
  • Attached an explicit rule reason to each Gmail conversation record before classification.
  • USPS and sign-in rules take precedence over Important, self-sent, task, and reading decisions.

Pre-model exclusion and forward progress

Completed
  • The importer persists excluded mail as rule_excluded with the exact reason and source provenance.
  • Rule-excluded conversations are removed from pending Qwen batches and cannot create a task or reading item.
  • Background jobs count rule exclusions as processed progress and continue to older eligible mail even when an entire retrieval batch is excluded.
  • Historical self-sent and Important-and-Unread synchronization phases also skip rule-excluded records.

Historical reconciliation

Completed
  • Added reconciliation across active Gmail-derived tasks and reading items.
  • Matching tasks are soft-removed without invoking the owner-removal learning hook.
  • Matching reading items would be soft-removed under the same rule, although none matched in the live state.
  • Source evidence is updated with the rule reason and retained for audit and deduplication.

Learning isolation and interface

Completed
  • Excluded rule-driven deletions from the compact owner-rejection query used by Qwen.
  • Verified that the owner-removal example count remained unchanged after live policy cleanup.
  • Added job counters for new rule exclusions and policy-cleaned tasks and reading items.
  • Updated the Gmail dialog to state that USPS and automated sign-in notices are excluded before Qwen.

Decisions and reasoning

Validation and evidence

CheckStatusResult
Focused automated regression suite passed Twenty-four tests passed. New coverage verifies USPS and sign-in recognition, Qwen bypass, durable skip reasons, historical task and reading cleanup, learning isolation, and background forward progress alongside existing Gmail, self-sent, reading-state, tag, date, persistence, and API behavior.
Live historical reconciliation passed The live list contained 122 tasks and 53 reading items before cleanup. Reconciliation soft-removed eight tasks: five USPS-derived and three sign-in notices. The resulting state contained 114 tasks and 53 reading items.
Learning isolation audit passed Eight rule-excluded source records were present after cleanup, while the compact explicit owner-removal example count remained eight.
Restarted private runtime passed Hiro restarted successfully and the private remote task page returned status 200.
Private interface disclosure passed The remote Gmail dialog contained the USPS and sign-in pre-Qwen exclusion explanation and retained Mark read and Mark unread controls.
Task-page JavaScript syntax passed The embedded task-page script parsed successfully after the rule status and disclosure changes.
Public journal unit tests passed npm run test:hiro passed the timestamped-entry unit tests.
Public journal production build passed npm run build generated and validated 55 journal pages, then completed the TypeScript and Vite production build.

Current state

Next steps