Add happy-hour quota-preference windows and a default user configuration location #69
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#69
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?
Request
Two related owner-workflow improvements:
1. Happy hours (quota-preference windows)
In addition to the existing weekly blackout rules (issue #66), allow defining weekly happy-hour windows during which consuming quota from the targeted models is strongly preferable — e.g. vendor campaigns where usage is free or discounted for a limited period.
Concrete driver: the GLM-5.3-Flash Usage Campaign (owner-provided campaign text, all times Asia/Singapore):
So during the window the router should prefer
zai/glm-5.3-flashfor capable tasks and conserve paid quota (OpenAI Codex, GLM-5.3), without fabricating capacity and without bypassing any eligibility gate.2. One default configuration location
Today the selector policy must be passed explicitly (
--selector-policy/ inlineselector_policy), and the installed distribution does not includeexamples/, so the owner must maintain a copy at a stable path and wire flags into the MCP recipe. Wanted: a single default configuration location, e.g.~/.config/scarcity-router, created during installation with default values taken from the checked-in example, so no files must be created by hand and no flags added to the MCP command.Proposed semantics (to be refined during implementation)
WeeklyHappyHourRulemirrorsWeeklyBlackoutRuleschedule semantics (IANA zone, weekday vocabulary, strictHH:MM, half-open[start, end), cross-midnight support), plus optional inclusive localstart_date/end_datebounds because campaigns are limited-time.UserPolicygains an additive optionalhappy_hoursmember; backwards compatibility recorded explicitly indocs/decisions.md.$(XDG_CONFIG_HOME | ~/.config)/scarcity-router/selector-policy.json, provisioned fromexamples/selector-policy.json, never silently overwritten; explicit--selector-policywins over the config file; the config file wins over the neutral policy; MCP/REST requests omittingselector_policyfall back to the server-configured default.Scope guards
~/.config/scarcity-routerrequires an explicit security decision record.uv sync --only-dev,make check,uv run basedpyright,git diff --check) before the PR.Implemented in PR #70 (
feature/happy-hours-default-config→develop), left open for human review. Decisions recorded as D-035 (happy-hour quota-preference windows) and D-036 (default configuration location and provisioning) indocs/decisions.md. Validation: 972 tests OK, basedpyright clean, package-check green including the isolated install.