Skip to content

P0: block Longbridge SG next-session SOXL signals from same-day routing #359

Open

Description

@Pigbibi

Confirmed evidence

The live SG reports show broker order events on a run whose strategy signal is only effective on the next trading day:

  • 2026-07-10 19:45 UTC: signal_date=2026-07-10, effective_date=2026-07-13, action_done=true, order_events_count=2.
  • 2026-07-17 19:45 UTC: signal_date=2026-07-17, effective_date=2026-07-20, action_done=true, order_events_count=1.

This is a timing/routing defect, not a claim about broker fill status or a stop-loss failure. The current direct cycle can route a next-session decision during the signal-day invocation.

Immediate containment completed

  • Cloud Run longbridge-quant-sg-service is fail-closed: RUNTIME_TARGET_ENABLED=false on revision longbridge-quant-sg-service-00753-446.
  • The matching CLOUD_RUN_SERVICE_TARGETS_JSON deployment target is also disabled, preventing a later configuration sync from reopening it.
  • No position was closed, no open order was cancelled, and no allocation/strategy parameter was changed.

Required recovery path

  1. Add a paper-only Longbridge adapter for QPK durable execution commands (fix: harden runtime scheduling and notifications #342): persist immutable signal-day command, claim only on its effective trading day, and reconcile through broker evidence.
  2. Add deterministic tests for Friday-to-Monday, concurrent invocations, crash after claim, missing command store, and mismatched input/config digests.
  3. Demonstrate paper forward observations and reconciliation evidence.
  4. Require explicit approval before any live consumer is enabled.

Strict guardrails

Activity

  1. Pigbibi commented on Aug 24, 2026

    @Pigbibi
    CollaboratorAuthor

    Update (2026-08-24): containment is active. PR #360 is merged and makes the direct live route fail closed whenever effective_date differs from signal_date. PR #361 is also merged and stages a dry-run-only immutable command producer; it cannot claim commands, invoke the broker, or enable live routing. The canonical QuantPlatformKit pin was advanced in QuantStrategyLab/QuantPlatformKit#341 so this stage uses the shared contract. The Cloud Run runtime target remains disabled. Next gate: implement and forward-test a paper-only consumer with reconciliation evidence before any request to resume trading.

  2. Pigbibi commented on Aug 24, 2026

    @Pigbibi
    CollaboratorAuthor

    Paper forward-test completed on 2026-08-24. The SG runtime remains disabled, while its immutable command producer runs only in dry-run mode. A one-off dry-run reached the service successfully and created paper command cmd-21de4eca0f5b1ca662c915dec4786aad for effective_date 2026-08-25. The persisted report records action_done=false, order_events_count=0, orders_previewed_count=0, and broker_submission_done=false. The command was still enqueued even though ordinary execution dedup recognized the same signal/effective pair; that confirms evidence creation is independent of direct execution. Follow-up: the Invoke Cloud Run workflow cannot currently invoke a paused internal dry-run scheduler, so a narrowly guarded one-shot option is being added. Live routing remains disabled.

  3. Pigbibi commented on Aug 24, 2026

    @Pigbibi
    CollaboratorAuthor

    Invocation workflow acceptance test passed after PR #363 merge. With explicit allow_paused_dry_run=true and path /dry-run, it temporarily resumed only the paused precheck scheduler, received HTTP 200 from the service, and restored the scheduler to PAUSED. The second paper run was idempotent: the command store still contains one command for 2026-08-25, while the execution report records action_done=false, broker_submission_done=false, order_events_count=0, and orders_previewed_count=0.

  4. Pigbibi commented on Aug 24, 2026

    @Pigbibi
    CollaboratorAuthor

    Additional platform repair merged: PR #364 restores environment-scoped strategy plugin mounts during per-service sync, and PR #365 scopes traffic/scheduler reconciliation to the current matrix service. This removes the repeat PAPER/HK traffic-reconciliation race while SG remains paper-only and runtime-disabled.

  5. Pigbibi commented on Aug 28, 2026

    @Pigbibi
    CollaboratorAuthor

    Recovery audit update (2026-08-29):

    • The shared durable-command lifecycle now has explicit Friday-to-Monday regression coverage in QuantPlatformKit#444, in addition to atomic single-winner claim, crash-to-reconciliation-required, missing-store fail-closed, and release/config binding checks.
    • The LongBridge paper-only producer and reconciled consumer are merged on main. The deployed SG revision predates the consumer implementation, but SG remains RUNTIME_TARGET_ENABLED=false and LONGBRIDGE_DRY_RUN_ONLY=true; no live route was enabled or changed.
    • The isolated command-storage bucket exists and is empty, with the runtime identity limited to object create/view access. No verifier Cloud Run service or scheduler is deployed.
    • The current SOXL V7 candidate is an independently tracked research-only/non-live profile, not the legacy LongBridge soxl_soxx_trend_income runtime profile. It therefore must not be bound to this recovery path by relabelling it.

    Remaining hard gate: publish an audited, complete strategy-release identity and admission receipt for the exact runtime profile, then deploy the isolated paper verifier and collect forward reconciliation receipts. Only after that can a separate live approval be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions