Extend SIM_2_dyn_plus_STD Tier 3 coverage (calendar + scale-factor RUNs)#629
Merged
Conversation
Issue #99 Bucket B SIM_2_dyn_plus_STD was "1 of 5 RUNs": only RUN_initialize_by_value (init-by-value) was cross-validated. This adds the two further portable RUNs: - RUN_initialize_by_calendar — TAI init by calendar (2005-12-31 23:59:50), scale_factor=1. Validates TAI seconds, TAI TJT, DYN. - RUN_scale_factor_changes — TAI init by calendar, then dyn_time.scale_factor reassigned mid-run (t=5 -> -1.0, t=10 -> 0.5, t=20 -> -2.0), exercising JEOD TimeDyn::update_offset rate/direction changes incl. a full time reversal. Validates TAI seconds, TAI TJT, DYN. Both RUNs are expressible by SimulationTime as-is (set_scale_factor wires JEOD's TimeDyn offset/reversal behavior); no new physics needed. The two RUN_fail_* runs are JEOD negative tests (init-from-Dyn / uninitialized, designed to abort) — not propagation runs, so out of scope for a time-scale cross-validation. Added both RUNs to the SIM_2 group in trick/generate_references.sh (reusing the TAI+Dyn DRAscii snippet), regenerated the reference CSVs, and committed them. Observed maxima (tolerances at the existing SIM_2 1e-6 s TJT bound; TAI seconds and DYN exact): calendar: TAI_tjt 6.29e-7 s, TAI_s 0, DYN 0 scale_factor: TAI_tjt 4.71e-7 s, TAI_s 0, DYN 0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Extends the Tier 3 JEOD cross-validation suite for SIM_2_dyn_plus_STD to cover additional initialization and dynamic scale-factor scenarios, increasing time-propagation RUN coverage from 1 to 3 while reusing the existing TAI+DYN DRAscii column set.
Changes:
- Added two new SIM_2 RUNs (
RUN_initialize_by_calendar,RUN_scale_factor_changes) to the Trick reference-generation harness. - Added two new Rust Tier 3 tests that replay the scale-factor scheduling semantics and validate TAI seconds, TAI TJT, and DYN against JEOD CSVs.
- Committed regenerated reference CSVs for the two new RUNs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| trick/generate_references.sh | Adds SIM_2 RUN entries for calendar-init and scale-factor-change runs using the existing time_v2 DRAscii snippet. |
| crates/astrodyn_verif_jeod/tests/tier3_sim_time_docker.rs | Adds two new Tier 3 tests validating calendar initialization and mid-run scale_factor reassignment (including reversal) against JEOD outputs. |
| crates/astrodyn_verif_jeod/test_data/time_v2_calendar_time_v2.csv | New JEOD reference CSV for SIM_2 calendar initialization run. |
| crates/astrodyn_verif_jeod/test_data/time_v2_scale_factor_time_v2.csv | New JEOD reference CSV for SIM_2 scale-factor-change run. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…mments The hardcoded "observed maxima" numbers in the SIM_2 calendar/scale_factor test comments had already gone stale (claimed ~9e-9 s vs the actual 6.29e-7 / 4.71e-7 s the tests print at runtime). The println! in each test already reports the real maxima, so the comment figures were redundant and prone to exactly this drift. Keep the qualitative rationale and the assert! tolerance literals; remove the duplicated numbers. Same scrub applied to the pre-existing time_v4 jeod1x comment in the same file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
What
Extends Tier 3 time cross-validation for SIM_2_dyn_plus_STD (issue #99 Bucket B, previously "1 of 5 RUNs") from 1 to 3 covered RUNs.
RUN_initialize_by_value(existing)RUN_initialize_by_calendar(new)RUN_scale_factor_changes(new)dyn_time.scale_factorreassigned mid-run (t=5 → -1.0, t=10 → 0.5, t=20 → -2.0)RUN_scale_factor_changesexercises JEODTimeDyn::update_offset(offset = seconds − scale_factor·simtime) including a full time reversal, mirrored byastrodyn_time'sDynamicTime::update_offset. The harness applies each scale change before theadvancethat leaves the read's sim time, matching JEOD's read-fires-before-next-update ordering row-for-row.Out of scope
The remaining two RUNs —
RUN_fail_dyn_initializedandRUN_fail_uninitialized— are JEOD negative tests (initialize-from-Dyn and uninitialized initializer, both designed to abort at init). They are not time-propagation runs, so they have no propagated time-scale output to cross-validate and are excluded from this time-scale verification family.Capability check
Both new RUNs are expressible by
SimulationTimeas-is:set_scale_factoralready wires JEOD'sTimeDynrate/direction/reversal behavior. No new physics or approximation was required.How
trick/generate_references.sh(reusing the TAI+Dyn DRAscii snippet).cargo xtask regenerate-tier3(Docker, incremental) and committed them.Tolerances (1.05× observed; matching existing SIM_2 bounds)
TAI TJT bounded at 1e-6 s (calendar→TJT rounding noise); TAI seconds and DYN are exact.
Verification
cargo nextest run -p astrodyn_verif_jeod -E 'test(tier3_time_v2)'— 3 passedcargo fmt --check— cleancargo clippy -p astrodyn_verif_jeod --tests -- -D warnings— clean🤖 Generated with Claude Code