Skip to content

fix(buckaroo): check the server and renderer versions at runtime and show a banner on a mismatch - #317

Open
paddymul wants to merge 3 commits into
mainfrom
fix/verify-buckaroo-versions-at-runtime
Open

paddymul wants to merge 3 commits into
mainfrom
fix/verify-buckaroo-versions-at-runtime

Conversation

@paddymul

@paddymul paddymul commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Problem

A buckaroo-js-core older than the Buckaroo server does not send ?caps=stats_update on its WebSocket URL. The server then computes every summary stat before it sends the first row (stats_wire.build_state_message_for), with no error. On camera_select_columns_dated (23.9 M rows) the first rows arrived 6.5 s after the load instead of about 0.2 s. The cause was node_modules holding 0.15.6 while package.json and pnpm-lock.yaml pin 0.15.10, and a dist built from it. pnpm install had not been rerun after the bump.

tests/test_buckaroo_version_lockstep.py already asserts the pins and the installed packages, but only under pytest. The companion's startup, pnpm build and the restart script never run it, and dist can lag node_modules even when node_modules is right.

Fix

  • tallyman_core/buckaroo_versions.py: check_versions(server_running) compares the running server (/health), node_modules, the renderer baked into dist, and both source pins against the pins. Each mismatch is a sentence with the command that fixes it. It never raises.
  • buckaroo_lifecycle: records the version /health reports and logs an error per mismatch when Buckaroo starts.
  • GET /api/version carries the report under buckaroo. main.tsx shows a red banner above the page when buckaroo.problems is not empty (in the page flow, so it pushes the page down rather than covering the nav).
  • vite.config.ts: the build throws if the installed renderer is not the pinned one, and writes dist/build-info.json with the renderer version it bundled. A dist without that file is reported too.

Checked by hand: a staged package.json pin of 0.15.11 aborts the build with the message and leaves dist alone; a build-info.json stamped 0.15.6 produces the banner in headless Chromium and /api/version lists the problem.

Not in this PR: the restart skill's rebuild decision still compares only the git revision.

🤖 Generated with Claude Code

paddymul and others added 3 commits October 8, 2026 11:01
…erer versions at runtime

check_versions compares the running server, node_modules, the served dist and both source pins against the pinned versions. GET /api/version should carry the report.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…mit passes ruff and fails by test

With the module absent ruff sorts tallyman_core differently, so the first tests-only commit failed the ruff job and the test jobs were skipped. The file now imports the module on call and every test fails on its own against the pre-fix source.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…show a banner on a mismatch

check_versions compares the running server, node_modules, the served dist and both source pins against the pinned versions. The companion logs each mismatch at startup, GET /api/version carries the report, the SPA shows a banner from it, and the vite build refuses a stale node_modules and writes dist/build-info.json.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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