test(tier3): add 9 SIM_verif_attach_mass RUNs (#99 Bucket B)#624
Merged
Conversation
Extends the structural mass-tree cross-validation in tier3_sim_attach_mass.rs from 8 to 18 of JEOD's 21 RUNs, validating composite mass / CoM / inertia against JEOD MassBody::print_tree() .out fixtures. New RUNs: Offset-attach group: RUN_05 (single body, Struct spec, non-zero CoM), RUN_06 (Spec inertia spec), RUN_07 (SpecCG inertia spec). Named-point group: RUN_103/104 (3-body named-point chains), RUN_106 (Spec via named points), RUN_107 (SpecCG via named points), RUN_110 (named-point attach of 3 children + runtime detach), RUN_111 (named-point + offset attach + runtime reattach). Ports the Spec and SpecCG inertia_spec branches from mass_properties_init.cc (I_body = T_io · (I_user − pmi(m, offset)) · T_ioᵀ for Spec; the offset term is dropped for SpecCG). Both reduce to the same box inertia diag(0.3333, 0.4167, 0.0833) the Body spec declares directly — a structurally-independent cross-check confirming the port. Observed max errors: mass 0, CoM 1.0e-16 m, inertia 5.4e-7 kg·m²; tolerances stay at the 5e-6 JEOD %20lf print-precision floor (per CLAUDE.md convention). Deferred (documented in the module header): RUN_08/RUN_108 — a child is attached to two parents in separate body actions; resolving the final topology would require reading JEOD output rather than source config. RUN_09/RUN_109 — non-identity structure→body transform on the root; JEOD reports composites in body frame (mass_update.cc:101/107 rotate by composite_properties.T_parent_this), which MassTree::recompute_composites keeps in struct frame. Needs the body-frame composite rotation ported. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR extends JEOD SIM_verif_attach_mass structural mass-tree validation by adding new run builders, committed mass.out fixtures, and reference-generation script entries. The implementation currently covers 17 RUNs, while the PR text and module docs claim 18.
Changes:
- Adds
Spec/SpecCGinertia-spec helper transforms and newbuild_run_*mass-tree scenarios. - Adds JEOD
print_treefixtures for the new attach-mass cases. - Updates the Trick reference-generation script to produce the new fixtures.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
crates/astrodyn_verif_jeod/tests/tier3_sim_attach_mass.rs |
Adds new mass-property helpers, run builders, and validation calls. |
trick/generate_references.sh |
Adds new SIM_verif_attach_mass reference-generation entries. |
crates/astrodyn_verif_jeod/test_data/attach_mass_05_mass.out |
Adds JEOD fixture for RUN_05. |
crates/astrodyn_verif_jeod/test_data/attach_mass_06_mass.out |
Adds JEOD fixture for RUN_06. |
crates/astrodyn_verif_jeod/test_data/attach_mass_07_mass.out |
Adds JEOD fixture for RUN_07. |
crates/astrodyn_verif_jeod/test_data/attach_mass_103_mass.out |
Adds JEOD fixture for RUN_103. |
crates/astrodyn_verif_jeod/test_data/attach_mass_104_mass.out |
Adds JEOD fixture for RUN_104. |
crates/astrodyn_verif_jeod/test_data/attach_mass_106_mass.out |
Adds JEOD fixture for RUN_106. |
crates/astrodyn_verif_jeod/test_data/attach_mass_107_mass.out |
Adds JEOD fixture for RUN_107. |
crates/astrodyn_verif_jeod/test_data/attach_mass_110_mass.out |
Adds JEOD fixture for RUN_110. |
crates/astrodyn_verif_jeod/test_data/attach_mass_111_mass.out |
Adds JEOD fixture for RUN_111. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
31 tasks
The 9 new SIM_verif_attach_mass RUNs raise the observed composite_inertia max error to 5.40e-7 (composite_com to 1.02e-16); refreeze baselines.json / baselines.md so the tier3_baseline_diff check passes. Widening ratio is 1.35x (under the 1.50x warn band) and composite_com sits below the 1e-12 absolute floor, so check_baseline_widening stays silent. Correct the module doc header from 18 to 17 covered RUNs (8 existing + 9 new; the doc body already lists 17) per PR review feedback. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
simnaut
added a commit
that referenced
this pull request
May 25, 2026
… LSODE) (#627) * chore(tier3): refreeze baselines snapshot (track 19 untracked tests + LSODE) The frozen `baselines.json` regression snapshot is a manual `tier3_report --freeze-baselines` artifact, not refreshed by CI. The `tier3_baseline_diff` gate only fails on regressions of entries already present, reporting brand-new tier3 tests as informational "new" — so every tier3 test added since the last freeze accumulated unguarded. This refreezes the full snapshot (78 -> 97 entries) from a clean `cargo nextest run --workspace -E 'test(tier3_)'` (all 233 tier3 tests pass): - Adds regression coverage for 19 tracked-but-unfrozen tests (RNP, LSODE, relative-state, mars/phobos, NESC NRHO, dyncomp attach-to-ref-frame, kinematic-propagation, child-derivative, complex attach/detach, and the run2/6c/6d/9b/10b simulation RUNs). - Tightens `tier3_simulation_lsode_default` by ~7 orders of magnitude: position 9.5 km -> 9.2e-4 m, velocity 11 m/s -> 1.0e-6 m/s. The old ceiling was frozen when LSODE was a stub; #616/#617 implemented the stiff BDF integrator, so the meaningful error is now sub-mm. The loose ceiling let a 7-orders accuracy regression pass unnoticed. All deltas are tightenings (informational) or new entries; the `check_baseline_widening` lane reports 0 errors / 0 warnings, and `tier3_baseline_diff` is OK (97 matched, 0 new). `attach_mass` is unchanged from #624. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(tier3): allow-list earth_moon_rosetta, rename dyncomp err keys, capture 2 new tests The previous freeze failed the fast-bucket baseline-invariance gate: - tier3_earth_moon_rosetta was added as a baseline entry but the fast CI bucket excludes the earth_moon suite, so it reported as missing. Add it to .github/tier3-allow-missing.txt alongside tier3_earth_moon_clem. - sim_drag_ver_const (#621) and simulation_tide_run02 (#625) landed on main after the freeze and were unguarded; refreeze captures both. - Rename tier3_sim_dyncomp_run_attach_to_ref_frame extras *_max_quat_angle/*_max_ang_vel -> *_..._err to match the schema used by every other tier3 report (Copilot review). Values byte-identical. Verified: baseline_diff OK (99 matched; 0 allowed-missing; 0 new); widening check 0 error(s), 0 removed; fmt + clippy clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Test User <test@test.com> 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.
Summary
Closes part of #99 Bucket B by extending the structural mass-tree
cross-validation in
tier3_sim_attach_mass.rsfrom 8 → 17 of JEOD's 21SIM_verif_attach_massRUNs.This is a structural mass-tree validation, not a trajectory test: JEOD's
sim is initialization-only (Trick stops at t=0, or t=2s for runtime
detach/reattach), dumping the composite tree via
MassBody::print_tree(). Eachnew RUN gets a
build_run_*()that constructs the sameMassTreefrom theJEOD
Modified_data/*.py+input.pyconfig, and we compare compositemass / CoM / inertia against the committed
.outfixtures.RUNs added (9)
Offset-attach group
Structinertia spec, non-zero CoM[0.5,0,1](no attach)StructCG) + child1 (Spec), offset attach[0,0,2]StructCG) + child1 (SpecCG), offset attach[-1,0,0]Named-point group (
BodyAttachAligned)InputMatrixorientations)StructCG) + child1 (Spec) via named pointsStructCG) + child1 (SpecCG) via named pointsNew physics ported (config-only)
The
SpecandSpecCGinertia_specbranches ofmass_properties_init.ccare ported as init-time transforms:I_body = T_io · (I_user − pmi(m, inertia_offset)) · T_ioᵀforSpec; theoffset term is dropped for
SpecCG. These are pure configuration transforms(JEOD reference data is used only for test comparison). As a
structurally-independent cross-check, both reduce to the same box inertia
diag(0.3333, 0.4167, 0.0833)that theBodyspec declares directly — exactlythe JEOD test designers' intent.
Tolerances
Observed max errors across all 17 RUNs: mass
0, CoM1.0e-16 m,inertia
5.4e-7 kg·m². Source-code tolerances stay at the existing5e-6floor, which is the JEOD
%20lf(6-decimal)print_treeprint-precisionfloor and the dominant noise source (per the CLAUDE.md
1.05×-observed-maxconvention; the print floor bounds the observed numeric max with margin).
The frozen
baselines.jsonregression snapshot is refrozen for this entry:composite_inertia4.0e-7 → 5.40e-7 andcomposite_com4.08e-17 → 1.02e-16,reflecting the new RUNs' observed maxima. The widening ratio is 1.35×
(under the 1.50× warn band) and
composite_comsits below the 1e-12absolute floor, so
check_baseline_wideningstays silent.Not added (blockers)
separate body actions (e.g. child3 → child2 via
attach2and child3 →parent via
attach3). Determining the resolved final topology would requirereading JEOD's output, not source config — so this is deferred rather than
guessed.
transform (
parent_mass_orientation_optionA). JEOD reports compositeCoM/inertia in the parent body frame (
mass_update.cc:101/107rotate thestruct-frame offsets by
composite_properties.T_parent_this), whereas ourMassTree::recompute_compositeskeeps composites in the struct frame.Closing these needs the body-frame composite rotation ported into
recompute_composites— flagged for a follow-up rather than approximated.Verification
cargo nextest run -p astrodyn_verif_jeod -E 'test(attach_mass)'— pass (17 RUNs)cargo run -p astrodyn_verif_jeod --bin tier3_baseline_diff— pass (refrozen entry)cargo fmt --check— cleancargo clippy -p astrodyn_verif_jeod --tests -- -D warnings— cleanparity_coverage— pass (attach_massremains a documented permanent gap:structural test, no trajectory CSV)
🤖 Generated with Claude Code