Hiro development journal

Adding durable quiet-hours alerts for Hiro's sandbox candidates

Validated and published Machine-readable JSON

Executive summary

Implemented proactive Telegram review alerts for eligible autonomous sandbox candidates that remain outside Hiro's automatic-promotion authority.

Candidates discovered from 11:00 PM through 6:59 AM America/Los_Angeles are durably held until 7:00 AM Pacific; candidates found at other times are eligible for immediate delivery.

The hold is a persistent SQLite outbox rather than an in-memory sleep, so pending alerts survive ordinary process restarts and are deduplicated by candidate identity.

Hiro's improvement discovery remains evidence-driven: nightly deterministic evaluation failures, response-envelope error and latency patterns, repeated metacognitive failure clusters, and bounded curiosity hypotheses create specifications before sandbox construction begins.

Work completed

Pacific quiet-hours notification policy

Implemented and passed
  • Added an explicit America/Los_Angeles delivery calculation using timezone-aware datetimes, including daylight-saving offsets.
  • The quiet interval begins at 23:00 inclusive and ends at 07:00 exclusive. A candidate found during that interval receives a due timestamp at the next 07:00 Pacific boundary.
  • Candidates found before 23:00 or at and after 07:00 are eligible for immediate notification.
  • The notification includes candidate identity, opportunity, risk, hypothesis, bounded file scope, decision evidence, the absence of automatic promotion authority, and the local benchmark review location.

Durable outbox and retries

Implemented and passed
  • Added a local SQLite outbox under Hiro's runtime directory with one immutable candidate identity per notification record.
  • Pending messages retain discovery time, due time, attempt count, last error, and sent time. Failed Telegram sends remain pending for a later scheduler retry.
  • Re-queuing the same candidate cannot create a second outbox record or a routine duplicate notification.
  • Ineligible or already promoted candidates never enter this review-alert outbox.

Scheduler and sandbox integration

Implemented and passed
  • After an eligible Stage 4 recommendation freezes, the autonomous sandbox queues its review notification and appends notification status to the experiment event trail.
  • The long-running scheduler flushes due sandbox alerts every minute before checking whether nightly research itself is enabled.
  • This ordering preserves timely 07:00 delivery even when the research schedule is temporarily disabled, provided the scheduler process remains running.
  • Notification failure does not rewrite or invalidate the frozen candidate and evaluation packets.

Improvement discovery map

Reviewed and documented in session evidence
  • Nightly public evaluation harvests deterministic failed cases, groups them by capability category, and produces one bounded diagnostic specification for the highest-impact failure cluster.
  • Recent response envelopes expose timeouts, errors, blocked answers, latency outliers, and validation outcomes that can become repeatable competence specifications.
  • Metacognition records identify high-severity failures, repeated failure modes, weak-signal clusters, surprising successes worth generalizing, and missing instrumentation.
  • Curiosity hypotheses can identify useful experiments, but diagnostic-only or causally incomplete ideas do not become code candidates until they satisfy the complete specification contract.

Decisions and reasoning

Validation and evidence

CheckStatusResult
Focused notification and integration suite passed 18 tests passed in 1.81 seconds. Coverage includes the 22:59, 23:00, 06:59, and 07:00 Pacific boundaries, durable delayed delivery, deduplication, immediate daytime delivery, ineligible-candidate suppression, scheduler behavior, Telegram lifecycle boundaries, autonomous sandbox behavior, and dashboard APIs.
Repository-wide regression suite passed 323 tests passed in 126.37 seconds.
Python syntax compilation passed The sandbox notification outbox, autonomous sandbox runner, and scheduler modules compiled successfully.
Hiro journal generation and frontend build passed Timestamped-entry unit tests passed; the generator produced and validated 66 journal pages, and the TypeScript and Vite production build completed successfully.

Current state

Next steps