Hiro development journal

Teaching task rejection and enforcing Gmail importance

Published Machine-readable JSON

Executive summary

The Gmail productivity workflow now uses Gmail importance as a hard outer gate. Non-important conversations never reach local Qwen or participate in task or reading creation.

Task analysis applies the date-window query only within Gmail Important. The reading list is a deterministic narrower mirror of conversations that are both Important and Unread.

Removing a Gmail-imported task now records an owner rejection on its durable source. Future classifications receive compact recent examples of deleted imported tasks as negative evidence, including historical soft-deletions created before this change.

A live audit found that the previous broad scan had created forty-nine reading entries from mail outside the intended Gmail section. Those entries were soft-removed with audit and source history retained, then replaced by the forty conversations actually in Important and Unread.

Hiro was restarted with the corrected policy. The private remote page now shows the Important-only query and explains the separate task and reading scopes.

Work completed

Owner-removal learning loop

Completed
  • Enhanced task soft-deletion to identify Gmail provenance before removal.
  • Owner-deleted imported tasks mark their source as rejected-task feedback and retain the removed task wording locally in source evidence.
  • The Qwen classifier receives up to eight recent removed-task examples with bounded excerpts and instructions to treat them as negative evidence unless a new conversation clearly presents a different unresolved action.
  • Historical deleted Gmail tasks are also selected as feedback, so learning includes removals that occurred before the new deletion hook.
  • Policy-driven removals for non-important mail are explicitly excluded from owner-preference learning.

Hard Gmail importance gate

Completed
  • Every task-import query is server-enforced to include Gmail is:important, even if the browser query omits it.
  • The default dashboard query visibly includes is:important with the thirty-day window and spam and trash exclusions.
  • Added reconciliation for active imported tasks: any source no longer marked Important is soft-removed without becoming negative preference feedback.
  • The one remaining active imported task passed the live Important-state reconciliation.

Correct reading-list semantics

Completed
  • Separated reading eligibility from LLM classification. Gmail Important plus Unread is now the deterministic membership rule.
  • Reading items link to the Gmail conversation itself instead of extracting arbitrary article links from broad mail.
  • Local Qwen supplies summaries and applicable tags for eligible reading conversations but cannot add a noneligible conversation.
  • Added reconciliation that soft-removes Gmail reading items outside Important and Unread and preserves manual reading items.
  • The corrected live sync established forty active reading items corresponding to the forty current Important-and-Unread conversations.

Reliability and runtime

Completed
  • Background jobs reconcile task and reading eligibility before and after bounded task analysis as appropriate.
  • Job status now reports policy-removed tasks, policy-removed reading items, and the final Important-and-Unread reading-list count.
  • Reduced negative-example prompt size after the first full reading-tag sync showed that oversized correction context could exhaust reliable local-model classification.
  • A subsequent non-persisting one-conversation Qwen check succeeded with all eight historical owner-removal examples and returned a valid kind and tag set.
  • Restarted Hiro and verified the private remote task page serves the corrected policy and query.

Decisions and reasoning

Validation and evidence

CheckStatusResult
Focused automated regression suite passed Eighteen tests passed, covering the enforced Important query, Important-and-Unread label detection, task and reading reconciliation, owner-removal feedback, historical feedback retrieval, policy-removal exclusion, email reading links, multi-tag sync, background jobs, bounded Qwen batches, individual fallback, dates, persistence, and API behavior.
Live mailbox eligibility audit passed The mailbox reported forty Important-and-Unread conversations. Forty-nine previously imported reading items were outside that set and were soft-removed; the corrected list contains forty eligible Gmail conversations.
Live task reconciliation passed The remaining active imported task was confirmed to have an Important Gmail source. Eight historical owner-deleted imported tasks were available as negative examples.
Non-persisting local-model check passed One eligible Important conversation was classified read-only with all eight compact owner-removal examples; Qwen returned a valid classification and validated tag output without creating an item.
Restarted private runtime passed Hiro restarted successfully. The private remote task page returned status 200, showed the Important-only query, and served the hard-gate explanation.
Task-page JavaScript syntax passed The embedded task-page script parsed successfully after the updated query, removal explanation, and job-status fields.
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 53 journal pages, then completed the TypeScript and Vite production build.

Current state

Next steps