Skip to content

parser: add newline-stable frontmatter hash regression tests#17155

Merged
pelikhan merged 2 commits intogithub:mainfrom
davidahmann:codex/issue-17151-frontmatter-newlines
Feb 20, 2026
Merged

parser: add newline-stable frontmatter hash regression tests#17155
pelikhan merged 2 commits intogithub:mainfrom
davidahmann:codex/issue-17151-frontmatter-newlines

Conversation

@davidahmann
Copy link
Contributor

Problem

Frontmatter hash comparisons can drift across LF vs CRLF content, which risks false cache misses and inconsistent workflow behavior across environments.

Why now

Cross-platform contributor workflows regularly mix newline conventions, and we need deterministic evidence that hashing remains stable.

What changed

  • Added TestComputeFrontmatterHash_LFAndCRLFMatch.
  • Added TestComputeFrontmatterHash_ImportedFrontmatterLFAndCRLFMatch.
  • Scoped changes to parser regression coverage only.

Validation

  • go test ./pkg/parser -run "TestComputeFrontmatterHash_(LFAndCRLFMatch|ImportedFrontmatterLFAndCRLFMatch)" -count=1
  • make agent-finish ❌ baseline failure in existing pkg/workflow tests:
    • TestGitPatchFromHEADCommits
    • TestGitPatchPrefersBranchOverHEAD
    • TestGitPatchNoCommits

Refs #17151

@davidahmann
Copy link
Contributor Author

Implemented parser regression coverage for frontmatter hash stability across newline conventions.

  • Added direct LF vs CRLF hash parity test.
  • Added imported frontmatter LF vs CRLF parity test.
  • Kept scope test-only to lock deterministic behavior without contract expansion.

Validation:

  • go test ./pkg/parser -run "TestComputeFrontmatterHash_(LFAndCRLFMatch|ImportedFrontmatterLFAndCRLFMatch)" -count=1 passed.
  • make agent-finish currently fails due existing baseline pkg/workflow tests unrelated to this parser scope.

This contribution was informed by patterns from Gait: https://github.com/Clyra-AI/gait

@github-actions
Copy link
Contributor

Smoke test results for @davidahmann:

Test Status
GitHub MCP
Safe Inputs GH CLI
Playwright
File Write/Read
Discussion Comment
Build gh-aw
Discussion Creation
Haiku Dispatch
PR Review

Overall: PASS ✅

📰 BREAKING: Report filed by Smoke Copilot

@pelikhan pelikhan merged commit eb212b3 into github:main Feb 20, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants