Make LCM capture deterministic and add shorten file names#5203
Merged
sisuresh merged 6 commits intostellar:masterfrom Apr 6, 2026
Merged
Make LCM capture deterministic and add shorten file names#5203sisuresh merged 6 commits intostellar:masterfrom
sisuresh merged 6 commits intostellar:masterfrom
Conversation
The invoke_time_nsecs core_metrics diagnostic event contains wall-clock timing data that varies between runs. Zero these values when writing LCM files from tests so that regenerated output is deterministic and comparable across machines.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to make auto-captured LedgerCloseMeta (LCM) output deterministic and enforce that determinism in CI so checked-in capture files stay stable and up to date.
Changes:
- Zeroes non-deterministic diagnostic timing events (e.g.,
invoke_time_nsecs) when capturing LCM. - Skips rewriting LCM files when regenerated output is semantically equivalent (after normalization).
- Adds a CI step that runs
--capture-lcmand fails iftest-lcm/changes.
Reviewed changes
Copilot reviewed 4 out of 800 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/util/MetaUtils.h | Declares helper to zero non-deterministic diagnostic fields in LCM. |
| src/util/MetaUtils.cpp | Implements diagnostic-event detection and zeroing across LCM versions. |
| src/test/test.cpp | Adds semantic comparison to skip rewrites and applies diagnostic-zeroing on output. |
| ci-build.sh | Adds CI job step to regenerate LCM and fail when test-lcm/ differs. |
sisuresh
commented
Apr 3, 2026
dmkozh
approved these changes
Apr 6, 2026
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
invoke_time_nsecs) in captured LCM files so output is stable across runs