You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(compile): address PR review feedback on migration framework
Four findings from the Rust PR Reviewer bot:
1. check_pipeline's bail message had a redundant "error:" prefix that
produced "Error: error: ..." once anyhow's top-level handler added
its own "Error:" wrapper. Drop the prefix and reformat the hint
onto an indented continuation line.
2. compile_pipeline_inner did a redundant serde_yaml::from_value
round-trip just to satisfy ParsedSource.front_matter, even though
perform_source_rewrite_if_needed never reads that field. Refactor
the helper to take the four primitive fields it actually uses
(mapping, body_raw, source_sha256, migrations) instead of the full
struct. reconstruct_source likewise takes individual fields now.
3. Misleading comment in tests/migration_tests.rs claimed a
"thread-local counter" was used; only a nanosecond timestamp was.
Replaced rand_suffix() with timestamp + AtomicU64 monotonic seq so
parallel tests scheduled in the same nanosecond always get
distinct dirs.
4. Leading whitespace before the opening `---` was silently stripped
on migration rewrite. parse_markdown_detailed already tolerates it
on read; capture it as a new ParsedSource.leading_whitespace field
and emit it from reconstruct_source so byte-faithful preservation
extends to whitespace prefixes (BOM-stripped editor blank lines,
etc.).
All 1369 tests still pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments