Skip to content

[notif-consolidate-1230] LongBridge: default-off target-bound notification consolidation - #600

Merged
Pigbibi merged 3 commits into
mainfrom
notif-consolidate-1230/longbridge
Oct 17, 2026
Merged

Pigbibi merged 3 commits into
mainfrom
notif-consolidate-1230/longbridge

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

LongBridge routine cycles and execution-report heartbeat can now produce target-bound daily candidates behind LONGBRIDGE_UNIFIED_NOTIFICATION_ENABLED (unset/empty/invalid => false). The boolean selects the existing QSL_ROUTINE_NOTIFICATION_MODE; the original flags-OFF path and historical mode behavior remain intact. Real orders/fills remain immediate, including candidate-store failure; the new routing path uses QSL_DIGEST_ROUTINE_ORDERS=false and does not defer real-order notifications even if the legacy order setting is true.

The producer writes the existing qsl.digest_candidates.v1 payload only after preserving private event/run facts in notification storage. PAPER/HK/SG bindings include target/account/strategy identity and matrix checks. Multiple producers share actual source run IDs. Actual order/fill collections absent from ExecutionCycleResult stay unknown instead of being counted from logs. Healthy runs provide coverage; proved idle windows do not invent runs.

Immediate errors, receipt problems, risk escalation and unknown order status reserve conditional GCS markers before sending. Repeated unresolved observations, cold starts and uncertain ACKs do not send again; proved recovery and new severity/reason transitions can alert again. Missing/incomplete marker history fails closed and is recorded as notification failure. Receipt acceptance, due-time/quiet-report rules, trading schedules, disabled targets, broker calls and order/risk/allocation logic are unchanged. PAPER canary stays manual and was not run.

QPK dependency: existing notification-only source snapshot convention. Exact unified_contract.py from QuantStrategyLab/QuantPlatformKit draft commit 60a30ff9a5abc8654787095c9d5a003485afb325, SHA256 7ba48d1d7c74e66be8cd3ff983c2117002776e82cda6675a084cfe0dc51aecc0. The trading URL pin remains 350dd38ece0952beef096893a7dcf8ae3871609a; all strategy pins/lock files remain unchanged. A full QPK repin would import 140 files of unrelated auth, runtime-control, execution-presentation and research changes, so it was avoided. must be re-pinned to merged/released QPK before merge. No LongBridge A-fix was assigned; new display uses existing localized QPK templates and shared display-name configuration.

Validation:

  • Main golden tests compare flags unset/empty/false/invalid, zh/en, legacy immediate/daily_digest: exact send text and bootstrap/snapshot/plan/execute calls/order/arguments.
  • Offline tests cover per-target isolation, runtime/archive run dedupe, unknown counts, candidate/marker failures, atomic generations, uncertain sends, recovery/re-worsening, stale source timestamps, risk reasons/severity, and real-order visibility when storage fails. Unit tests deny real sockets/DNS before collection; all transports/brokers/cloud IO use fakes.
  • Full local suite: 2084 passed, 3 skipped, 176 subtests passed. Final focused notification/request entrypoints: 178 passed, 24 subtests passed.
  • Ruff, frozen lock check, QPK pin consistency, fake deployment-workflow shell tests, and 9 synthetic candidates against the existing QRS schema passed.
  • AST/byte diff walk: 176 unchanged functions; 11 dependency/trading/target/canary files identical; service execution/persistence call arguments and receipt acceptance unchanged. Detailed internal review notes are in the job RESULT/TRADINGDIFF handoff, outside this repository.

Limitations: production revision/enablement/delivery are unknown; no runtime or channel was invoked. ON adoption needs protected per-target candidate/marker configuration and central receiver acceptance. Old candidate objects without matching private run history are not overwritten. Pending/uncertain claims need operational reconciliation. Legacy unstructured issue categories use fixed-title fingerprints; semantic correlation across different legacy titles remains unknown. Existing coverage configuration targets absent src and reports no coverage data; test assertions still run.

DRAFT: trading-path sensitive; independent trading-diff review is still required. No merge or ready-for-review in this batch. No deploy, variables/secrets/IAM changes, workflow dispatch/rerun, canary, real sends or broker operations were performed. Needs deploy/runtime and workflow adoption to take effect; not done.

Exact-head CI: SUCCESS on cffc3b35db84c6ba1d08eb993752280862bf689c, CI run 39004664627, including lint, dependency/lock checks, bounded workflow shell cases and the full unit suite. PR remains DRAFT.

Pigbibi and others added 3 commits October 17, 2026 12:59
@Pigbibi
Pigbibi marked this pull request as ready for review October 17, 2026 06:53
@Pigbibi
Pigbibi merged commit c6b9e24 into main Oct 17, 2026
1 check passed
@Pigbibi
Pigbibi deleted the notif-consolidate-1230/longbridge branch October 17, 2026 06:53
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