mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 21:32:18 +00:00
CLAUDE.md forbids planning shorthand in committed artefacts, and this branch introduced 74 lines of it across source, tests, a schema field and two migrations. Someone reading the migration SQL in a year has no way to resolve a wave letter or a round number, and a comment that points at something outside the repository names no reason at all. Three passes. A version followed by a parenthetical keeps the version and loses the parenthetical, because the version says since when something holds. A sentence that leaned on the vocabulary to carry its meaning is rewritten to state the reason directly: the arrival reservation now says it was refused over money the operator never spent, rather than naming the defect a wave existed to remove. Three test titles carried the marker in the name itself and are renamed to what they pin. Comments only. No behaviour, no renames beyond those three titles.
16 lines
856 B
SQL
16 lines
856 B
SQL
-- v1.38.19 — the daily coach ledger gains a cost-owner dimension.
|
|
--
|
|
-- `coach_usage` counted one number per (user, day), so tokens the USER's own
|
|
-- plan paid for (a `codex` fallback hop after the operator's shared key
|
|
-- answered 500) were charged against the operator-cost cap and locked the
|
|
-- interactive chat out every morning. `operator_tokens` is the share of
|
|
-- `total_tokens` served by an operator-funded provider (`admin-openai` /
|
|
-- `admin-codex`); the operator cap is enforced against it, the user-plan cap
|
|
-- against `total_tokens`.
|
|
--
|
|
-- Existing rows start at 0: their owner split is unknown and 0 is the side
|
|
-- that cannot lock a user out of a chat the operator never paid for. The
|
|
-- counter is exact from the first turn after deploy.
|
|
ALTER TABLE "coach_usage"
|
|
ADD COLUMN IF NOT EXISTS "operator_tokens" INTEGER NOT NULL DEFAULT 0;
|