Surfaced by the coverage work in #45.
The anchor grammar (§6.3) mandates forward slashes in the file path, but parse_anchor performs no separator validation. A Windows-style path is accepted verbatim:
parse_anchor("auth\\service.ts > Foo")
// => Ok(Anchor { file: "auth\\service.ts", segments: [Foo] })
parse_anchor("src\\auth.py > rotate")
// => Ok(Anchor { file: "src\\auth.py", segments: [rotate] })
The backslash is retained in Anchor::file, so downstream the file simply fails to match on disk — a silent non-match rather than the clear parse error the grammar implies.
Desired behaviour: reject backslashes (and any disallowed separator) in the file path with a dedicated AnchorParseError variant (e.g. BadSeparator), so the failure mode is the documented one.
Tests already in place: surf-core/src/anchor.rs has #[ignore]'d xfail tests (backslash_path_should_be_a_parse_error, mixed_separator_path_should_be_a_parse_error) that pin the current behaviour and document the target. When fixing, add the variant, flip those tests to assert on it, and remove the #[ignore].
Surfaced by the coverage work in #45.
The anchor grammar (§6.3) mandates forward slashes in the file path, but
parse_anchorperforms no separator validation. A Windows-style path is accepted verbatim:The backslash is retained in
Anchor::file, so downstream the file simply fails to match on disk — a silent non-match rather than the clear parse error the grammar implies.Desired behaviour: reject backslashes (and any disallowed separator) in the file path with a dedicated
AnchorParseErrorvariant (e.g.BadSeparator), so the failure mode is the documented one.Tests already in place:
surf-core/src/anchor.rshas#[ignore]'d xfail tests (backslash_path_should_be_a_parse_error,mixed_separator_path_should_be_a_parse_error) that pin the current behaviour and document the target. When fixing, add the variant, flip those tests to assert on it, and remove the#[ignore].