Skip to content

Claude/expert bug audit prompt cm i3w#26

Merged
Frostbite1536 merged 3 commits intomainfrom
claude/expert-bug-audit-prompt-CmI3w
Mar 13, 2026
Merged

Claude/expert bug audit prompt cm i3w#26
Frostbite1536 merged 3 commits intomainfrom
claude/expert-bug-audit-prompt-CmI3w

Conversation

@Frostbite1536
Copy link
Owner

No description provided.

claude added 3 commits March 12, 2026 23:29
Targets the gaps between prior audits: cross-component contract
violations, state machine transition errors, multi-provider interaction
bugs, and invariant drift. Organized as 6 targeted passes referencing
ARCHITECTURE.md and STATE_MACHINE_DIAGRAMS.md directly.

https://claude.ai/code/session_01A2iVUP7rbKpQ3raiDNBEah
Six-pass audit targeting inter-component bugs that survive per-module reviews:
- 3 High: vars(t) in pnl.py, analysis tools ignore filtered_trades,
  tax FIFO lots not keyed by source (cross-provider bug)
- 3 Medium: persistence restores stale filters, wrong currency symbol
  in mixed portfolios, Inf cost silently zeros ROI
- 4 Low: Decimal handler missing in serializer, Kalshi pnl_is_set
  invariant, hardcoded $ in metrics, SQLite REAL type

https://claude.ai/code/session_01A2iVUP7rbKpQ3raiDNBEah
Bug 1: pnl.py — Float cumsum for exposure calculation, now uses Decimal
Bug 2: pnl.py — Float sum in by_source breakdown, now uses Decimal
Bug 3: pnl.py — calculate_market_pnl float accumulation + missing sanitize_numeric
Bug 4: kalshi.py — str(raw.get("count", 0)) produces "None" for null count
Bug 5: kalshi.py — Missing sanitize_numeric() on PnL from positions API
Bug 6: kalshi.py — _apply_position_pnl only matched "sell", missed other sell types
Bug 7: filters.py — _normalize_datetime return type annotation (datetime→Optional)
Bug 8: tax.py — Decimal converted to float before subtraction, causing precision loss
Bug 9: chart_tools.py — _CHART_GENERATORS missing "global" caused unhandled KeyError
Bug 10: validators.py — validate_positive_int rejected float-typed integers (5.0)

https://claude.ai/code/session_01A2iVUP7rbKpQ3raiDNBEah
@Frostbite1536 Frostbite1536 merged commit 4bf23d4 into main Mar 13, 2026
5 checks passed
@Frostbite1536 Frostbite1536 deleted the claude/expert-bug-audit-prompt-CmI3w branch March 17, 2026 00:32
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.

2 participants