Skip to content

refactor(b12): decision_mapper → QPK semantics/display facade (parity-tested) - #409

Merged
Pigbibi merged 1 commit into
mainfrom
rebuild/b12-ft-value-target-facade
Oct 11, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
rebuild/b12-ft-value-target-facade

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Summary (B12 consumer batch — Firstrade)

  • decision_mapper.py now builds ValueTargetExecutionSemantics + ValueTargetDisplayAnnotations and calls build_value_target_execution_runtime_plan(semantics=, display=) (QPK #654/#655).
  • Removed production use of build_value_target_runtime_plan, mixed ValueTargetExecutionAnnotations(...) and build_value_target_execution_annotations.
  • QPK pin 350dd38 → 155d74a (same pin Schwab / Binance already run). The facade does not exist at 350dd38.
  • QPK compat facade is kept; nothing removed from QPK.

Behavior parity

  • Golden plans tests/fixtures/value_target_plan_parity.json (9 cases: full/legacy-key annotations, default threshold, weight translation incl. cash-only off, zero-equity block with/without holdings, no_execute, reserved-cash policy cap, risk-control execution fields, cash_by_currency) were generated on main@a314852 + QPK@350dd38 (legacy path).
  • New path + QPK@155d74a reproduces the golden output exactly (canonical JSON sha256 df0420c1…e896 before and after).
  • Per-case differential test also routes the same inputs through the retained QPK compat facade and asserts equality.
  • Full suite: 864 passed locally with the installed pinned QPK (sibling ../QuantPlatformKit/src hidden).

QPK delta 350dd38..155d74a reviewed for Firstrade

  • common/execution_translation.py, strategy_contracts.py, presentation/*: facade split; legacy path delegates (covered by parity above).
  • longbridge/auth.py (#653): not imported by Firstrade.
  • strategy_lifecycle AI/watch/research modules: not imported (FT uses only performance_monitor, live_equity, unchanged).
  • execution_kernel (#657): new, unused.

Not in scope

No deploy / env / secret / traffic change. No Firstrade sync/session/claim/ingress change. Deploys remain manual workflow_dispatch; last 15 main commits show only github-actions checks (no Cloud Build app).

Author: Pigbibi.

- decision_mapper builds ValueTargetExecutionSemantics + ValueTargetDisplayAnnotations
  and calls build_value_target_execution_runtime_plan(semantics=, display=)
- no more build_value_target_runtime_plan / mixed ValueTargetExecutionAnnotations
- bump QPK pin 350dd38 -> 155d74a (same pin as Schwab/Binance) for the facade
- parity: golden plans generated on main@a314852 + QPK@350dd38 (legacy path);
  new path reproduces them exactly, and matches QPK compat facade per case
@Pigbibi
Pigbibi merged commit 071087f into main Oct 11, 2026
1 check passed
@Pigbibi
Pigbibi deleted the rebuild/b12-ft-value-target-facade branch October 11, 2026 07:42
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