feat: CaDecon bridge config, autorun, progress & auto-export#109
Merged
Conversation
Enable fully automated `decon()` calls from Python: pass algorithm parameters via `DeconConfig` (pydantic), auto-start the solver, report progress back to the terminal, and auto-export results on completion. - Add `DeconConfig` pydantic model with validated fields - Add `GET /config` and `POST /progress` bridge endpoints - Add `decon()` keyword args (autorun, tau_rise_init, max_iterations, etc.) - Add terminal progress display with in-place updates - Add `bridge-effects.ts` module (config apply, progress POST, auto-export) - Wire bridge effects into CaDecon App.tsx - Update ExportButton for autorun awareness - Add cross-language schema consistency tests via shared fixture - 126 Python tests passing, 3 new JS schema tests passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The seed phase auto-detects kernel time constants from the data, making user-provided tau_rise_init/tau_decay_init unnecessary. Removes them from DeconConfig, BridgeConfig, decon() kwargs, algorithm-store, and the shared schema fixture. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Displays a green "Results auto-exported to Python" badge in the submit panel when autorun completes and results are sent back. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract shared runBridgeExport() used by both auto-export effect and ExportButton, eliminating duplicated build+export+done logic - Add bridgeExportDone() guard to auto-export effect (prevents double-export) - Remove redundant isAutorun wrapper in ExportButton (call isBridgeAutorun directly), drop unused imports - Name tau seed fallback constants in iteration-manager - Fix _receive_params to use CORS-aware error (consistent with other handlers) - DRY up test fixtures with _make_server/_start_server helpers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
DeconConfigpydantic model for validated bridge configuration with IDE autocompleteGET /api/v1/configandPOST /api/v1/progressbridge endpointsdecon()with keyword args (autorun,max_iterations,num_subsets, etc.) validated via pydantic\rupdates during autorunbridge-effects.tsmodule: fetches config → applies to stores → auto-starts solver → posts progress (throttled 500ms) → auto-exports on completiontau_rise_init/tau_decay_initfrom bridge config and algorithm store — seed phase auto-detects kernel time constantsdecon-config-full.jsonfixtureTest plan
pytest)vitest)npm run formatproduces no changescalab.decon(traces, 30, autorun=True, max_iterations=5)— browser opens, solver starts automatically, terminal shows progress, results return to Pythoncalab.decon(traces, 30)— existing behavior preserved (user clicks Start/Export manually)calab.decon(traces, 30, autorun=False, num_subsets=2)— params applied in UI but solver doesn't start🤖 Generated with Claude Code