Skip to content

Keep stored workflow settings on a partial admin update - #297

Merged
iamwavecut merged 2 commits into
mainfrom
fix/workflow-update-keeps-budget
Nov 13, 2026
Merged

iamwavecut merged 2 commits into
mainfrom
fix/workflow-update-keeps-budget

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

Problem

The admin routing action update_workflow replaced every omitted field with a fixed value: retry_max_hops 3, retry_wall_ms 60000, full_routing true, enabled true. SQL_UPDATE_WORKFLOW wrote all four columns unconditionally. A partial request could therefore cut the dialog workflow from its migration-set 5 hops / 180 s to 3 hops / 60 s, or re-enable a disabled workflow, and the once-only startup convergence would not restore it. Issue #294 named this path as a hypothesis. The live dialog row is still 5 / 180000 and the admin UI always sends the stored values, so this is hardening, not the cause of #294.

Change

  • openplotva_storage::llm_routing::WorkflowUpdate carries the four fields as Options; None keeps the stored value through COALESCE in the UPDATE.
  • The handler passes the fields it received and no defaults.

Tests

  • partial_workflow_update_keeps_the_stored_retry_budget (PostgreSQL, gated on OPENPLOTVA_TEST_POSTGRES_DSN): an enabled-only update keeps 5 hops / 180000 ms and full_routing; a budget-only update keeps enabled. It ran against a local PostgreSQL 17.

Local checks: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test -p openplotva-storage llm_routing (with the DSN), cargo test -p openplotva-app --lib routing.

Refs #294

update_workflow replaced omitted fields with 3 hops, 60 s, full routing and
enabled, so a partial request could silently cut the dialog budget from
5 hops / 180 s and re-enable a disabled workflow. Omitted fields now keep
their stored values (COALESCE in the UPDATE).
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Messages
📖 Danger checked 3 changed file(s).

Generated by 🚫 dangerJS against 3bf77dc

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