Skip to content

fix: terminate incompatible compiled plans - #79

Merged
hjcud merged 1 commit into
developfrom
feature/78-terminal-plan-incompatibility
Aug 9, 2026
Merged

fix: terminate incompatible compiled plans#79
hjcud merged 1 commit into
developfrom
feature/78-terminal-plan-incompatibility

Conversation

@hjcud

@hjcud hjcud commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Closes #78.

AWS Development cause

INT03 run 66956d2d-1e21-37e9-bd62-a510f248a239 received an immutable compiled plan whose executionSnapshot.initialCashAmount was 100000 instead of the contract-required fixed-scale 100000.00000000. BasicPlanRuntime.load correctly raised BasicPlanCompatibilityError(PLAN_CONTRACT_INVALID), but the production binding let it escape to the worker's generic exception handler, which returned the same SQS message five times as HANDLER_ERROR:BasicPlanCompatibilityError.

The Backend producer normalization fix is separately tracked in Idea2Strategy-backend#255. This PR deliberately does not relax the compiled-plan contract.

Fix

Translate any deterministic BasicPlanCompatibilityError at the immutable plan binding boundary into JobNotSatisfiable, preserving the exact PlanLoadFailure reason. The existing terminal publication path now emits one FAILED, retryable=false event and returns PERMANENT_FAILURE.

Regression

The test injects the exact observed scale-less 100000 plan field and proves:

  • reason PLAN_CONTRACT_INVALID
  • exactly one terminal result event
  • retryable=false
  • no retry outcome

Verification

  • targeted regression passed
  • all non-Docker tests passed (3 skipped)
  • Ruff passed for the whole repository
  • mypy passed for all 56 source files
  • git diff --check passed

@hjcud
hjcud merged commit 73ea36c into develop Aug 9, 2026
9 checks passed
@hjcud
hjcud deleted the feature/78-terminal-plan-incompatibility branch August 9, 2026 06:04
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.

Treat deterministic Basic plan incompatibility as terminal

1 participant