Skip to content

fix(server): a warm /load_expr POST with the session's own config skips the pipeline (#1037) - #1073

Open
paddymul wants to merge 3 commits into
mainfrom
fix/1037-warm-load-expr-same-config
Open

paddymul wants to merge 3 commits into
mainfrom
fix/1037-warm-load-expr-same-config

Conversation

@paddymul

@paddymul paddymul commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1037. The first commit (a634d7a) adds the failing test on its own, and CI failed on exactly that test on Python 3.11, 3.12 and 3.13 (both matrices). The fix is 79adcfa.

Problem

POST /load_expr skipped the warm-session early-exit (#899) whenever the body carried any config field, whether or not the value differed from the one the session was built with. A client that sends its saved config on every open (tallyman does, for any entry with a display config) re-ran expr_load, the dataflow and the metadata on every click, even though the session was warm and the config identical.

The issue measured this on 0.15.9: a warm POST with an equal column_config_overrides took 220 ms for a 24-column entry and 249 ms for a 1.98M-row entry, against 3.5 ms when the early-exit is taken. I did not re-measure on this branch.

Approach

has_config in LoadExprHandler.post now counts a field only when it is non-empty and differs from the session's held value: session.dataflow_kwargs for column_config_overrides, extra_grid_config, init_sd and skip_stat_columns, and session.component_config for component_config. The check moved below the existing lookup so it reuses existing and existing_kwargs, which the data_id check already needs.

A differing field still re-runs the pipeline, and a POST that omits config still takes the early-exit, both as before.

Tests

In tests/unit/server/test_load_expr.py::TestLoadExprPerfFixes:

  • test_warm_session_with_same_config_skips_pipeline (the failing commit): for each of the five config fields, load a session with a value, repost the same value and assert load_expr_build_dir is not called again, then repost a different value and assert it is.
  • test_warm_session_reruns_when_any_config_field_differs (the fix commit, passes before and after): a differing field next to equal ones re-runs, a config the session never held re-runs, and omitted config keeps the session's.

Locally tests/unit/ is 1629 passed, 17 skipped, 16 xfailed. CI on 79adcfa is green. The 3.14 jobs don't run test_load_expr.py, so they were green on the failing commit too.

Trade-offs

  • Equality is == on the parsed JSON. Dict key order doesn't matter, list order does: skip_stat_columns of ["a", "b"] against ["b", "a"] counts as a change and re-runs. That errs toward re-running.

🤖 Generated with Claude Code

…g should skip the pipeline (#1037)

A client that sends its saved config on every open re-runs expr_load, the dataflow and the metadata even though the config equals the one the session holds. For each config field, load a session with a value, repost the same value and assert load_expr_build_dir is not called again, then repost a different value and assert it is.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

📦 TestPyPI package published

pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.15.10.dev37798913676

or with uv:

uv pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.15.10.dev37798913676

MCP server for Claude Code

claude mcp add buckaroo-table -- uvx --from "buckaroo[mcp]==0.15.10.dev37798913676" --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo-table

📖 Docs preview

🎨 Storybook preview

…fig that differs from the session's (#1037)

has_config was true for any non-empty config field, so a client sending its saved config on every open skipped the warm-session early-exit even when the config equalled the one the session was built with. Compare each field with what the session holds (dataflow_kwargs for column_config_overrides, extra_grid_config, init_sd and skip_stat_columns; component_config for the rest). A differing field still re-runs.

Adds a guard test for the cases that must keep re-running: a differing field next to equal ones, a config the session never held, and omitted config keeping the session's.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@paddymul
paddymul marked this pull request as ready for review October 6, 2026 19:04
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…pr-same-config

# Conflicts:
#	buckaroo/server/handlers.py

This branch was successfully deployed

1 active deployment
testpypi — 7354d04a Deployed Oct 8, 2026 by paddymul via Publish to TestPyPI #1818
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.

server: a warm /load_expr POST re-runs the pipeline when its config equals the session's

1 participant