Skip to content

feat: Add a paper-only plain-DCA preview consumer - #708

Merged
Pigbibi merged 2 commits into
mainfrom
feat/m03-paper-dca-adapter
Nov 5, 2026
Merged

Pigbibi merged 2 commits into
mainfrom
feat/m03-paper-dca-adapter

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

AI assistance

Codex (host-configured GPT-6 model; exact variant unavailable).

What changed

Add an explicit Phase 1 consumer for the UES plain-DCA preview contract. Accept only the resolved paper target in the longbridge-paper Environment, verify current protected PAPER binding and OFF safety evidence, and reject SG/HK, stale evidence and reader failure before the planner runs. Keep all preview-only flags. Add regression tests and document the protected-reader contract.

How verified

  • Focused tests: 49 passed, including longbridge-sg rejection.
  • Full suite: 3066 passed, 1 skipped, 420 subtests passed.
  • Ruff passed; documentation check: 0 blocking, 1 existing README advisory.
  • Dot-review contracts: 11 passed; bounded workflow shell contracts passed.
  • Locked QPK checker, installed UES revision and uv lock check passed.
  • Both baseline families exercised the real read-only UES source with fake facts: unchanged DUE amount/key, repeat preview and SG refusal. This is separate from installed dependency adoption.
  • Tests-first collection failed before implementation because the scoped adapter was absent; no old permissive guard is claimed.

Why

LongBridge has no scoped consumer of evaluate_dca_period. The sole approved PAPER environment must be enforced independently of dry-run labels before this preview interface can be integrated.

Risk

Execution-admission code requires the established review bot's disposition. No workflow, route, scheduler, registry, dependency pin or order writer is changed. The installed UES pin lacks plain_dca and therefore fails closed with plain_dca_api_unavailable. This Draft does not claim deployed adoption or broker account isolation. Authentic protected reader, compatible reviewed UES pin, isolated state/credentials, setup and durable execution evidence remain prerequisites. No Phase 2, deployment, broker submission, cloud mutation, notification, protected switch or Draft #707 operation occurred.

Read-only configuration finding: the PAPER Environment has LONGBRIDGE_DRY_RUN_ONLY=false. The shared contract requires false for explicit execution_environment=paper; legacy execution_mode=live is insufficient by itself to establish broker mode. Configuration metadata does not establish who set the value or deployed safety. No value was changed.

Publication check

Central checker publication-check/2.0-advisory, build 83d9d1130377: advisory; 1451 matching lines / 1462 findings across the complete tracked candidate tree. The report is advisory, not an approval. First 20 matches below are masked inherited source references; new additions are scanned separately.

.env.example:21: TELEGRAM_TOKEN=<<HOST>>
.<PROJECT_ID>/CODEOWNERS:7: /.env.example @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:8: /.github/CODEOWNERS @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:9: /.github/workflows/ @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:10: /application/account_new_risk_gate_support.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:11: /application/durable_execution_commands.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:12: /application/execution_receipt_adapter.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:13: /application/execution_service.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:14: /application/execution_state.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:15: /application/longbridge_execution.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:16: /application/paper_execution_command_consumer.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:17: /application/paper_strategy_risk_state.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:18: /runtime_execution_policy.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS:19: /scripts/execution_report_heartbeat.py @<PROJECT_ID>
.<PROJECT_ID>/dot-review/review.cjs:106:   const token = <REDACTED> core.getIDToken(audienceText); // Exact bytes; URL normalization may change an audience.
.<PROJECT_ID>/dot-review/review.cjs:190:   const <PROJECT_ID> = {...pr,head:{...pr.head,sha:pair.target},base:{...pr.base,sha:pair.base}};
.<PROJECT_ID>/dot-review/review.cjs:191:   const binding = {...b.binding({repository:trust.repo.full_name,pr:<PROJECT_ID>,policyCommit:trust.commit,files},trust.policySha),
.<PROJECT_ID>/dot-review/test-review.cjs:81:   const content='<PROJECT_ID> source\n', sourceSHA='d'.repeat(40);
.<PROJECT_ID>/dot-review/test-review.cjs:82:   const pr={number:7,changed_files:1,commits:1,title:'<PROJECT_ID> change',body:'<PROJECT_ID> body',
.<PROJECT_ID>/dot-review/test-review.cjs:100:     assert.equal(audience,'https://audience.example.test');return '<PROJECT_ID>-only';},summary};

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

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Owner t1270u requests an exact-head review after syncing current main. Scope: Phase 1 preview-only adapter; longbridge-paper only; reject SG/HK; LIVE/Kelly/all stop-loss switches OFF. No PAPER start, deploy, scheduler enablement, Secrets/IAM, DEFAULT_SPEC changes or #707 work. Please bind the receipt to the current full head.

@chatgpt-codex-connector

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

Copy link
Copy Markdown

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:07:50.424848Z 6b139f4 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

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 6b139f4277

ℹ️ 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 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 marked this pull request as ready for review November 5, 2026 20:06
@Pigbibi
Pigbibi merged commit 5f03f2b into main Nov 5, 2026
14 of 16 checks passed
@Pigbibi
Pigbibi deleted the feat/m03-paper-dca-adapter branch November 5, 2026 20:06

@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: 6b139f4277

ℹ️ 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 tests/test_plain_dca_paper_adapter.py Resolved
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