Skip to content

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

Draft
Pigbibi wants to merge 1 commit into
mainfrom
fix/setup-intent-postmerge-r2
Draft

Pigbibi wants to merge 1 commit into
mainfrom
fix/setup-intent-postmerge-r2

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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.

Changes

  • 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.

Validation

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).

@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-03T21:36:47.301301Z b336330 Manual request
ℹ️ 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".

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