Repository navigation
Keep stored workflow settings on a partial admin update - #297
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The admin routing action
update_workflowreplaced every omitted field with a fixed value:retry_max_hops3,retry_wall_ms60000,full_routingtrue,enabledtrue.SQL_UPDATE_WORKFLOWwrote 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 livedialogrow 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::WorkflowUpdatecarries the four fields asOptions;Nonekeeps the stored value throughCOALESCEin theUPDATE.Tests
partial_workflow_update_keeps_the_stored_retry_budget(PostgreSQL, gated onOPENPLOTVA_TEST_POSTGRES_DSN): anenabled-only update keeps 5 hops / 180000 ms andfull_routing; a budget-only update keepsenabled. 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