Skip to content

Expose combo regime diagnostics in runtime reports#103

Merged
Pigbibi merged 1 commit into
mainfrom
diag/combo-regime-reporting
Jul 4, 2026
Merged

Expose combo regime diagnostics in runtime reports#103
Pigbibi merged 1 commit into
mainfrom
diag/combo-regime-reporting

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • include combo regime/weight diagnostics in mapped rotation plans
  • persist combo diagnostics under execution report diagnostics.combo
  • add regression coverage for decision mapping and report output

Validation

  • PYTHONPATH=/Users/lisiyi/Projects/BinancePlatform:/Users/lisiyi/Projects/QuantPlatformKit/src:/Users/lisiyi/Projects/CryptoStrategies/src python3 -m unittest discover -s tests -p 'test*.py'
  • python3 -m ruff check .
  • git diff --check

Co-Authored-By: Codex <noreply@openai.com>
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pigbibi Pigbibi merged commit d6981bb into main Jul 4, 2026
2 checks passed
@Pigbibi Pigbibi deleted the diag/combo-regime-reporting branch July 4, 2026 06:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e79950a54

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread decision_mapper.py
"rotation_pool_last_month": diagnostics.get("rotation_pool_last_month"),
"artifact_contract": dict(diagnostics.get("artifact_contract", {})),
"risk_flags": tuple(str(flag) for flag in decision.risk_flags),
"combo_diagnostics": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Only emit combo diagnostics when combo metadata exists

When the active strategy is not the combo profile, or a combo decision lacks diagnostics['metadata']['combo'], combo_meta is {}, but this unconditional entry still returns a non-empty zero-filled combo_diagnostics map. execute_trend_rotation treats any non-empty map as real and persists it under report['diagnostics']['combo'], so legacy runtime reports will claim effective weights/regime values of 0/empty instead of omitting unavailable combo diagnostics; gate this on actual combo metadata or return {} when it is absent.

Useful? React with 👍 / 👎.

sell_reasons = dict(strategy_plan["sell_reasons"])
combo_diagnostics = dict(strategy_plan.get("combo_diagnostics", {}))
if combo_diagnostics:
report.setdefault("diagnostics", {})["combo"] = combo_diagnostics

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Store diagnostics from the post-sell plan

When the sell leg changes balances or cash, this writes diagnostics.combo from the first strategy plan even though the function immediately resolves and executes a second post_sell_plan with the updated portfolio. For combo runs where fields such as gross_exposure are derived from current holdings, a cycle that rotates out positions can archive stale pre-sell diagnostics that disagree with the buy plan actually used; update the report from post_sell_plan after the second resolve.

Useful? React with 👍 / 👎.

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