fix(wiki): use as_posix() for Seeded path display (#643 follow-up)#719
Merged
fix(wiki): use as_posix() for Seeded path display (#643 follow-up)#719
Conversation
`mm wiki {skill,agent,command} override` printed two adjacent path lines
on Windows with mixed separators on the same screen:
Seeded skills\hello\overrides\codex.md # Path f-string → \
# next: cd C:\... && git add skills/hello/overrides/codex.md && git commit
^^^^ hardcoded /
The `git add` hint hardcodes `/` (and git accepts both on Windows), so
the inconsistency was purely cosmetic — but visually confusing for a
user who is about to copy the seed path. Calling `rel.as_posix()` on
the `Seeded` line aligns the two outputs.
Follow-up to PR #718 (#643): test assertions there already normalize
`result.output.replace("\\", "/")` so the substring checks remain
correct on both platforms — `replace` becomes a no-op on Windows now
that production emits `/` natively, no test churn needed.
Out-of-scope: `click.echo(str(result.path))` (line 72, the bare
absolute path on its own line for shell capture) intentionally stays
platform-native — that line exists for shell-pipeline consumers and
should match what the OS expects (Windows shells / CMD / PowerShell
prefer backslashes for absolute paths). Same trade-off as
`click.edit(filename=str(result.path))` on line 87.
Co-Authored-By: Claude <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
mm wiki {skill,agent,command} overrideprinted two adjacent path lines with mixed separators on Windows:git addhint hardcodes/(line 75); theSeededline interpolated aPathobject so it picked up\fromos.sepon Windows. Both lines describe the same logical path on the same screen — the inconsistency was purely visual but confusing.f"Seeded {rel.as_posix()}".What's NOT changed
click.echo(str(result.path))(line 72) andclick.edit(filename=str(result.path))(line 87) intentionally stay platform-native. Those lines hand the absolute path to shell-pipeline consumers and to$EDITORrespectively — Windows shells / CMD / PowerShell / notepad.exe prefer backslashes for absolute paths. Same trade-off PR #711 documented fornorm_path().Test plan
uv run pytest packages/memtomem/tests/test_wiki_cmd_override.py— 32/32 pass.ruff check+ruff format --checkclean.result.output.replace("\\", "/"), so they remain correct here —replacebecomes a no-op on Windows now that production emits/natively.🤖 Generated with Claude Code