You are given a small service catalog.
Each service declares which filesystem paths it reads from and which paths it writes to.
Across the interview, you will normalize paths, detect directly impacted services,
extend the logic to deleted subtrees, and finally propagate the impact through
downstream service dependencies.
The starter project already includes path helpers used by the test suite.
One of those helpers currently normalizes paths incorrectly. In particular,
it mishandles repeated slashes and the root path `/`.
Update the existing implementation so that:
- duplicate slashes are collapsed,
- trailing slashes are removed for non-root paths,
- the root path stays as `/`,
- ancestor checks work on normalized paths.
test_collapses_repeated_slashes_and_trailing_slash
test_preserves_root_path
test_ancestor_check_uses_normalized_paths