Skip to content

fix: Unify report and candidate execution facts - #678

Merged
Pigbibi merged 5 commits into
mainfrom
fix/report-candidate-field-consistency
Nov 5, 2026
Merged

Pigbibi merged 5 commits into
mainfrom
fix/report-candidate-field-consistency

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

AI assistance

Codex; exact host model identifier is not exposed. Independent review is requested from the established review bot and is not preclaimed.

What changed

Use one execution summary builder for early notification candidates and completed archives. Preserve current-run plugin observation counts, including the distinction between unknown (absent) and observed-empty ({}). Map blocked, failed and unknown execution to outer error while preserving precise inner execution status and the runtime_report.v1 vocabulary.

How verified

  • Behavioral fail-before: blocked execution produced outer ok; the regression now requires error.
  • Focused execution/notification checks: 72 passed; final request handling and regression checks: 48 passed.
  • Full suite: 5,185 passed, 1 skipped, 403 subtests passed (exit 0).
  • Ruff and diff whitespace checks passed; documentation check had zero blockers and one existing README advisory.

Why

The incident diagnosis showed unequal canonical execution_status and routine_observation_counts for the same source run. Current main already preserves inner status and merges summary fields; consolidation prevents producer drift without equating missing facts with empty observations. Existing contradictory historical candidates remain conflicts and are not rewritten.

Read-only upstream equity tracing used the isolated RO service-account configuration after SG egress verification. The archived account observation contains net_assets and cash fields, but the archive lacks the original broker response and execution portfolio. Source tracing reaches finite broker liquidationValue through QPK's snapshot adapter and the existing sleeve alignment; accepted incident equity provenance remains unproved. No equity mapping or fallback was changed.

Risk

High: runtime report assembly and notification projection only. Recognized submission outcomes remain distinct from fills and reconciliation. HTTP completion is separate from report execution health. Source identity checks, factual conflict rejection, CAS, durable execution claims and trading/risk gates are unchanged. Draft only: no merge, labels, deployment, configuration, Secret, IAM, Scheduler, live/Kelly/stop-loss change or historical object rewrite.

Publication checker

Central publication-check/2.0-advisory, build 83d9d1130377: 1676 findings, 1661 matching lines in the complete tracked tree (advisory). No new identifying constants were added. First 20 masked matches:

  • .env.example:9: SCHWAB_API_KEY=<<HOST>>
  • .env.example:10: SCHWAB_APP_SECRET=<<HOST>>
  • .env.example:15: TELEGRAM_TOKEN=<<HOST>>
  • .env.example:44: STRATEGY_PLUGIN_ALERT_TELEGRAM_BOT_TOKEN=<<HOST>>
  • .github/CODEOWNERS:9: /.env.example @<PROJECT_ID>
  • .github/CODEOWNERS:10: /.github/CODEOWNERS @<PROJECT_ID>
  • .github/CODEOWNERS:11: /application/account_new_risk_gate_support.py @<PROJECT_ID>
  • .github/CODEOWNERS:12: /application/execution_claim.py @<PROJECT_ID>
  • .github/CODEOWNERS:13: /application/execution_event_accounting.py @<PROJECT_ID>
  • .github/CODEOWNERS:14: /application/execution_intent_continuity.py @<PROJECT_ID>
  • .github/CODEOWNERS:15: /application/execution_kernel_adapter.py @<PROJECT_ID>
  • .github/CODEOWNERS:16: /application/execution_receipt_adapter.py @<PROJECT_ID>
  • .github/CODEOWNERS:17: /application/execution_service.py @<PROJECT_ID>
  • .github/CODEOWNERS:18: /application/offline_execution_event_acceptance.py @<PROJECT_ID>
  • .github/CODEOWNERS:19: /application/paper_execution_admission.py @<PROJECT_ID>
  • .github/CODEOWNERS:20: /application/paper_execution_command_consumer.py @<PROJECT_ID>
  • .github/CODEOWNERS:21: /runtime_execution_policy.py @<PROJECT_ID>
  • .github/CODEOWNERS:22: /scripts/execution_report_heartbeat.py @<PROJECT_ID>
  • .github/CODEOWNERS:23: /scripts/inspect_schwab_token_secret_readiness.py @<PROJECT_ID>
  • .github/CODEOWNERS:24: /scripts/run_offline_execution_event_acceptance.py @<PROJECT_ID>

@Pigbibi

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact head eb7ed11 against main, covering all six files. Focus on report/candidate field consistency, fail-closed status mapping, unknown-versus-empty observation semantics and preservation of source conflict/CAS behavior. Full offline suite: 5,185 passed, 1 skipped, 403 subtests passed. Draft only; no deployment or merge is requested by this worker.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T20:05:20.518197Z 05ebeb3 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: eb7ed11ecd

ℹ️ 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".

@Pigbibi

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: 6ac31287ec

ℹ️ 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 application/runtime_report_summary.py Resolved
Comment thread main.py Resolved
@Pigbibi

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: e7be16c9b2

ℹ️ 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 application/runtime_report_summary.py Resolved
Comment thread main.py Resolved
@Pigbibi

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 94344ba, including the complete PR diff. Both new P2 findings are addressed with fail-before/pass-after regressions. Full offline suite: 5,282 passed, 1 skipped, 411 subtests passed; focused tests: 389 passed. AI author: Codex (gpt-6.1-sol). Draft remains unchanged; merge and deployment are separate operations.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 94344ba86f

ℹ️ 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".

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi marked this pull request as ready for review November 5, 2026 20:03
@Pigbibi Pigbibi added the agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation label Nov 5, 2026 — with ChatGPT Codex Connector
@Pigbibi
Pigbibi merged commit 4464279 into main Nov 5, 2026
@Pigbibi
Pigbibi deleted the fix/report-candidate-field-consistency branch November 5, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants