Skip to content

fix: Support existing setup release identities (R2) - #773

Merged
Pigbibi merged 2 commits into
mainfrom
fix/setup-intent-postmerge-r2
Nov 6, 2026
Merged

Pigbibi merged 2 commits into
mainfrom
fix/setup-intent-postmerge-r2

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

AI assistance

OpenAI Codex (GPT-6) authored the original fix. OpenAI Codex (gpt-6.1-sol) refreshed the branch with a conflict-free merge of current main and updated this description.

Summary

R2 repairs F1 (P2-a) and F2 (P2-b) from the post-merge re-review of original PR #771.
Reviewed head: 2d49ffc730a3d0c25519de016ef8953fcac83fba.
Squash commit: eaa0eab991e31305faa23cc8c13da2bbefa7d711.
Baseline: 436ea66f42f11ebf9085bdc2f576c3ad196454c0.

Follow-up to a post-merge re-review; no approval implied.

What changed

  • src/quant_platform_kit/common/automation_setup.py: accept existing dotted release IDs (3–128 characters) and digit-leading strategy revisions (1–64 characters), retaining shared redaction and strict validation.
  • src/quant_platform_kit/schemas/automation-setup-intent.v1.schema.json: match those formats and reject terminal newlines.
  • tests/test_automation_setup_contract.py: add 30 interoperability and invalid-input regressions using fake data.
  • docs/strategy-release-runtime-contract.zh-CN.md: document the existing release identity formats accepted by setup.
  • uv.lock: include the already-declared development date-time checker. Reuse the prior plain uv lock result; preserve all 27 previously locked third-party name/version pairs. No upgrade flags or dependency declaration changes.

How verified

Fresh isolated worktrees use the same installed dependency versions, UTC and the checked-out revision in the normal CI source-revision variable. The original worktree is unchanged.

Check Unmodified main Candidate
New format regressions 8 failed / 22 passed (tests temporarily overlaid, then restored) All pass within focused/full runs
Frozen lock check / contract collection Lock stale; date-time checker missing at collection Lock current; collection succeeds
Focused contracts, runtime and redaction Defects reproduced separately 279 passed
CI pytest with coverage 3926 passed, 3 skipped, 1277 subtests passed 3956 passed, 3 skipped, 1277 subtests passed
Ruff PASS PASS
Documentation checker tests 36 passed 36 passed
Documentation check, phase 2 0 blocking, 1 existing advisory Identical
CI dependency constraint reference validation PASS PASS
CONTRIBUTING unittest discovery BASELINE_RED: 1519 tests, 1 error, 1 skip Identical identity, reason and normalized error traceback

Exact full CI test command: PYTHONPATH=src python -m pytest -q --cov --cov-report=term --cov-report=xml tests (PYTEST_ADDOPTS=-rs only discloses skip reasons).

Identical pytest skips on main and candidate:

  • tests/test_ibkr_order_outcome_decoder.py:6: optional ib_insync unavailable.
  • tests/test_longbridge_order_quantity_api_probe.py:206: external API order probe explicitly disabled.
  • tests/test_runtime_heartbeat_policy.py:71: optional pandas_market_calendars unavailable.

The legacy PYTHONPATH=src python -m unittest discover -s tests -v command treats pytest.importorskip('ib_insync') as an import error: test_ibkr_order_outcome_decoder (unittest.loader._FailedTest.test_ibkr_order_outcome_decoder), Skipped: could not import 'ib_insync': No module named 'ib_insync'. Both versions exit 1 with the exact same error after normalizing worktree paths. This is an existing runner/optional-SDK mismatch, not introduced by R2; publication uses the explicitly authorized identical-baseline exception. Native checks remain unchanged. Zero introduced failures; no test, assertion or skip weakened.

Local evidence: this job's out/regression-before.txt, focused-after.txt, baseline-full-ci.txt, candidate-full-ci.txt, baseline-comparison.json, baseline-unittest.txt, candidate-unittest.txt, and unittest-baseline-comparison.txt.

Central checker

Version: 6ad9627e588bfe474fa14130fb03af948f74d03e, read directly from the central repository without changing it.
Changed-file findings: 0 total / 0 blocking — PASS. Original checker functions run against the complete candidate root, with findings filtered to the exact five changed paths. The unmodified checker CLI also passes on the complete root: 0 blocking, 1 pre-existing README advisory.

Publication scanner

Version: publication-check/2.0-advisory, build 2947dd7867b4. Advisory mode, completed successfully. Complete tracked tree: 1178 findings / 1173 matching lines. Exact five changed files: 81 findings / 81 matching lines.
Fresh exact-file comparison: main has 75 scanner findings; candidate has 81. The six additional matching lines are one fake adversarial query fixture and five generated public package artifact metadata lines. These are not real private identifiers. Owner decisions pt1114u and pt1115u explicitly authorize advisory publication for M05. Scanner matches alone do not block this Draft PR. Added-line hits were reviewed as public generated package metadata or fake adversarial fixture input; no actual private identifier was found in added lines. No scanner, masking rule or native CI gate was changed. No --no-verify used.

First 20 complete-tree matches (shared-masker output):

repo/.<PROJECT_ID>/CODEOWNERS:2: /.<PROJECT_ID>/CODEOWNERS @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:3: /src/quant_platform_kit/risk/ @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:4: /src/quant_platform_kit/binance/ @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:5: /src/quant_platform_kit/ibkr/ @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:6: /src/quant_platform_kit/longbridge/ @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:7: /src/quant_platform_kit/schwab/ @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:8: /src/quant_platform_kit/common/models.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:9: /src/quant_platform_kit/common/port_adapters.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:10: /src/quant_platform_kit/common/execution_translation.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:11: /src/quant_platform_kit/position_sizing.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:16: /scripts/verify_fractional_dca_execution.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:17: /src/quant_platform_kit/binance/execution.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:18: /src/quant_platform_kit/common/account_risk_budget.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:19: /src/quant_platform_kit/common/execution_capabilities.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:20: /src/quant_platform_kit/common/execution_commands.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:21: /src/quant_platform_kit/common/execution_fills.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:22: /src/quant_platform_kit/common/execution_outcomes.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:23: /src/quant_platform_kit/common/execution_receipts.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:24: /src/quant_platform_kit/common/execution_state.py @<PROJECT_ID>
repo/.<PROJECT_ID>/CODEOWNERS:25: /src/quant_platform_kit/common/paper_execution_admission.py @<PROJECT_ID>

First 20 exact-changed-file match locations (values omitted):

repo/src/quant_platform_kit/schemas/automation-setup-intent.v1.schema.json:417
repo/tests/test_automation_setup_contract.py:1
repo/tests/test_automation_setup_contract.py:22
repo/tests/test_automation_setup_contract.py:45
repo/tests/test_automation_setup_contract.py:89
repo/tests/test_automation_setup_contract.py:90
repo/tests/test_automation_setup_contract.py:101
repo/tests/test_automation_setup_contract.py:104
repo/tests/test_automation_setup_contract.py:112
repo/tests/test_automation_setup_contract.py:135
repo/tests/test_automation_setup_contract.py:189
repo/tests/test_automation_setup_contract.py:196
repo/tests/test_automation_setup_contract.py:408
repo/uv.lock:79
repo/uv.lock:91
repo/uv.lock:132
repo/uv.lock:172
repo/uv.lock:183
repo/uv.lock:229
repo/uv.lock:232

Risk and limits

The shared redaction helper and generic invalid-input error remain in use. Both setup authority flags remain false. This is offline contract compatibility and reproducible development tooling; authenticated decisions, downstream adoption, PAPER qualification and runtime automation remain unproved. No production operation or protected switch access is included.

AI author: OpenAI Codex (GPT-6).

Refresh verification

The branch refresh merges main 4d4165691e391ac214c976a4243b2a3e85e54116 without conflicts. The PR delta remains the same five setup-contract and lock files. Fresh local checks and the publication scan are recorded below before review is requested. No new behavioral edits are included.

Fresh candidate scanner: publication-check/2.0-advisory, build 83d9d1130377; 1185 findings / 1180 matching lines; advisory exit 0. First twenty masked matches:

repo/.github/CODEOWNERS:2: /.github/CODEOWNERS @<PROJECT_ID>
repo/.github/CODEOWNERS:3: /src/quant_platform_kit/risk/ @<PROJECT_ID>
repo/.github/CODEOWNERS:4: /src/quant_platform_kit/binance/ @<PROJECT_ID>
repo/.github/CODEOWNERS:5: /src/quant_platform_kit/ibkr/ @<PROJECT_ID>
repo/.github/CODEOWNERS:6: /src/quant_platform_kit/longbridge/ @<PROJECT_ID>
repo/.github/CODEOWNERS:7: /src/quant_platform_kit/schwab/ @<PROJECT_ID>
repo/.github/CODEOWNERS:8: /src/quant_platform_kit/common/models.py @<PROJECT_ID>
repo/.github/CODEOWNERS:9: /src/quant_platform_kit/common/port_adapters.py @<PROJECT_ID>
repo/.github/CODEOWNERS:10: /src/quant_platform_kit/common/execution_translation.py @<PROJECT_ID>
repo/.github/CODEOWNERS:11: /src/quant_platform_kit/position_sizing.py @<PROJECT_ID>
repo/.github/CODEOWNERS:16: /scripts/verify_fractional_dca_execution.py @<PROJECT_ID>
repo/.github/CODEOWNERS:17: /src/quant_platform_kit/binance/execution.py @<PROJECT_ID>
repo/.github/CODEOWNERS:18: /src/quant_platform_kit/common/account_risk_budget.py @<PROJECT_ID>
repo/.github/CODEOWNERS:19: /src/quant_platform_kit/common/execution_capabilities.py @<PROJECT_ID>
repo/.github/CODEOWNERS:20: /src/quant_platform_kit/common/execution_commands.py @<PROJECT_ID>
repo/.github/CODEOWNERS:21: /src/quant_platform_kit/common/execution_fills.py @<PROJECT_ID>
repo/.github/CODEOWNERS:22: /src/quant_platform_kit/common/execution_outcomes.py @<PROJECT_ID>
repo/.github/CODEOWNERS:23: /src/quant_platform_kit/common/execution_receipts.py @<PROJECT_ID>
repo/.github/CODEOWNERS:24: /src/quant_platform_kit/common/execution_state.py @<PROJECT_ID>
repo/.github/CODEOWNERS:25: /src/quant_platform_kit/common/paper_execution_admission.py @<PROJECT_ID>

Fresh refresh checks (2026-11-06): focused setup/release tests 233 passed; full CI pytest 4063 passed, 3 skipped, 1277 subtests passed, exit 0; Ruff PASS; documentation phase 1 and 2 exit 0 (0 blocking, 1 existing README advisory). The first full run had one pip download timeout in the wheel research installation test; an unmodified full-suite retry passed. No assertion, dependency or timeout was changed. The prior validation table above describes the original R2 publication, not a newly rerun baseline comparison.

@Pigbibi

Pigbibi commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-06T15:23:12.943907Z 7a992d8 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. You're on a roll.

Reviewed commit: b336330f62

ℹ️ 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 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Please review refreshed head 7a992d84ee5f07a7ba4646f7b3cbbb481ee062cd against main 4d4165691e391ac214c976a4243b2a3e85e54116. The refresh is a conflict-free merge; the five-file PR delta is byte-identical to the original candidate. Fresh full CI pytest: 4063 passed, 3 skipped, 1277 subtests passed; Ruff and documentation checks pass. No deployment is authorized.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 7a992d84ee

ℹ️ 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 marked this pull request as ready for review November 6, 2026 15:21
@Pigbibi Pigbibi added the agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation label Nov 6, 2026
@Pigbibi
Pigbibi merged commit 6a8c734 into main Nov 6, 2026
13 of 17 checks passed
@Pigbibi
Pigbibi deleted the fix/setup-intent-postmerge-r2 branch November 6, 2026 15:26
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.

1 participant