You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Time-of-day aware routing: peak/off-peak pool, model, and effort selection #9378
Ask (Drew, 2026-11-13): routing should make time-of-day decisions — pick pools, models, and efforts with peak vs off-peak pricing and quota pressure in mind, instead of running one static chain around the clock.
Why now: the quota Analytics & projection section (live 2026-11-13, /quota#analytics + /api/quota-analytics.json) now measures hour-of-day and day-of-week burn patterns per pool/model/effort, week-over-week deltas, and projected time-to-wall per reset window. The data to drive time-aware routing exists; the policy layer doesn't.
Scope:
A time-aware routing policy: per pool, the cheap/expensive windows (provider peak pricing where it exists, quota-window pressure where it doesn't — e.g. a weekly pool at 90% on Monday is "expensive" until its reset; the same pool Sunday night pre-reset is "use it or lose it").
Decision inputs: time of day, day of week, holidays (the analytics section already labels US federal holidays), current pool % + projected wall, reset proximity.
Actions the policy may take: prefer flat/free tiers during peak, shift deferrable batch work (triage sweeps, hygiene, design-register scans) into off-peak windows, raise/lower effort by window for the workhorse class, and pre-burn a pool that would otherwise expire unused.
Represent the policy as data in the route config (like the rest of the routing rules), not hard-coded branches; every time-based switch must be visible in the route_attempt record so its effect is measurable against the analytics.
Guardrails: never starve interactive/priority-10 work for a pricing window; quota routing rules (100% = leg not attempted, sticky working leg, no probes on scarce quota) still apply — time-of-day chooses among HEALTHY legs, it never resurrects a walled one.
Acceptance: policy spec + config representation merged; one live pool demonstrably switching preference by window with route_attempt evidence; analytics shows the before/after burn-by-hour for that pool.
Refs: /quota#analytics-patterns (hour/day patterns), code#9363/#9364 (analytics build), the Luna effort round-robin trial (PR #9018) as the measurement pattern to reuse.
Picked up by repo-worker-code-a — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-a posts progress markers; after 30 minutes of silence any other worker may pick this up.)
Progress from repo-worker-code-a: triaged: Drew-specified design program (sibling #9399); laptop exec route down this shift so implementation cannot start/verify; releasing free with first step + acceptance recorded
Why this lane is not implementing it in this shift: implementation and live verification must run on the laptop (route config + pool evidence), and the laptop-agent exec route failed repeatedly this shift ("proxy closed during CONNECT" on every exec attempt after an initial health success), so no repo worktree work could be started or verified. The queue backend is also down (fallback mode), which is why this note carries the state instead of a broker checkpoint.
Released free with the full remaining scope intact: policy spec, config representation, one-pool live switch with route_attempt evidence, analytics before/after. Nothing about the issue is blocked by a decision — it is ready to claim.
Released by repo-worker-code-a (outcome: free). triaged only, NOT done: Drew-specified time-of-day routing design program (sibling #9399); remains: policy spec + route-config representation, one live pool switching by window with route_attempt evidence, analytics before/after. Released free because laptop-agent exec route failed all shift (proxy closed during CONNECT), so laptop implementation/verification could not start; triage note with first concrete step posted on #9378
Kaneo item CODE-3037 (linked 2026-11-13) is the tracker for this item.
Action taken:
Follow-on packet queue task 20400 on repo-health-code-pilot (kind small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:9378). Scope: a docs-only policy spec and config representation (per-pool windows, decision inputs, guardrails, route_attempt fields for measurability, open questions with defaults). Excluded: any live pool switch, any config change, the before/after analytics, and holiday implementation (opencode#821).
Task 18944 (this triage) is completed with that routing.
Open questions, each with the default I chose:
Should calendar and holiday exclusion land in the spec now? Default: name it as a dependency on opencode#821, do not implement.
Which pool is the first live switch? Default: left to the spec packet to propose, with DeepSeek peak windows as the candidate because they already exist in config.
Dispatch binding record for queue task 18944: session ses_e5e18119063ffeHQWB7nd5Wovj was launched on opencode-route/workhorse in /home/user/git/fleet/queue-18944-9378-time-aware-routing (branch queue/18944-9378-time-aware-routing) and verified by assistant-message content engaging the triage. The session completed triage and routed the remaining spec scope to follow-on task 20400; see the triage note above. Queue-side bind did not succeed (no lane ledger row at attempt time); the later lane row is direct with no session id. Queue task 18944 remains claimed and must be terminalized by its authorized claim owner; this comment records the session/task/issue relationship, not a queue completion.
Queue close-out update: task 18944 was completed at 2026-11-17T05:27:57Z by its recorded claimant repo-worker-conductor, with outcome triaged and follow-on task 20400. The finished session was not attached to the later direct lane row; the claim was terminalized under its actual worker identity. Issue #9378 remains open and unresolved for the policy-spec follow-on.
OpenChamber scheduled lane claimed task 20400 and wrote the required first checkpoint (origin: openchamber-scheduled-lane). Fresh GitHub state confirms #9378 remains OPEN with queue/queued and existing prior triage notes. The packet is a standalone 45-minute policy-spec deliverable, not a quick triage; it needs a dedicated focused docs session/worktree. Its scope and acceptance are already explicit, and the prior triage says the spec is ready to claim, not blocked on #9399. This scheduled lane is keeping to revalidation/disposition and will not start the larger spec in the shared working tree. No duplicate follow-on created.
Merged work, still open. Every pull request that references this issue has merged (#11797) and none is open, but the issue kept status:in-review. Tasks that name it as a blocker have been waiting on it.
status:in-review is removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").
Activity
developing-today commentedon Nov 13, 2026
CODE-3037
dezren39 commentedon Nov 13, 2026
Picked up by
repo-worker-code-a— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-code-aposts progress markers; after 30 minutes of silence any other worker may pick this up.)dezren39 commentedon Nov 13, 2026
Progress from
repo-worker-code-a: triaged: Drew-specified design program (sibling #9399); laptop exec route down this shift so implementation cannot start/verify; releasing free with first step + acceptance recordeddezren39 commentedon Nov 13, 2026
agent-note:v1
state: triaged (released free — design program, not a one-shift fix)
worker: repo-worker-code-a (fallback mode, queue backend down)
Triage assessment (fresh read of the issue, 2026-11-13):
dezren39 commentedon Nov 13, 2026
Released by
repo-worker-code-a(outcome: free). triaged only, NOT done: Drew-specified time-of-day routing design program (sibling #9399); remains: policy spec + route-config representation, one live pool switching by window with route_attempt evidence, analytics before/after. Released free because laptop-agent exec route failed all shift (proxy closed during CONNECT), so laptop implementation/verification could not start; triage note with first concrete step posted on #9378dezren39 commentedon Nov 17, 2026
Triage verdict for #9378 (queue task 18944, detached route opencode-route/workhorse). Not resolved; route a spec packet, no implementation.
Fresh evidence, read 2026-11-17T05:13Z:
queue/queued. The body is unchanged from Drew's 2026-11-13 ask. No linked PR, and no commit on main adds a time-of-day policy. Searching open and merged PRs for time-of-day, time-aware and peak returned only the existing DeepSeek window PRs feat(config): gate background on DeepSeek peak windows, order spark-plan, bump opencode pin #1818 and docs(config): document DeepSeek holiday gap in peak windows (opencode#821) #2105, which are the mechanism this policy would extend..opencode/opencode.jsonc(experimental.model_route_windows,deepseek-peak-early/late, chain comment around lines 3931-3960). The pool/effort briefdoc/2026-11-13T09-26-00Z_design_pool_effort_system/brief.md:149ticketed Time-of-day aware routing: peak/off-peak pool, model, and effort selection #9378 as a sibling of Program: pool & effort system — effort tiers per pool, OpenChamber category pools, granular stats store (design mill) #9399 and noted that windows have no calendar/holiday support (opencode#821).status/parkedandqueue/parked, last note 2026-11-16T18:02Z. Dependency decision: Time-of-day aware routing: peak/off-peak pool, model, and effort selection #9378 does not depend on Program: pool & effort system — effort tiers per pool, OpenChamber category pools, granular stats store (design mill) #9399's effort tiers. The spec below does not need them, so I did not block on it. The later live-switch packet should be sequenced after the spec.Action taken:
repo-health-code-pilot(kindsmall_fix, deduperepo-health:v1:fix:developing-today/code:issue:9378). Scope: a docs-only policy spec and config representation (per-pool windows, decision inputs, guardrails, route_attempt fields for measurability, open questions with defaults). Excluded: any live pool switch, any config change, the before/after analytics, and holiday implementation (opencode#821).Open questions, each with the default I chose:
dezren39 commentedon Nov 17, 2026
Dispatch binding record for queue task 18944: session
ses_e5e18119063ffeHQWB7nd5Wovjwas launched onopencode-route/workhorsein/home/user/git/fleet/queue-18944-9378-time-aware-routing(branchqueue/18944-9378-time-aware-routing) and verified by assistant-message content engaging the triage. The session completed triage and routed the remaining spec scope to follow-on task 20400; see the triage note above. Queue-side bind did not succeed (no lane ledger rowat attempt time); the later lane row isdirectwith no session id. Queue task 18944 remains claimed and must be terminalized by its authorized claim owner; this comment records the session/task/issue relationship, not a queue completion.dezren39 commentedon Nov 17, 2026
Queue close-out update: task 18944 was completed at 2026-11-17T05:27:57Z by its recorded claimant
repo-worker-conductor, with outcometriagedand follow-on task 20400. The finished session was not attached to the laterdirectlane row; the claim was terminalized under its actual worker identity. Issue #9378 remains open and unresolved for the policy-spec follow-on.dezren39 commentedon Nov 18, 2026
agent-note:v1
state: parked
task: 20400
lane: oc-code-01 (OpenChamber scheduled lane, worker repo-worker-code)
stage: claimed -> route_validation
OpenChamber scheduled lane claimed task 20400 and wrote the required first checkpoint (origin: openchamber-scheduled-lane). Fresh GitHub state confirms #9378 remains OPEN with queue/queued and existing prior triage notes. The packet is a standalone 45-minute policy-spec deliverable, not a quick triage; it needs a dedicated focused docs session/worktree. Its scope and acceptance are already explicit, and the prior triage says the spec is ready to claim, not blocked on #9399. This scheduled lane is keeping to revalidation/disposition and will not start the larger spec in the shared working tree. No duplicate follow-on created.
backlog_updated: false
Merge pull request #11797 from developing-today/queue/20400-9378-time…
dezren39 commentedon Nov 18, 2026
agent-note:v1
lane: openchamber-scheduled-lane (code-j) · worker repo-worker-code · queue task 20400 · dedupe repo-health:v1:fix:developing-today/code:issue:9378
state: triaged → spec merged
Stage-1 policy spec merged as PR #11797 (merge commit c87db55): doc/2026-11-18T12-00-00Z_design_time_of_day_routing_policy/spec.md. Docs only; no config or code changed. Covers the policy (window classes, A1-A4), config representation extending model_route_windows, guardrails G1-G4, route_attempt fields with before/after metrics, and open questions with defaults. Holiday exclusion is delegated to opencode#821. Prior art: #8838 design (ranking schedules). The live switch packet can start from this spec.
dezren39 commentedon Nov 22, 2026
Merged work, still open. Every pull request that references this issue has merged (#11797) and none is open, but the issue kept
status:in-review. Tasks that name it as a blocker have been waiting on it.status:in-reviewis removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").By: Claude, 2026-11-22 flow review.
Generated by Claude Code