Skip to content

PR1: calc.py hardening + scripts/ relocation - #1

Merged
artvandelay merged 3 commits into
mainfrom
pr1-calc-hardening
May 26, 2026
Merged

PR1: calc.py hardening + scripts/ relocation#1
artvandelay merged 3 commits into
mainfrom
pr1-calc-hardening

Conversation

@artvandelay

Copy link
Copy Markdown
Owner

Closes the high-severity bugs from stress-test rounds 1 + 2:

  • Strict input validation (rejects null, NaN, non-numeric, negative, zero where invalid) with clean exit 2.
  • Honest infeasible output: savings_pct=0, weekly_savings_usd=0 when VRAM insufficient.
  • New top-level warnings[] array (e.g., experiments_multiplier clamp).
  • MoE sanity check (active_params_b <= total_params_b).
  • traffic_pattern enum validation; cold_per_query requires hot_hours_per_week.
  • File moved from calc.py to scripts/calc.py (Anthropic convention); SKILL.md and README path strings updated; tests + CI updated.

All existing tests pass plus new tests in TestHardenedValidation, TestInfeasibleOutput, TestWarnings.

@artvandelay
artvandelay merged commit c78412b into main May 26, 2026
@artvandelay
artvandelay deleted the pr1-calc-hardening branch May 26, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant