Ship owner Z.ai peak-hour blackout policy (Mon–Fri 14:00–18:00 Asia/Singapore) as selector-policy configuration #66
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Provide the owner's Z.ai peak-hour avoidance policy as configuration, using the existing D-026 weekly blackout mechanism. Desired behavior: do not select Z.ai / GLM models Monday–Friday 14:00–18:00 Singapore time (Asia/Singapore, UTC+8). Outside those hours the neutral policy behavior is unchanged.
Why
The D-026 blackout mechanism exists and is tested (
WeeklyBlackoutRule,evaluate_blackouts), but no concrete owner schedule ships with the product, soscarcity-select/scarcity_selectcurrently run with the neutral policy that has no blackouts. The documented first concrete requirement for the mechanism was exactly this personal rule ("preserve Z.ai for off-peak use",docs/selection-policy.md, "Provider schedules and peak-hour policy").This is configuration, not a hard-coded vendor peak schedule — consistent with
docs/selection-policy.md("The user's desired schedule therefore belongs in configuration and must carry an explicit timezone and deterministic boundary semantics") and theneutral_selector_policy()docstring (no checked-in personal quota policy as default; the file is opt-in via--selector-policy/ inline MCPselector_policy).Proposed change
examples/selector-policy.json: aSelectorPolicydocument identical to the neutral policy plus one weekly blackout rule:rule_id:zai-peak-hours-sgttarget:{"provider": "zai"}(provider-only target → covers GLM-5.3 and GLM-5.3-Flash; no wildcard syntax involved)timezone:Asia/Singapore(fixed UTC+8, no DST)weekdays:mon–fristart_local:14:00,end_local:18:00(half-open[start, end): 14:00 blocked, 18:00 not blocked)reason_code:preserve_zai_offpeak--selector-policy examples/selector-policy.json; MCP/REST callers pass the same document inline asselector_policy.load_selector_policyand verifies: z.ai blocked inside the window on weekdays, not blocked at 13:59/18:00, not blocked on weekends, and openai candidates unaffected.No product/code changes are expected — the mechanism is complete.
Acceptance
SelectorPolicy.from_dict.uv sync --only-dev,make check,uv run basedpyright,git diff --check.develop, one PR targetingdevelop, left open for human review.