Repository navigation
fix(consolidate): make slugified page paths pass ensure_portable - #1430
Merged
akitaonrails merged 4 commits intoOct 19, 2026
Merged
Conversation
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
slugify_page_path(ai-memory-consolidate/src/path_sanitize.rs) now also fixes the two component shapesPagePath::ensure_portablerefuses that character replacement doesn't cover:mainnotes/v2./roadmap.mdnotes/v2./roadmap.md(ends with a dot)notes/v2/roadmap.mdnotes/q3 plan /roadmap.mdnotes/q3 plan/roadmap.mddecisions/why? /xdecisions/why- /x.mddecisions/why-/x.mdconcepts/aux.mdaux)concepts/aux-.mdCON/notes.mdCON-/notes.mdTrailing dots/spaces are trimmed (a component made only of dots or spaces is left for
PagePath::newto reject, as before). A DOS device stem gets a-after the stem, usingai_memory_core::ids::is_dos_device_name, the same checkensure_portableapplies.Why
The helper's doc says it cleans a model path "so it survives
PagePath::newandensure_portable", becauseWiki::apply_batchis atomic: one path that failsensure_portableaborts every page in a bootstrap or consolidation batch (#847, #848), and auto-improve turns it into an unapplyable proposal. Replacing<>:"|?*\and control bytes left these two refusals reachable. Replacing?can itself create one:why?becomeswhy-, which ends with a space.Tests
New
slugify_page_path_output_passes_ensure_portableasserts the cleaned path and thatPagePath::new(..).ensure_portable()accepts it.assertion left == right failed: "notes/v2./roadmap.md".cargo test -p ai-memory-consolidate --lib509 passed;cargo fmt --checkandcargo clippy --all-targets -D warningsclean on the crate.CHANGELOG entry under Unreleased → Fixed.
AI assistance: this change was prepared with an AI coding assistant and reviewed and tested by me.