Repository navigation
test(live): follow two Morphemeris changes and run the live suites weekly - #35
Merged
Merged
Conversation
…ekly Two live cross-checks had been red since late August, unseen because the live suites only ran locally. Both are server-side changes; the library is unchanged. Composite: morphemeris#105 made `resolution` a strict lower|higher 180-degree tie-break and rejects the old `nearest`. Composite midpoints are always the shorter arc now, so the oracle sends `lower`, which is the tie the library resolves to (spec 7.1). The values agree to 1e-13. Davison: Morphemeris now converts UTC to UT1 through the leap-second table and its Delta T model, and /v1/davison averages UT1 Julian Days. The library averages UTC instants. For this pair the server's midpoint is 90 ms earlier, which moved the Sun 1.03e-6 degrees, just past the 1e-6 tolerance. The library keeps the UTC midpoint (spec 7.1 now says so; rationale records why). The test is split instead of loosened: the instant within 1 s of the server's, the place exactly, and the chart exactly at the instant the server reports. A 2 s shift in instantMidpoint fails it. Adds .github/workflows/live.yml: weekly and on dispatch, never on PRs, reading the MORPHEMERIS_API_KEY secret and failing outright when the secret is absent rather than skipping green. Spec 13.1 updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The code path filter listed the scaffold's tests/**, but this repo's suites live in test/, and none of the config the test job reads (vitest, cucumber, tsconfig, tsup, eslint, prettier) was listed. A PR touching only those skipped the test matrix and still passed the required check. #35 was the first to show it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Merge order: #34 first. The second commit edits |
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.
Two live cross-checks in
test/live/cross-check.live.test.tshave been failing since late August. Nobody saw it because the live suites only ever ran on a laptop. Both failures come from Morphemeris changes, and no library code changes here.Composite: the API contract changed
The test failed on a 400 before it compared anything. morphemeris#105 (2026-08-24) made
resolutiona strictlower|highertie-break for the exact-180° case, because composite midpoints are always the shorter arc, and it now rejectsnearest. The oracle now sendslower, which is the same tie the library resolves to (spec §7.1). The values agree to 1e-13.Davison: the server now works in UT1
An audit of Morphemeris's ephemeris engine changed how UTC timestamps are converted. They now go through the leap-second table to TT, then back through the ΔT model to UT1, which matches
swe_utc_to_jd./v1/davisonaverages those UT1 Julian Days, as its spec §4.18 says. The library averages UTC instants.At the Sun's speed, 90 ms is 1.03e-6°, just past the 1e-6° tolerance. The Moon is off by 1.5e-5° for the same reason.
As you decided, the library keeps the UTC midpoint. Spec §7.1 now names the time scale, and the rationale records why. The test is split rather than loosened, so the convention gap cannot hide a geometry bug:
datetime_iso, since UT1 − UTC is under 0.9 s.A 2 s shift in
instantMidpointfails test 1. I checked by mutation and then reverted it.Weekly live run
.github/workflows/live.ymlrunstest/liveandtest/browserweekly (Wednesdays 06:00 UTC) and on dispatch. It never runs on pull requests, per spec §13.1, which is updated. It reads theMORPHEMERIS_API_KEYrepository secret, which I set from your.env.localwithout printing it. It fails outright if the secret is missing, rather than letting the suites skip themselves and report green. Comments invitest.config.ts,load-env.ts, the browser test, and CLAUDE.md that said "never in CI" are updated.Verification
pnpm testgives 238/238 unit and live tests and 33/33 scenarios.Manual test
git checkout test/live-drift && pnpm installpnpm vitest run test/live: 9/9 pass, including the three new Davison checks.gh workflow run live.yml, thengh run watch. It should go green, which confirms the secret works. A workflow can't be dispatched before it exists onmain, so this is the first CI run of it.No user-facing surface. The
testtype means release-please will not cut a release.🤖 Generated with Claude Code