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
Runbook restates the points formula, which now has a single source #387
Since #381, the rule has exactly one source — src/points.ts, exported as a SQL fragment and a TypeScript function. Every query in the codebase composes it. This runbook copy is now the only hand-written instance left, and nothing will fail if it drifts: it is a shell string in a Markdown file, so a future change to the rule leaves it silently wrong while still returning a plausible number.
Why it matters
The runbook's purpose is verification — it exists to confirm a production data patch landed correctly. A verification step computing the total by a stale rule would confirm the wrong thing, which is worse than having no check.
Options
Replace the inline SQL with a small script that imports totalPointsSql from src/points.ts, so the runbook and the app cannot disagree.
Have the runbook hit an existing endpoint (it already suggests eyeballing /member/13) and drop the SQL entirely.
Leave the SQL but add a comment pointing at src/points.ts as the source of truth, accepting that it can drift.
Option 2 is probably cheapest — the runbook already says "Optionally eyeball https://basny-bap-staging.fly.dev/member/13", and that page now reports the same total as everything else.
Context
Found during review of #381. Out of scope there, which was limited to the codebase.
Activity