fix: nondeterministic generation, cache invalidation, and whitespace churn#41
Open
hazre wants to merge 6 commits into
Open
fix: nondeterministic generation, cache invalidation, and whitespace churn#41hazre wants to merge 6 commits into
hazre wants to merge 6 commits into
Conversation
7876f79 to
a566357
Compare
thwbh
requested changes
Apr 13, 2026
Owner
thwbh
left a comment
There was a problem hiding this comment.
Please change the merge target to the develop branch.
Author
|
Done. I also noticed that it was still updating the generated files and only updating the timestamp, I've updated it to take that into account + some test cleanup stuff to actually remove the left over files properly. |
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.
fixes #42 #43
Before this, identical inputs could still produce different generated output because parts of analysis, rendering, and cache hashing depended on unordered traversal and
HashMapiteration. That could causecommands.ts,types.ts,events.ts, andindex.tsto reorder entries or pick up extra blank lines across repeated runs. Events also were not part of the cache state, soevents.tscould go stale.This change sorts analyzer and generator inputs before rendering, makes command and config hashing use a stable order, includes events in cache invalidation, and cleans up TS/Zod template rendering so the generated files keep consistent spacing and do not add random blank lines.
Validated with
cargo testand repeated downstream builds confirming the generated output stayed unchanged across runs.