stkcraft-time 0.2.1

NAIF/SPICE-aligned astronomical time scales in Rust: UTC, TAI, TT, TDB/ET, GPS, UT1 and SCLK, with LSK/SCLK/EOP kernels, no_std support, WebGeocalc parity and an MCP server.
Documentation
# Explicit native Julian UTC

`TimeContext::et_to_spice_julian_utc` implements the N0067 TTRANS
TDB-to-JDUTC path and returns a checked `NaifJulianUtc`. Its `days()` method
exposes the original binary64 Julian-day value for consumers such as
native SPK type-10 initialization. It does not quantize through integer
`Epoch` or reconstruct a civil calendar before returning the result.

## Model and boundaries

The method requires an explicitly supplied IERS-only, table-driven LSK.
SOFA historical sources and frozen future policies return
`NaifKernelModelRequired`. Existing civil `et_to_utc` and `utc_to_et`
contracts retain their coverage limits and scientific-model separation.

N0067 assumes the first DELTA_AT offset minus one before the first entry;
this is a native computational convention, not a physical historical UTC
realization. Formal JDUTC stands still during a positive leap second.
Preserve that behavior when reproducing SPKE10; do not substitute another
calendar interpretation. N0067 requests only the first 280 DELTA_AT values
(140 entries); the new method preserves that selection and validates the
resulting paired TAI/day table. An invalid paired table returns the native
`SPICE(BADLEAPSECONDS)` symbol. Calendar indices outside the native signed
32-bit day representation return `EpochOutOfRange` explicitly.

## Independent evidence

The original 13-input capture used the unmodified `naif0012.tls` bytes.
Time 0.1.29 rejected nine historical inputs as `Time(UtcOutOfRange)` and
matched four accepted JDUTC values. All 13 original unrounded native
values now match the new explicitly selected path. The legacy civil API
continues to reject the nine historical inputs.

The expanded independent C capture contains 13 profiles and 18,863 queries:

- 18,493 finite JDUTC outputs compare by their IEEE-754 binary64 bits.
- 185 native errors from a constructible adjacent-date table compare by
  the exact native short symbol.
- A separate malformed table accounts for another 185 native errors.
  The existing typed LSK constructor rejects it earlier as `LskParse`.
  Every record is retained and tested for rejection presence; native
  short-symbol equivalence is **not** claimed for this constructor path.

Profiles cover the original leap dates, nonstandard DELTET constants,
zero periodic terms, positive/negative changes, negative offsets,
ancient/future first entries, day/leap boundaries and 139/140/141/142-entry
capacity cases. The original 18,678-query prefix is preserved unchanged
when the adjacent-date cases are appended. No native expectation is
rounded, replaced, or generated by the Rust implementation.

The original native inputs, stdout/stderr, compiler/linker records and
source snapshots are retained under `docs/reference/native-jdutc/`.
`tests/reference/native-jdutc/` holds the unchanged comparison data and
original LSK bytes. Reference processes use the official N0067 static
library, `/Od /fp:strict /MT`, the pinned static UCRT and its unchanged
default FMA setting. Production does not link CSPICE.

Regenerate into a new directory on the documented Windows profile:

```text
python tools/gen_native_jdutc.py --geocalc-source PATH_TO_GEOCALC --output-dir NEW_DIRECTORY
```

The explicit GeoCalc checkout supplies its native compiler helper and
provisioned official archive/library. The helper is available at commit
`e701f78c47e82bd47ae005a9d8d62733222fe19c`; capture records include its hash.
The three newly used native C sources are byte-checked against the
official archive. Neither normal Rust builds nor tests require GeoCalc.

## Structured raw tables and calculation-stage errors

Version 0.1.31 adds `contract::NaifDeltet` and
`NaifUtcContext::from_raw_parts(&entries, constants)?`. The constructor borrows
the original structured `LeapEntry` slice, requires it to be nonempty, and
requires all five DELTET constants to be finite. It does not sort or validate
TAI order. `et_to_spice_julian_utc` performs native paired-table validation and
returns `SPICE(BADLEAPSECONDS)` at calculation time. The existing scientific
constructor remains strict; its distinct `LskParse` behavior above is retained.

The raw route compares all original 18,863 records, including both sets of
185 native errors, by exact bits or SHORT symbol. A separate unchanged C oracle
captures four more profiles: unsorted dates, a duplicate date, an invalid 140th
entry and an invalid 141st entry. The last is ignored by native's first-140
selection; validating or sorting the complete raw slice would change results.
Those 7,968 new records contain 3,799 numeric outputs and 4,169 errors.

The combined raw regression covers 17 profiles and 26,831 records: 22,292
numeric outputs and 4,539 errors, all exact. The original typed adapter differed
on 8,153 records. Its failing regression and raw source are retained alongside
the independent inputs, original stdout/stderr, compiler/linker records and
source snapshots in `docs/reference/native-jdutc/raw-order/`. No old native
capture, expectation or input was replaced. Existing validated `TimeContext`
conversions retain their separate model guards and share the same arithmetic.

The new public API lives in `src/contract/naif_utc.rs`; arithmetic remains in
`src/naif/utc.rs`, with the shared UNITIM inverse in `src/naif.rs`. It returns
the same checked `NaifJulianUtc`, with no implicit ET or integer Epoch route.

## Remaining acceptance

This is the numeric TTRANS ET-to-JDUTC subset for structured date/whole-offset
LSK entries. It does not implement all TTRANS representations, arbitrary
malformed raw kernel-pool inputs, or historical civil text parsing. Native
symbols for arbitrary malformed variables remain open. The structured native
context resolves the previously constructor-blocked error profile without
changing the scientific constructor. Its empty/nonfinite structural guards
are checked-contract errors, not a raw pool assignment implementation. Current
MCP tools retain their existing input schemas and scientific/civil contracts.
GeoCalc historical SPK10 state integration requires its own independent
end-to-end regression; passing this time-layer corpus does not claim it.