Files
Token-Max/scripts
John Smith f763bf22e8 fix(audit): remediate all 15 adversarial audit findings (VULN-01..15)
Critical/High:
- update-data.yml opens a data-refresh PR instead of auto-pushing to main;
  all GitHub Actions pinned by commit SHA; validate-data gains price sanity
  bounds (non-free $0 prices, ceilings, NaN/negative rejection) (VULN-01)
- cache scaling in computeApplesToApples gated on isDollarPoolTier; metered
  quotas deliver fixed tokens at any cache rate; unmatched tiers use the
  same model-priced ratio (VULN-02, VULN-08)
- new 'overage' throttle status for payg-overage profiles with overageTurns
  reporting and severity-ordered overall status; BurstSimulator Overage
  filter/badge/stat (VULN-03)
- hardware economics: decode-hour feasibility check (requiredInferenceHours,
  infeasibleWorkload, feasibleMonthlyVolumeM) + payback gated on positive
  amortized alpha (VULN-04)
- log-parser measuredTokens provenance; receipts flag synthetic token
  accounting with ESTIMATED banners (VULN-05)

Medium/Low:
- reasoning effort feasibility guard vs contextWindow/maxOutput (VULN-06)
- parsePlanCacheAssumption anchored to cache context, clamped <= 0.95 (VULN-07)
- arbitrage callout discloses API-vs-subscription spend asymmetry (VULN-09)
- tos classifier: 'no guarantee' not training evidence; indemnity warnings
  with carve-out caveats; gotcha severity on strong signals only (VULN-10)
- build-data benchmark fuzzy fallback + 25% match-rate floor; match rate
  29% -> 60% (VULN-11)
- weekly quota x52/12 conversion; queue delays defer turns (VULN-12)
- shared numParam helper for zero-safe URL params (VULN-13)
- cacheWriteShare (0.06) wired into agentBlendedCost in both data scripts;
  SALVAGE_CLAMP_MAX unification; costPer1kRequests ?? fix (VULN-14)
- session cache-bust residual and provider cache-read fallback ratios moved
  to estimate-constants.json; teams.ts no longer fabricates 10% cache
  discount for unknown cache prices (VULN-15)

Docs: VERIFICATION.md records the full pass. Tests: 130/130; lint clean;
validate-data OK; production build clean.
2026-09-20 22:54:19 -04:00
..