{
  "schemaVersion": 2,
  "date": "2026.07.26",
  "publishedAt": "2026-07-26T19:44:31-07:00",
  "timeZone": "America/Los_Angeles",
  "title": "Hard-excluding USPS and sign-in notices",
  "publicationStatus": "Published",
  "executiveSummary": [
    "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."
  ],
  "workstreams": [
    {
      "title": "Deterministic source rules",
      "status": "Completed",
      "details": [
        "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."
      ]
    },
    {
      "title": "Pre-model exclusion and forward progress",
      "status": "Completed",
      "details": [
        "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."
      ]
    },
    {
      "title": "Historical reconciliation",
      "status": "Completed",
      "details": [
        "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."
      ]
    },
    {
      "title": "Learning isolation and interface",
      "status": "Completed",
      "details": [
        "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": [
    "Implement these as deterministic policy rather than examples because the user described universal rules.",
    "Use sender identity for USPS to avoid excluding unrelated personal tasks that merely mention postal service activity.",
    "Use subject-level sign-in and login detection to target automated authentication notices.",
    "Persist exclusions so repeated scans do not waste local-model time.",
    "Soft-remove historical violations so audit history and recoverability are retained.",
    "Never mix automated policy cleanup into owner-driven false-positive learning."
  ],
  "validation": [
    {
      "check": "Focused automated regression suite",
      "status": "passed",
      "result": "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."
    },
    {
      "check": "Live historical reconciliation",
      "status": "passed",
      "result": "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."
    },
    {
      "check": "Learning isolation audit",
      "status": "passed",
      "result": "Eight rule-excluded source records were present after cleanup, while the compact explicit owner-removal example count remained eight."
    },
    {
      "check": "Restarted private runtime",
      "status": "passed",
      "result": "Hiro restarted successfully and the private remote task page returned status 200."
    },
    {
      "check": "Private interface disclosure",
      "status": "passed",
      "result": "The remote Gmail dialog contained the USPS and sign-in pre-Qwen exclusion explanation and retained Mark read and Mark unread controls."
    },
    {
      "check": "Task-page JavaScript syntax",
      "status": "passed",
      "result": "The embedded task-page script parsed successfully after the rule status and disclosure changes."
    },
    {
      "check": "Public journal unit tests",
      "status": "passed",
      "result": "npm run test:hiro passed the timestamped-entry unit tests."
    },
    {
      "check": "Public journal production build",
      "status": "passed",
      "result": "npm run build generated and validated 55 journal pages, then completed the TypeScript and Vite production build."
    }
  ],
  "currentState": [
    "USPS mail never reaches Qwen and cannot create tasks or reading items.",
    "Automated sign-in and login notices never reach Qwen and cannot create tasks or reading items.",
    "Important and self-sent eligibility continues for all other Gmail conversations.",
    "Captured reading remains durable and can be marked Read or Unread in Hiro.",
    "Explicit owner task removals continue to teach Qwen; rule cleanup does not.",
    "Gmail remains read-only and no mailbox state was changed."
  ],
  "limitations": [
    "Sign-in detection is based on authentication wording in the email subject; unusually worded notices may require an additional pattern.",
    "USPS detection is based on sender identity, so a non-USPS sender forwarding USPS content is not automatically excluded.",
    "Seven earlier eligible conversations remain available for a future bounded classification retry."
  ],
  "nextSteps": [
    "Continue reviewing tasks and remove genuine false positives to refine Qwen examples.",
    "Report any authentication notice whose subject avoids the current sign-in and login wording so the deterministic pattern can be extended.",
    "Add other universal sender exclusions as explicit rules rather than relying on model learning."
  ],
  "disclosureNote": "This public entry omits private network addresses, local paths, account details, message identifiers, subjects, senders, bodies, item contents, process identifiers, and credential information."
}
