Skip to content

feat: CaDecon bridge config, autorun, progress & auto-export#109

Merged
daharoni merged 6 commits into
mainfrom
feat/cadecon-bridge-autorun
Mar 22, 2026
Merged

feat: CaDecon bridge config, autorun, progress & auto-export#109
daharoni merged 6 commits into
mainfrom
feat/cadecon-bridge-autorun

Conversation

@daharoni
Copy link
Copy Markdown
Contributor

@daharoni daharoni commented Mar 22, 2026

Summary

  • Add DeconConfig pydantic model for validated bridge configuration with IDE autocomplete
  • Add GET /api/v1/config and POST /api/v1/progress bridge endpoints
  • Extend decon() with keyword args (autorun, max_iterations, num_subsets, etc.) validated via pydantic
  • Add terminal progress display with in-place \r updates during autorun
  • Add bridge-effects.ts module: fetches config → applies to stores → auto-starts solver → posts progress (throttled 500ms) → auto-exports on completion
  • Update ExportButton to show "Auto-export enabled" in autorun mode
  • Remove tau_rise_init / tau_decay_init from bridge config and algorithm store — seed phase auto-detects kernel time constants
  • Add cross-language schema consistency tests via shared decon-config-full.json fixture

Test plan

  • All 126 Python tests pass (pytest)
  • 3 new JS schema consistency tests pass (vitest)
  • npm run format produces no changes
  • Manual: calab.decon(traces, 30, autorun=True, max_iterations=5) — browser opens, solver starts automatically, terminal shows progress, results return to Python
  • Manual: calab.decon(traces, 30) — existing behavior preserved (user clicks Start/Export manually)
  • Manual: calab.decon(traces, 30, autorun=False, num_subsets=2) — params applied in UI but solver doesn't start

🤖 Generated with Claude Code

daharoni and others added 6 commits March 22, 2026 09:38
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>
@daharoni daharoni merged commit 653cef7 into main Mar 22, 2026
2 checks passed
@daharoni daharoni deleted the feat/cadecon-bridge-autorun branch March 22, 2026 19:24
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