Skip to content

Fix DCA workflow dispatch inputs#58

Merged
Pigbibi merged 1 commit into
mainfrom
fix-dca-workflow-input-limit
Jun 18, 2026
Merged

Fix DCA workflow dispatch inputs#58
Pigbibi merged 1 commit into
mainfrom
fix-dca-workflow-input-limit

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep Manual Strategy Switch under the GitHub workflow_dispatch input limit
  • route DCA controls through extra_variables_json control fields and translate them to runtime variables
  • add tests for DCA JSON controls and workflow input count

Tests

  • python3 -m unittest tests.test_runtime_settings
  • node --experimental-default-type=module tests/strategy_switch_worker_validation.mjs
  • node --check --input-type=module < web/strategy-switch-console/worker.js
  • node --check --input-type=module < web/strategy-switch-console/page_asset.js
  • node --check --input-type=module < web/strategy-switch-console/strategy_profiles_asset.js
  • extracted index.html script checked with node --check
  • DCA build_runtime_switch smart/fixed validation commands
  • git diff --check

@Pigbibi Pigbibi merged commit 5530731 into main Jun 18, 2026
2 checks passed
@Pigbibi Pigbibi deleted the fix-dca-workflow-input-limit branch June 18, 2026 19:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7178a06fcc

ℹ️ 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".

throw new Error("use dca_mode and dca_base_investment_usd instead of extra_variables_json for DCA settings");
throw new Error("use dca_mode and dca_base_investment_usd control fields instead of DCA_MODE variables");
}
const dcaExtraControls = dcaPayloadFromObject(extraVariables);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate JSON DCA controls before dispatch

When callers use the new extra_variables_json route for DCA controls, this sanitizing helper drops invalid values instead of preserving that a control field was supplied; for example {"dca_mode":"smart","dca_base_investment_usd":"0"} on a DCA profile passes normalizeSwitchInputs and gets dispatched, but build_runtime_switch.py later rejects the same payload. Please validate the raw dca_mode/dca_base_investment_usd JSON fields here so the switch API fails synchronously instead of creating a workflow run that fails after dispatch.

Useful? React with 👍 / 👎.

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