Skip to content

feat(eval): the start-attitude draw study as a generated table (#168) - #176

Merged
Telschow merged 4 commits into
mainfrom
feat/start-draw-study
Oct 24, 2026
Merged

Telschow merged 4 commits into
mainfrom
feat/start-draw-study

Conversation

@Telschow

Copy link
Copy Markdown
Owner

Re-measures the start-attitude-draw study on the corrected fixture as a committed CSV, and replaces the typed numbers on the pages by a generated, test-checked section. Development seeds 0 to 9 only.

Hook

run_case gets a keyword-only start_hook. It receives the StartError that draw_start_error drew and returns the one to use. It applies to ESKF cases that start from prior_draw. Like gnss_hook and imu_hook it is not in config_hash, and the docstring says so. The draw is made first on its own stream, so every variant of a seed sees the same draw.

Study

navkit sweep start-draw --csv PATH [--page PATH] [--compare PATH] [--seeds A-B] (src/navkit/start_draw_study.py). Cases outage_visual, vision_only, outage_visual_clone, outage_control. Variants full, no_attitude, attitude_only. One CSV row per (case, variant, seed): ATE RMSE (alignment none, full run) and mean NEES over the full run, no verdicts. Deterministic. Seeds from 100 are refused.

Result (medians over seeds 0 to 9)

Case Full draw Attitude zeroed Attitude only Seeds with larger ATE when the attitude is drawn
outage_visual 25.44 m 4.21 m 28.12 m 9 of 10
vision_only 54.23 m 7.55 m 52.18 m 10 of 10
outage_visual_clone 0.86 m 0.85 m 0.85 m 9 of 10
outage_control 9.74 m 9.43 m 7.66 m 6 of 10

The new numbers agree with the old claim. The clone is not exactly unchanged: per seed its ATE differs across variants by up to about 13% and its mean NEES by up to about 18%. The page therefore says "within a quarter of their mean in every seed" (tolerance chosen from those values), not "does not change". The mechanism stays a HYPOTHESIS; nothing here tests it.

Tests, with failing-on-main evidence

  • tests/test_start_hook.py: identity hook gives an identical record (timing keys stripped); the hook sees the drawn error and is not in the hash; a hook that zeroes dtheta gives an exactly zero initial attitude error; every variant of a seed sees the same draw. All 4 failed on main (run_case had no start_hook).
  • tests/test_start_draw_page.py: CSV shape and seeds, page section equals the generated text, every table cell recomputed from the rows, each sentence tested against the rows (several times, close to, factor of two, quarter for the clone, 2 degrees equals the filter's declared prior, HYPOTHESIS wording and no mechanism words), a fresh run of seed 0 equals the committed rows, held-out refusal.
  • tests/test_quoted_numbers.py: table rows between the start-draw markers are exempt (they are checked cell by cell by the page test); sentences around them are still scanned. A new test pins that.
  • Mutation checks: hook ignoring its return value fails the zero-attitude test. A hook-dependent draw seed fails the same-draw test and the identity test. Allowing seeds from 100 fails the refusal test.

Statements changed

File Before After
README.md, sweeps bullet on the attitude draw words about the medians, "measured once ... at e94c107", "produced under the earlier draw ... being re-measured (issue #168)" the same findings in words, no label, pointer to the generated table on the Results page and docs/data/start_draw_study.csv; HYPOTHESIS sentence kept
docs/results.md, paragraph "The anchor model does not recover ..." words, old label generated section between <!-- start-draw:start/end -->: table, sentences, HYPOTHESIS
CONSTRAINTS.md B1 "(MEASUREMENT, measured once ... at e94c107, being re-measured ...; HYPOTHESIS ...). The clone is unaffected." "(MEASUREMENT, the generated table on the Results page; HYPOTHESIS ...). The clone does not follow the attitude draw."

No new typed numbers outside the generated table. Defaults and the golden file are unchanged.

CI

A step in the ensemble reproducibility job runs navkit sweep start-draw --compare docs/data/start_draw_study.csv (about 3.6 minutes locally). That job already took about 24 minutes against about 36 for the slowest test job, so the job should stay under it. The new page test is in the docs-only list.

Notes

Closes #168

🤖 Generated with Claude Code

Comment on lines +184 to +187
"For both single-anchor cases (`outage_visual` and `vision_only`) the median ATE is several times larger with "
"the attitude drawn than without it, and with only the attitude drawn it is close to the full-draw median. "
"The attitude prior is 2 degrees per axis, so the anchor model does not recover from a start attitude error "
"inside its own declared prior.",
Comment on lines +189 to +192
"Without vision (`outage_control`) the attitude draw moves the median ATE by less than a factor of two. "
"The clone (`outage_visual_clone`) does not follow the attitude draw: its ATE and its mean NEES stay within a "
"quarter of their mean across the three variants in every seed. "
"The count in the last column says little for the clone, whose differences are small.",
Comment on lines +194 to +195
"Why the anchor model fails is a HYPOTHESIS and was not tested here: gravity leakage from the start tilt "
"error plus absolute information that the anchor model invents.",
Comment on lines +197 to +198
"The rows are in `docs/data/start_draw_study.csv`, written by `navkit sweep start-draw`, and the sentences "
"above are checked against them by `tests/test_start_draw_page.py`.",
Telschow and others added 3 commits October 24, 2026 13:12
Keep both test files in the ci.yml pytest list.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01L6ro5x4WRA4P7sQHLyPPGa
Keep every page test in the ci.yml pytest list.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01L6ro5x4WRA4P7sQHLyPPGa
@Telschow
Telschow merged commit 1af2998 into main Oct 24, 2026
21 checks passed
@Telschow
Telschow deleted the feat/start-draw-study branch October 25, 2026 06:05
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.

Re-measure the start-attitude-draw study on the corrected fixture, as a generated CSV

2 participants