Skip to content

v0.25.1

Choose a tag to compare

@github-actions github-actions released this 23 Jun 17:49
· 1 commit to main since this release

Fixed

  • Self-heal could double a position when positions() lags the fill. Post-trade verify rebuilt the diff purely from broker.positions() after a 2s settle; on an eventually-consistent broker (e.g. Tastytrade's REST, which can lag the fill by several seconds) a just-filled market order still read as residual, so self-heal re-executed it as a second market order that filled immediately — doubling the position. This is the same bug class as the MOC self-heal double-fire (0.25.0) but it bites normal market orders on any lagging broker. Self-heal now never re-trades a leg that was already cleanly sent in the same run (a market order isn't idempotent; a residual there is almost certainly a position-read lag, not a real miss). Genuinely-failed legs (rejected/skipped/resting) were never recorded as clean sends, so they still heal; a true miss on a just-sent leg reconciles on the next run.
  • Release notes were always the generic fallback. The release workflow extracted the CHANGELOG section with an inline awk that fed ## [x.y.z] to a regex match — the brackets were read as a character class, so it never matched and every GitHub release showed "See CHANGELOG.md for details." instead of the real notes. Extraction moved to an import-tested helper (msts_trader/changelog.py, literal-heading match) and the release now also runs --generate-notes, so each release shows the changelog plus clickable commit/PR links and a "Full Changelog" compare link.

Tests / robustness

  • tests/test_self_heal.py: self-heal skips a just-traded leg when positions lag (no double-trade) and still heals a leg that was not traded this run.
  • tests/test_changelog.py: release-notes extraction (bracketed heading, tag form, missing/blank version, last-section-to-EOF, and a guard that the repo's own CHANGELOG yields non-empty notes for the current version).
  • tests/test_cli.py: MOC + limit-chase mutual-exclusion is refused; a live MOC run inside the ~15:50 ET cutoff is refused. (Companion to the MOC self-heal fix in 0.25.0 — locks the guards so they can't regress.)
  • msts_trader/changelog CLI writes UTF-8 bytes so the em-dashes/arrows in the changelog can't crash it on a legacy Windows console.

Full Changelog: v0.25.0...v0.25.1