Skip to content

fix(tests): unbreak CI on Linux, and bump to 0.5.2 - #175

Merged
eaitbrahim merged 2 commits into
mainfrom
chore/bump-0.5.2
Aug 7, 2026
Merged

fix(tests): unbreak CI on Linux, and bump to 0.5.2#175
eaitbrahim merged 2 commits into
mainfrom
chore/bump-0.5.2

Conversation

@eaitbrahim

@eaitbrahim eaitbrahim commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Two commits: a CI fix that main needs right now, and the 0.5.2 version bump that depends on it.

1. main is red — the real-script tests are macOS-only

#174 added tests that execute the shipped keel-live-run.sh under /usr/bin/sandbox-exec, so a test run can never fire a real notification on a machine that also trades real money. The harness also uses BSD date -r and chflags uchg. None of those exist on Linux, so all 45 invocations died with FileNotFoundError: /usr/bin/sandbox-exec on the ubuntu runner, and main's push CI has been failing since #174 merged.

This is not a coverage question worth solving portably. The artifact under test is a macOS deployment — launchd plus osascript — and the script only ever runs on the box that owns the launchd job. So on non-Darwin the real-script tests skip, while the schedule invariant (exactly one cycle per UTC date, across both DST transitions) stays covered on every platform, because that is proven by the pure-Python model tests.

One runtime guard in _run_script covers all 45 call sites, since every invocation already funnels through it. The five tests that reach for chflags before running the script carry an explicit @_macos_only mark, where the runtime guard would come too late.

This blocks everything else: release.yml refuses to publish unless tests pass, so 0.5.2 could not be cut with main in this state.

2. Bump to 0.5.2

Patch — no schema change, no new capability. Ships #169, #172 and #174.

#174 is why this release exists rather than #172 alone. #172 retimed the live detector to 01:20 UTC, cutting ~12h of detection lag, but traded a 13-hour data-publication margin for 20 minutes — and nothing on the live entry path dedupes an order. #174's freshness gate in run_once withholds all entries whenever any bar is unconfirmed, and it must ship in the same wheel as the schedule it protects.

That makes the deployment order strict: install this wheel first, then copy keel-live-run.sh / com.keel.live.plist. The shell files alone are the unsafe half. The plist also goes from 12 triggers to 24, so it needs a launchctl reload, unlike the comment-only change in #171.

uv.lock relocked in the same commit, verified with uv sync --frozen.

Gate: 1976 tests pass locally, ruff clean, mypy clean.

🤖 Generated with Claude Code

eaitbrahim and others added 2 commits August 7, 2026 00:51
Patch: no schema change, no new capability. #172 retimed the live detector
to 01:20 UTC (cutting ~12h of detection lag), #174 made that safe, and #169
downgraded an unreachable venue from an ERROR traceback to a warning.

#174 is the reason this release exists rather than #172 alone. The retiming
trades a 13-hour data-publication margin for 20 minutes, and nothing on the
live entry path dedupes an order -- so the freshness gate in `run_once` that
withholds ALL entries when any bar is unconfirmed has to ship in the SAME
wheel as the schedule it protects. Installing this wheel is a prerequisite
for copying the new keel-live-run.sh/com.keel.live.plist to the deployment;
the shell files alone would be the unsafe half.

uv.lock relocked in the SAME commit, per 0.5.0 and 0.5.1. Verified with
`uv sync --frozen`, which accepted the lock and rewrote nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… on Linux

`main` went red the moment #174 landed. The new real-script tests execute
the shipped `keel-live-run.sh` under `/usr/bin/sandbox-exec` (so a test run
can never fire a real notification on a machine that also trades real
money), with a `date` shim built on BSD `date -r` and stamp-failure cases
built on `chflags uchg`. None of those exist on Linux, so all 45
invocations died with FileNotFoundError on the ubuntu runner.

This is not a coverage question worth solving portably. The artifact under
test IS a macOS deployment -- launchd plus `osascript` -- and the script
only ever runs on the box that owns the launchd job. So on non-Darwin the
real-script tests SKIP, and the schedule INVARIANT (exactly one cycle per
UTC date, across both DST transitions) stays covered everywhere, because
that is proven by the pure-Python model tests, which are platform-neutral.

One runtime guard in `_run_script` covers all 45 call sites, since every
invocation already funnels through it. The five tests that reach for
`chflags` BEFORE running the script carry an explicit `@_macos_only` mark,
where the runtime guard would come too late to stop a FileNotFoundError.

Blocks the release otherwise: `release.yml` refuses to publish unless tests
pass, so 0.5.2 could not have been cut with main in this state.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@eaitbrahim eaitbrahim changed the title chore: bump to 0.5.2 for the UTC detector retiming and its entry gate fix(tests): unbreak CI on Linux, and bump to 0.5.2 Aug 7, 2026
@eaitbrahim
eaitbrahim merged commit 79f35b9 into main Aug 7, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the chore/bump-0.5.2 branch August 7, 2026 05:08
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