Skip to content

Switch grid ladders - #1142

Merged
carkod merged 2 commits into
masterfrom
switch-grid-ladders
Aug 25, 2026
Merged

Switch grid ladders#1142
carkod merged 2 commits into
masterfrom
switch-grid-ladders

Conversation

@carkod

@carkod carkod commented Aug 21, 2026

Copy link
Copy Markdown
Owner

No description provided.

@carkod
carkod force-pushed the switch-grid-ladders branch from b994e24 to 6e27a38 Compare August 21, 2026 15:44
@carkod
carkod force-pushed the switch-grid-ladders branch from 6e27a38 to 3206612 Compare August 21, 2026 15:45

@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: b994e242e6

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

table,
sa.Column("enable_grid_ladders", sa.Boolean(), nullable=True),
)
op.execute(f"UPDATE {table} SET enable_grid_ladders = false")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Expose the switch through the settings contract

The migration disables grid ladders for every deployment, but this commit only adds the field to the database model: PUT /autotrade-settings/bots still validates requests with the pinned pybinbot.AutotradeSettingsSchema, while terminal/src/features/autotradeApiSlice.ts and the Autotrade form omit the field. Consequently, operators cannot re-enable pending ladders through the shipped API/dashboard and must modify the database directly; update the shared settings contract and terminal control alongside this default-off migration.

AGENTS.md reference: AGENTS.md:L9-L15

Useful? React with 👍 / 👎.

Comment on lines +73 to +79
self.crud.update_logs(
ladder.id,
{
"event": "grid_ladders_disabled",
"reason": "enable_grid_ladders is off; leaving pending until enabled",
},
)

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 Avoid logging the disabled state on every lifecycle pass

When the switch remains off and a pending ladder exists, streaming/main.py revisits its symbol on every loop and this branch appends another identical entry to the ladder's JSON logs column each time. Over a prolonged disablement this produces thousands of database writes and an ever-growing log payload that is returned by ladder reads; record the transition once or suppress consecutive duplicate disabled events.

Useful? React with 👍 / 👎.

@carkod
carkod merged commit 3c444cf into master Aug 25, 2026
15 checks passed
@carkod
carkod deleted the switch-grid-ladders branch August 25, 2026 21:14
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