chore(release): 5.4.0 - mock fidelity - #112
Merged
Merged
Conversation
The test monkeypatched read_state with a raising stand-in, opened a websocket and closed it immediately, then asserted the handler had reached read_state. But the handler dispatches read_state onto the session worker thread via session.submit() (stream.py:98), so it runs asynchronously relative to the handshake -- closing right away raced that dispatch and the job could never run. That race failed CI on whichever interpreter happened to lose it: Python 3.10 on one run and 3.11 on the next, each time passing on every other version, and passing on re-run. It blocked two consecutive runs including a release PR. Wait for the stand-in to actually fire before closing the socket. The timeout keeps a genuine regression from hanging the suite rather than failing it.
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.
Cuts 5.4.0 — the mock fidelity release. Version bump plus the changelog header rename; no code changes.
Why MINOR
[Unreleased]carried a single### Addedsection and no⚠️ Breaking Changes. Everything in it is additive: newSignalSpecfields appended at the end of the dataclass (so positional construction is unchanged), new keyword-only parameters with defaults onreject_if_invalid, and an empty error queue that returns'+0,"No error"'byte-identical to the stub it replaced.What ships
The mock can now misbehave the way real hardware does — the point being that this project has no physical instruments, so the mock is the instrument, and a mock that can only succeed cannot test the code whose job is to notice failure.
SYST:ERR?, cleared by*CLSand*RST.FunctionGenerator.get_error()andPowerSupply.get_error()go from timing out entirely to answering;DataLogger.get_error()can finally report something other than health.-222, which is what an instrument actually does. Unimplemented commands still time out, so the wire-form conformance net is untouched.SignalSpecgained baseline drift, glitches and edge ringing, all default-off, so measurement code can be exercised against imperfect signals instead of mathematically clean ones.Verification
5.4.0, enforced bytests/test_version_consistency.py.docs/about/changelog.mdregenerated and verified byte-identical toCHANGELOG.md.## [Unreleased],## [5.4.0] - 2026-07-26present, oneAddedsection, no breaking-changes section,5.3.0untouched.python -m buildproduces both artifacts at 5.4.0 with no deprecation warnings;twine checkPASSED on the wheel and the sdist.Set-Content -Encoding utf8, which writes a BOM and corruptedpyproject.tomlfor TOML parsers; it was caught, reverted, and redone through Python with explicit encoding.Known limitations carried into this release
Recorded in the feature PR rather than dropped, and none blocking:
-350,"Queue overflow".C1:VDIV abc→ValueError) rather than queueing-104,"Data type error".ringing_amplitudeknob; magnitude is hardcoded at 50% of the step, giving ~90% first-sample overshoot at the tested parameters.tests/test_server_ownership.py::test_watcher_released_on_abnormal_disconnectis flaky — it lost a race on the Python 3.10 runner during this branch's CI and passed on re-run, having passed on five other interpreter versions in the same run. Pre-existing and unrelated to this work, but worth de-flaking.After merge
Publishing fires when the GitHub release is created (
publish.ymlonrelease: published, trusted publishing), taggedv5.4.0. Create it withgh release create --target <full-40-char-sha>— not by pushing the tag, since a tag push letsbuild-executables.ymlcreate the release asgithub-actions[bot]and GitHub suppresses workflow triggers for bot-raised events, which is how v4.1.0 silently never reached PyPI. The full SHA is required; an abbreviated one is rejected with HTTP 422.