Skip to content

feat: add BYPASS_ORDER_PRECAUTIONS for API → Precautions - #72

Merged
code-hustler-ft3d merged 1 commit into
mainfrom
feat/bypass-order-precautions
Oct 13, 2026
Merged

code-hustler-ft3d merged 1 commit into
mainfrom
feat/bypass-order-precautions

Conversation

@code-hustler-ft3d

Copy link
Copy Markdown
Owner

What this PR does

Adds BYPASS_ORDER_PRECAUTIONS (#68): yes ticks Gateway's Bypass Order Precautions for API Orders box under Configure → Settings → API → Precautions, no unticks it, unset leaves it as it is.

Why

IBC's BypassOrderPrecautions had no controller equivalent, so API orders that trip an order precaution needed the box ticked by hand over VNC and a settings volume to keep it.

How it works:

  • After the API settings, the controller selects API → Precautions. Gateway labels the box "Bypass Order Precautions for API Orders", or on some accounts "Bypass Order and Ticket Precautions for API Orders and Tickets"; it asks JSTATE which label is showing (reads only, quietly) and sets that one with JCHECK.
  • After OK and the settings dialog closing, it reads the box back: Verified: Bypass Order Precautions for API Orders reads back as True, or ALERT_CONFIG_NOT_APPLIED ... env_var=BYPASS_ORDER_PRECAUTIONS reason="Gateway did not retain the value after OK; ...".
  • If the box can't be set at all (page not reachable, box not showing or greyed out, two boxes with that label, click failed), the same ALERT fires with that reason and the precautions stay as Gateway had them.
  • Unset, empty or unrecognised leaves the page untouched. A value that isn't one of yes/no, true/false, on/off, 1/0 now gets a WARNING, for READ_ONLY_API too.
  • scripts/ibc_config_to_env.py maps BypassOrderPrecautions.

Gateway 10.50.1f has text for a "deactivate these precautions for all API orders?" confirmation, but it is never shown; ticking the box only sets the value. On a paper 10.50.1f Gateway with fresh settings, BYPASS_ORDER_PRECAUTIONS=yes, READ_ONLY_API=no and AUTO_RESTART_TIME, the box was ticked, kept after OK and read back as on, alongside the other settings. The Lock and Exit drill's fixture gains a Precautions page with both labels.

Checklist

  • make clean && make && make test passes (full unit suite green)
  • No credentials, account numbers, or PII in the diff
  • CHANGELOG.md updated under the next version's heading
  • docs/OBSERVABILITY.md updated (if touching ALERT tokens, /health, or env vars listed there)
  • docs/FROM_IBC.md updated (if changing anything that maps to an IBC key)
  • docs/UPGRADING.md gets a new ### vX.Y.Z section if the change is operator-visible
  • Commit messages imperative ("fix X", not "fixed X" or "WIP")

BYPASS_ORDER_PRECAUTIONS=yes ticks Gateway's "Bypass Order Precautions
for API Orders" box under Configure → Settings → API → Precautions, no
unticks it, and unset leaves it as it is (issue #68). Some accounts show
the box as "Bypass Order and Ticket Precautions for API Orders and
Tickets"; the controller asks JSTATE which label is showing and sets
that one.

The box is read back after OK like Read-Only API: Verified, or
ALERT_CONFIG_NOT_APPLIED with env_var=BYPASS_ORDER_PRECAUTIONS if Gateway
didn't keep it or the box couldn't be set. A value that isn't one of
yes/no, true/false, on/off, 1/0 gets a WARNING, for READ_ONLY_API too.
scripts/ibc_config_to_env.py maps IBC's BypassOrderPrecautions.
@code-hustler-ft3d
code-hustler-ft3d merged commit 0df83e1 into main Oct 13, 2026
9 checks passed
@code-hustler-ft3d
code-hustler-ft3d deleted the feat/bypass-order-precautions branch October 13, 2026 02:51
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