Skip to content

fix(tests): normalize TOML quote style for cross-platform snapshot consistency#1958

Merged
bug-ops merged 1 commit intomainfrom
fix-1957-snapshot-lsp
Mar 17, 2026
Merged

fix(tests): normalize TOML quote style for cross-platform snapshot consistency#1958
bug-ops merged 1 commit intomainfrom
fix-1957-snapshot-lsp

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 17, 2026

Summary

Fixes Windows snapshot test failure (#1957) caused by TOML quote style mismatch.

On Windows, the TOML serializer uses single quotes for paths containing backslashes (literal strings). After test normalization replaced path values with placeholders, the single quotes were preserved, creating snapshot mismatches when comparing with Unix snapshots (which use double quotes).

Changes

  • Modified normalize_runtime_paths_for_snapshot() in crates/zeph-core/src/config/types/tests/mod.rs
  • Added post-processing step to normalize single-quoted placeholders to double quotes
  • Affects 4 paths: skills.paths, memory.sqlite_path, debug.output_dir, logging.file

Testing

  • config_default_snapshot test passes
  • ✅ All 265 config tests pass (zero regressions)
  • ✅ No snapshot files modified
  • ✅ Cross-platform verified (no-op on Unix)

Related

…nsistency

On Windows, TOML serializes paths with backslashes using single quotes
(literal strings). After replacing path values with placeholders during
test snapshot normalization, these single quotes were preserved, causing
snapshot mismatches when comparing Windows output against snapshots
created on Unix (which use double quotes).

Add a post-processing step in normalize_runtime_paths_for_snapshot()
that converts single-quoted placeholders to double quotes, ensuring
consistent snapshot format across all platforms.

Fixes #1957
@bug-ops bug-ops added bug Something isn't working tests Test-related changes labels Mar 17, 2026
@github-actions github-actions bot added rust Rust code changes core zeph-core crate size/S Small PR (11-50 lines) and removed tests Test-related changes labels Mar 17, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 17, 2026 23:28
@bug-ops bug-ops merged commit 4d73597 into main Mar 17, 2026
20 checks passed
@bug-ops bug-ops deleted the fix-1957-snapshot-lsp branch March 17, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(tests): Windows snapshot test failure in config_default_snapshot_lsp_policy

1 participant