Skip to content

Tighten packed-provisional validation across all 25 implementations; release 1.1.0 - #3

Merged
rlseaman merged 3 commits into
mainfrom
fix/packed-provisional-validation
May 27, 2026
Merged

Tighten packed-provisional validation across all 25 implementations; release 1.1.0#3
rlseaman merged 3 commits into
mainfrom
fix/packed-provisional-validation

Conversation

@rlseaman

Copy link
Copy Markdown
Owner

Summary

Fixes a packed-provisional detection collision — Catalina Sky Survey tracklet IDs such as C03UYWZ (century C = 1200s) matched the asteroid-provisional branch — and tightens validation to the canonical structure across all 25 language implementations:

  • Asteroid century I-L (1800-2199); comets A-L (1000-2199)
  • Half-month A-Y skipping I (a calendar code — same rule for asteroids, comets, and natural satellites; the calendar jumps H→J)
  • Cycle-units position must be a digit 0-9
  • Second/order letter A-Z skipping I; the pack path rejects I in both letter positions

Canonical asteroid pattern: ^[I-L][0-9]{2}[A-HJ-Y][0-9A-Za-z][0-9][A-HJ-Z]$.

This also closes a class of silent mis-conversions (K95I00A2095 IA, K03UYWZ→garbage, 1995 XIJ95X00I), adds BCE/ancient-comet unpacking to Nim (parity with Python/Tcl), corrects stale \d{2} helper cycle patterns (AWK/C#/Kotlin/PHP/Swift), isolates the C# test build intermediates, and reconciles the docs (asteroid I-L vs comet A-L; the I-skip is documented in the MPC unpacked-designation page, not PackedDes.html). Comet fragment letters — which legitimately include I (e.g. P/1930 J1-AI) — are preserved.

Verification

Full 2,022,404-row corpus + roundtrip + 98-case error suite green in every testable language; comet fragment-I round-trips preserved. The five previously-bespoke error harnesses (awk, bash, nim, forth, haskell) now read the shared test-data/error_test_cases.csv.

Caveats (please review)

  • spp is fixed by inspection only — there is no IRAF environment here to compile or test it.
  • Harmonizing the bespoke harnesses surfaced pre-existing input-validation gaps in awk/bash/nim/forth/haskell (numeric-range checks, whitespace strictness, structural checks). These are not regressions from this work; they are recorded as documented expected-skips and catalogued for future action in docs/VALIDATION_GAPS.md.

Release

Bumps to 1.1.0 (VERSION + Python/Rust/JS/TypeScript manifests; the Rust/JS/TS manifests were stale at 1.0.0 and are now synced per docs/DISTRIBUTION.md).

🤖 Generated with Claude Code

rlseaman and others added 3 commits May 27, 2026 13:40
… 25 implementations

Detection of packed provisional designations was too loose: the asteroid
century allowed A-L (admitting pre-1800 codes), the cycle-units position
allowed a letter, and the half-month and order letters did not skip I. Survey
tracklet IDs such as Catalina's C03UYWZ matched the asteroid branch, and several
implementations silently mis-converted inputs like K95I00A -> 2095 IA.

Detection now enforces ^[I-L][0-9]{2}[A-HJ-Y][0-9A-Za-z][0-9][A-HJ-Z]$ for
asteroids (comets remain A-L), with the half-month A-Y skipping I (Z unused) and
the order letter A-Z skipping I, in every implementation. The comet half-month
is the same object-independent calendar code and is now validated identically
for comets and natural satellites; comet fragment letters (which legitimately
include I, e.g. P/1930 J1-AI) are unaffected. The pack path rejects I in both
letter positions.

Also in this change: Nim gains BCE/ancient-comet unpacking (parity with the
Python/Tcl references); C++ build hygiene (unused include, structured binding);
helper cycle patterns corrected in AWK, C#, Kotlin, PHP, and Swift. SPP fixes
are applied by inspection (no IRAF available to compile). Docs reconciled to
state the asteroid I-L vs comet A-L century split, and that the letter-I-skip
rule is documented in the MPC unpacked-designation page rather than in
PackedDes.html.

Verified against the full 2,022,404-row corpus in every testable language;
comet fragment-I round-trips preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ression tests

The AWK, Bash, Nim, Forth, and Haskell error harnesses previously used bespoke
hardcoded cases. They now read the shared test-data/error_test_cases.csv (98
cases) like the Python/Tcl harnesses, with Forth using a "reject = output
unchanged" convention (it has no error channel).

Harmonization made these five implementations' input validation measurable
against the full suite for the first time and surfaced pre-existing gaps
(numeric-range checks, whitespace strictness, structural checks). Each is
recorded as a documented expected-skip (the C null-byte precedent) so the suites
report Failed: 0 with explicit Skipped: N; the gaps are catalogued for future
work in docs/VALIDATION_GAPS.md.

Adds four detection/* collision cases (C03UYWZ, K03UYWZ, K95I00A, 1995 XI) to
the shared suite, plus standalone test_detection_collision regression tests for
Python and Tcl, and a per-project Directory.Build.props that isolates the C#
test build intermediates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bump VERSION and the Python/Rust/JS/TypeScript manifests to 1.1.0 and roll the
CHANGELOG [Unreleased] section into [1.1.0]. The Rust/JS/TypeScript manifests
were stale at 1.0.0 and are brought in sync per docs/DISTRIBUTION.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rlseaman
rlseaman merged commit a4b33ec into main May 27, 2026
6 checks passed
@rlseaman
rlseaman deleted the fix/packed-provisional-validation branch May 27, 2026 20:44
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