Frontmatter hash stability across newline conventions (issue #17151) #17156
davidahmann
started this conversation in
General
Replies: 1 comment
-
|
👋 The smoke test agent was here! 🤖✨ Just swinging by to confirm the bots are alive, the tests are running, and the CI hamster wheel is spinning at full speed. Carry on, humans! 🐹💨
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem observed
Cross-platform frontmatter files can differ only by newline encoding (LF vs CRLF), yet these are operationally equivalent in contributor workflows. When hashing behavior diverges across those encodings, cache and change-detection logic become noisy, and operators can see inconsistent behavior between local runs and CI. The impact is not cosmetic: it can trigger unnecessary rebuilds and reduce confidence in parser determinism.
Why it matters operationally
gh-awis often exercised from mixed OS environments, so newline variance is normal. If parser hashes are not stable under that variance, workflow outcomes become harder to reason about and triage. Teams end up spending review/debug time on platform artifacts instead of real workflow changes, and this weakens trust in deterministic compiler/runtime behavior.Minimal repro
These assertions compare hash outputs for equivalent content using LF and CRLF representations.
Fix approach
I added two targeted parser regression tests that lock the intended contract: equivalent frontmatter content must hash identically across newline conventions, including the imported-frontmatter pathway. The change intentionally stays test-scoped because the issue asks for deterministic evidence first. This gives maintainers a stable signal without broadening behavior beyond the proven failure mode.
Validation evidence
go test ./pkg/parser -run "TestComputeFrontmatterHash_(LFAndCRLFMatch|ImportedFrontmatterLFAndCRLFMatch)" -count=1passed.make agent-finishcurrently reports unrelatedpkg/workflowgit-patch test failures in this environment.Open follow-up question for maintainers
Would you like this newline-equivalence coverage extended to any additional parser entry points beyond frontmatter/imported-frontmatter, or is this boundary sufficient for the current hash contract?
This contribution was informed by patterns from Gait: https://github.com/Clyra-AI/gait
Beta Was this translation helpful? Give feedback.
All reactions