Scope FinalSpark integration + M0 smoke test - #2
Open
m9h wants to merge 1 commit into
Open
Conversation
Adds the design/scope doc and the first runnable milestone (M0) for driving BL-1's closed-loop experiments against live FinalSpark organoids, reusing the existing encode/decode/game/feedback machinery with the simulator as a dry-run digital twin. - docs/design/finalspark_integration.md: architecture (NeuralBackend Protocol unifying SimBackend + FinalSparkBackend on a rate-coded tick), the three hard constraints (10 s stim re-upload -> <=16 trigger bank; ~1 Hz polling loop; count-based decoding + charge-balancing safety), digital-twin strategy, single-organoid-first decision, milestones M0-M4, and risks. - experiments/finalspark_smoke.py: read-only M0 — connect via Experiment(token), list electrodes, pull recent spike counts/events from the Spike DB, save raster + per-electrode-count plots. Token via FINALSPARK_TOKEN env var; runs inside FinalSpark's environment. - pyproject: optional [finalspark] extra (public np-utils helpers; core neuroplatform is environment-provided, documented inline). Experiment scripts live outside src/bl1 and tests, so lint/test/quality CI scope is unaffected (verified locally). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 10, 2026
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.
Scopes connecting BL-1's closed-loop machinery to live FinalSpark Neuroplatform organoids, and ships the first runnable milestone (M0).
What's here
docs/design/finalspark_integration.md— full design/scope.experiments/finalspark_smoke.py— M0, read-only & safe: connect, list electrodes, pull recent spike counts/events, save raster + per-electrode plots. Run inside FinalSpark's env withFINALSPARK_TOKEN.pyproject— optional[finalspark]extra (publicnp-utils; coreneuroplatformis environment-provided).Key design points
SimBackend(digital twin) andFinalSparkBackendare interchangeable behind aNeuralBackendProtocol.send_stimparam()is a ~10 s upload → sensory encoding pre-discretized into ≤16 triggers; ~1 Hz polling loop (Trigger.send→ 200 ms →read_count()); count-based decoding + mandatory charge balancing.CI
Experiment scripts live outside
src/bl1andtests/, so lint/test/quality scope is unaffected (verified locally: ruff + format clean onsrc/bl1).Open question for FinalSpark (blocks M1)
Max safe stimulation amplitude/current is unspecified in the docs — must be confirmed before any stimulation milestone.
Milestones M0–M4 tracked in linked issues.
🤖 Generated with Claude Code