Repository navigation
refactor: harden packaging, MCP errors, and kernel validation - #20
Merged
Merged
Conversation
… into _problem.py
…emo, and the MCP entry point
…n is never dropped
…he sdist and wheel
… scale-safe HS normalisation
…ntiguous native inputs
Plan: .kbsi/plans/refactor-debug-repo.md
Plan: .kbsi/plans/refactor-debug-repo.md
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.
The declared Python 3.10 floor was already broken (the test suite imports
tomllib), themcpextra was unpinned so a 1.x resolve lackedMCPServer, every MCP tool failure reached the client as an opaque "Error executing tool", the Seedless kernels accepted non-finite Bloch vectors and mis-shaped waveforms with backend-dependent exceptions, and the sdist shipped repository-internal files.requires-pythonto 3.11, pinmcp>=2.0,<3andnumpy>=2.0/scipy>=1.13, add licence/classifier/URL metadata, and trim the sdist to what a builder needs.LICENSEand anoptimalcontrol/py.typedmarker.ToolError(the pinnedValueErrortext now reaches the model), rejectn_seeds < 1up front, and type the band argument as aBandSpecTypedDict so the tool schema documents its keys.(n_steps, 2)waveform) before dispatch so both backends raise the sameValueError.ControlProblem.freezea default ofNoneand drop the boilerplate from the docs.grapeandensemble.tmp_pathinstead of/tmp, pinnedmatch=on the Seedless rejections, parity tests assert the native extension is present, in-memory MCP client tests, failing-first kernel tests.Validation: full native suite 288 passed (274 before + 14 new); NumPy fallback suite (full, minus the by-design Rust-only file) 273 passed, 15 deselected; Ruff and strict mypy clean; in-memory MCP probe shows the pinned messages for all four error cases; the new kernel tests fail against the original kernel (5 failed) and pass against the fix (18 passed); renaming the native
.somakes the Bloch parity test fail at the new availability assert and restoring it turns it green again;maturin sdistcontains none of.kbsi/,.github/,CLAUDE.md,AGENTS.md,.gitignore,.claude-plugin/,benchmarks/; the wheel carriespy.typed,LICENSE,Requires-Python: >=3.11. Later waves of the same plan (lint/format adoption, Rust manifest, module split, example dedupe, direct tests, CI, docs) land on this branch as further commits.