Hiro development journal

Making full-size Gmail analysis reliable

Published Machine-readable JSON

Executive summary

A screenshot from the private task dashboard showed that the corrected label-free Gmail importer still failed when the default Analyze action processed a larger set of full conversations.

The controlled three-conversation run had succeeded, isolating the problem to the size of the single structured Qwen request rather than Gmail access, authorization, tag validation, or item persistence.

Hiro now limits each local Qwen request to three conversations. If a three-conversation batch fails, those conversations are retried individually so one difficult thread cannot discard the rest of the import.

The dashboard now reports attempted, successfully analyzed, imported, ignored, previously analyzed, and failed counts.

The same default live Analyze action completed successfully after the fix: eight remaining conversations were analyzed, one tagged reading item was added, seven were ignored, three prior conversations were skipped, and no classifications failed.

Work completed

Failure isolation

Completed
  • Used the dashboard screenshot to identify the exact user-visible failure message.
  • Compared the failing default-size request with the previously successful three-conversation live request.
  • Confirmed that full transcripts and a multi-item JSON schema were exceeding Qwen's reliable single-request classification envelope.

Bounded model batches

Completed
  • Limited structured Qwen classification requests to three Gmail conversations each.
  • Retained one schema-constrained response per batch, including task-versus-reading-versus-ignore classification, title, notes, priority, reason, and all applicable validated tags.
  • Added single-conversation fallback when a batch fails.
  • Successful batches and fallback classifications continue through persistence even if a different conversation cannot be classified.

Transparent import results

Completed
  • Added attempted and failed counts to the import response.
  • Updated the dashboard result message to distinguish new analysis from previously analyzed conversations.
  • The UI now reports partial failures instead of reducing an otherwise useful import to one generic error.

Decisions and reasoning

Validation and evidence

CheckStatusResult
Focused importer and productivity tests passed Thirteen tests passed, including three-item batch limits, individual fallback after batch failure, partial-failure reporting, multiple tags, task and reading classification, ignore decisions, dates, authorization, persistence, and deduplication.
Default live Analyze action passed Eleven recent conversation versions were found. Eight remaining versions were analyzed in approximately 26.8 seconds; one tagged reading item was created, seven conversations were ignored, three were already analyzed, and zero failed.
Repeat default import passed All eleven conversation versions were skipped without model work in approximately 3.4 seconds, with no duplicates or failures.
Private dashboard passed The task page returned status 200 and served the updated import result reporting.

Current state

Next steps