{
  "schemaVersion": 2,
  "date": "2026.07.26",
  "publishedAt": "2026-07-26T19:12:52-07:00",
  "timeZone": "America/Los_Angeles",
  "title": "Making reading state durable and self-sent mail mandatory",
  "publicationStatus": "Published",
  "executiveSummary": [
    "The Gmail productivity rules were refined again: Important remains the normal outer gate, while email sent from the owner to the owner is an explicit exception that must always become exactly one task or reading item.",
    "Unread is now an intake condition rather than a retention condition. Important-and-Unread conversations are captured into the reading list, but later Gmail read-state changes no longer remove them.",
    "The reading interface now uses explicit Mark read and Mark unread actions. A captured item retains its source, summary, tags, and audit history while its Hiro reading status changes.",
    "Hiro reconciled historical self-sent mail from the last thirty days. An aggregate exclusivity check found sixty-three self-sent sources: fifty-three linked to tasks, ten linked to reading items, zero linked to both, and zero linked to neither.",
    "The complete live background scan remained bounded and resilient. It reviewed 146 newly eligible conversation versions and continued past seven isolated classification failures."
  ],
  "workstreams": [
    {
      "title": "Eligibility model",
      "status": "Completed",
      "details": [
        "Replaced the single Important-only search with a server-built Gmail scope representing Important OR owner-to-owner self-sent mail, followed by the user date and spam and trash constraints.",
        "Resolved the mailbox owner address through the Gmail profile and detected self-sent messages only when Gmail marks the message Sent and the owner address appears in both From and To.",
        "Each fetched conversation now records Important, Important-and-Unread, self-sent, and overall processing eligibility as separate machine facts.",
        "Non-important mail remains excluded unless it satisfies the exact self-sent exception."
      ]
    },
    {
      "title": "Mandatory self-sent classification",
      "status": "Completed",
      "details": [
        "Added self_sent to the structured local-Qwen input and instructed the model that self-sent mail may never be ignored.",
        "Added a deterministic fallback: if bounded and individual model attempts cannot decide, a self-sent conversation with links becomes reading and one without links becomes a task.",
        "Removed the former requirement that reading mail contain an external article URL because the email conversation itself is the reading object.",
        "Added historical reconciliation for self-sent conversations already recorded as ignored. Explicitly deleted task or reading records remain respected and are not recreated.",
        "Important-and-Unread synchronization skips a self-sent source already represented by a task, preserving exactly-one semantics."
      ]
    },
    {
      "title": "Durable reading state",
      "status": "Completed",
      "details": [
        "Stopped background jobs from removing captured reading items merely because Gmail later loses the Unread label.",
        "Important-and-Unread remains the intake feed for ordinary reading capture.",
        "Reading items link back to their Gmail conversation and keep their existing status during subsequent synchronization.",
        "Renamed the reading completion state to Read and added Mark read and Mark unread controls in the task-page interface."
      ]
    },
    {
      "title": "Live reconciliation and runtime",
      "status": "Completed",
      "details": [
        "Restarted Hiro with the revised query, record metadata, background phases, and reading controls.",
        "Validated the combined Gmail query with read-only Gmail count requests before starting reconciliation.",
        "Ran one complete server-owned background job. The primary phase reviewed 146 conversation versions; historical self-sent reconciliation added thirty-four tasks and eight reading items beyond outcomes already created in the primary phase.",
        "The captured Important-and-Unread phase ensured forty intake items and reported one tagging fallback after bounded retries.",
        "Verified the private remote page serves the self-sent explanation plus Mark read and Mark unread controls."
      ]
    }
  ],
  "decisions": [
    "Interpret Unread as capture eligibility, not automatic deletion eligibility.",
    "Keep reading status local to Hiro so the user can mark a captured item Read or Unread without changing Gmail.",
    "Treat owner-to-owner email as intentional capture and require exactly one task or reading result.",
    "Respect explicit owner deletion even for self-sent mail; a removed item remains deleted and contributes task feedback where applicable.",
    "Use Gmail conversation links for reading entries rather than arbitrary URLs extracted from message bodies.",
    "Continue through isolated model failures and use deterministic self-sent fallback only when bounded Qwen retries fail."
  ],
  "validation": [
    {
      "check": "Focused automated regression suite",
      "status": "passed",
      "result": "Twenty-one tests passed, covering self-sent detection, mandatory non-ignore behavior, historical ignored-source conversion, Important-or-self query construction, persistent reading state, Important-and-Unread intake, Read and Unread UI syntax, removal learning, reconciliation, bounded Qwen batches, dates, tags, persistence, jobs, and API behavior."
    },
    {
      "check": "Read-only Gmail query validation",
      "status": "passed",
      "result": "Important, self-sent, and combined thirty-day Gmail queries all returned bounded result metadata without changing mailbox state."
    },
    {
      "check": "Complete live background job",
      "status": "passed with isolated errors",
      "result": "The job reviewed 146 newly eligible conversation versions in thirteen safe retrieval batches. It analyzed 139, created eighty-seven task outcomes and five reading outcomes in the primary phase, ignored forty-seven eligible non-self conversations, and reported seven isolated failures without stopping."
    },
    {
      "check": "Historical self-sent reconciliation",
      "status": "passed",
      "result": "The reconciliation phase created thirty-four tasks and eight reading items with zero self-sent classification failures."
    },
    {
      "check": "Self-sent exclusivity audit",
      "status": "passed",
      "result": "Sixty-three self-sent source records were active: fifty-three had a task, ten had a reading item, zero had both, and zero had neither."
    },
    {
      "check": "Reading intake state",
      "status": "passed",
      "result": "Important-and-Unread synchronization ensured forty captured intake conversations. The full reading list contained fifty-three items after adding self-sent reading outcomes, all in Review before owner action."
    },
    {
      "check": "Private remote interface",
      "status": "passed",
      "result": "The private remote task page returned status 200 and contained the self-sent rule, Mark read, and Mark unread controls."
    },
    {
      "check": "Task-page JavaScript syntax",
      "status": "passed",
      "result": "The embedded task-page script parsed successfully after the reading-state and status-reporting 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 54 journal pages, then completed the TypeScript and Vite production build."
    }
  ],
  "currentState": [
    "Normal Gmail processing is limited to Important mail from the selected date window, with owner-to-owner self-sent mail as the only additional source.",
    "Every known self-sent conversation is represented by exactly one task or reading item unless the owner explicitly removed it.",
    "Important-and-Unread mail is captured for reading, then remains in Hiro when Gmail becomes Read.",
    "Reading items can be marked Read or Unread in Hiro without mutating Gmail.",
    "Task removals continue to provide compact local negative examples for later Qwen decisions.",
    "Gmail remains read-only throughout all scans and reconciliation."
  ],
  "limitations": [
    "Seven eligible conversation versions failed both bounded and individual Qwen classification during the live primary scan; they remain eligible for a later retry.",
    "One Important-and-Unread conversation used deterministic tag fallback after local-Qwen retries.",
    "The background status currently updates at phase boundaries during historical self-sent and reading synchronization rather than after every model batch in those phases.",
    "Read and Unread are Hiro reading-list states and intentionally do not mark the Gmail message read or unread."
  ],
  "nextSteps": [
    "Review the new task outcomes and remove false positives so the local negative-example set becomes more representative.",
    "Use Mark read and Mark unread directly from the reading list as items are consumed.",
    "Consider adding incremental phase progress for self-sent and reading synchronization if future scans are large.",
    "Retry the seven isolated failures during a later Analyze run after additional removal feedback has refined task decisions."
  ],
  "disclosureNote": "This public entry omits private network addresses, local paths, account details, message identifiers, subjects, senders, bodies, item contents, process identifiers, and credential information."
}
