Repository navigation
fix(wiki): POSIX wiki paths and byte-exact decision fixtures on Windows (#692, class 8) - #896
Conversation
…ws (#692, class 8) wiki_bulk_migrate.plan and wiki_rebucket_file_docs.plan took str() of the page's relative path, which uses "\" on Windows. The detectors split on "/" and the stub's redirect_to stored the backslash form (Windows run 38008915302: 'adr\_general\2234-zero-dependencies.md'). Both now use as_posix(). test_migrate_decision_blocks wrote its fixture with write_text, which translates "\n" to "\r\n" on Windows, while apply_selected hashes the file's bytes: the block id taken from the LF source named no block ("selection must identify exactly one unchanged candidate", 9 tests). The fixture is now written byte for byte; the product already handles CRLF sources (test_crlf_source_keeps_line_endings_and_content_address). Refs #692 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018kyZYs9LU5DzBCETpKyqtH
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @cdeust's task in 1m 43s —— View job PR #896 review (1/3)
The review is in this comment. It has no Blockers and three Notes, none of which needs action before merge:
Verdict: approve |
Review 1/3: PR #896I ran five reviews: code quality, performance, test coverage, documentation accuracy and security. I checked every finding myself against Blockers: none. In both scripts, every downstream use of Notes, no action before merge
Verdict: approve |
Summary
Class 8 of #692 (23 Windows failures listed as "suspected CRLF"). The Windows log of run 38008915302 (job 114084097957) shows two separate root causes:
test_wiki_bulk_migrate5 +test_wiki_rebucket_file_docs9): a product defect.plan()in both scripts recordedstr(md.relative_to(wiki_root)), which uses\on Windows. The detectors split on/, sotimestamp-slugand the file-doc notes were not seen, and the stub'sredirect_tostoredadr\_general\2234-zero-dependencies.md. Both now userel.as_posix().test_migrate_decision_blocks): a test defect. Theapplyhelper wrote the fixture withwrite_text, which turns\ninto\r\non Windows, whileapply_selectedhashes the file's bytes. The block id taken from the LF source then named no block:selection must identify exactly one unchanged candidate. The fixture is now written byte for byte. The product already handles CRLF sources (test_crlf_source_keeps_line_endings_and_content_address).Refs #692 (one class out of several; it does not close the issue).
Type of change
Test plan
pytest tests_py/scripts/test_migrate_decision_blocks.py tests_py/scripts/test_wiki_bulk_migrate.py tests_py/scripts/test_wiki_rebucket_file_docs.py: 55 passed (Linux, Python 3.11).pytest tests_py/scripts: 1804 passed, 15 skipped.Path.write_textforced tonewline="\r\n". Onmain,test_migrate_decision_blocksfails 9 tests, the same 9 ids as the Windows run. On this branch: 14 passed.Path.relative_toreturns aPureWindowsPath. Onmain, 15 failures: the 14 ids of the Windows run, plustest_apply_is_idempotent. On this branch: 41 passed.ruff check/ruff format --checkon the changed files: OK.python scripts/check_craftsmanship.py: OK.mcp_server. These two scripts are outside it.Audit notes
str(relative_to(...))pattern spotted elsewhere, outside class 8 and not fixed here:scripts/wiki_pilot_migration.py:454,mcp_server/infrastructure/wiki_decision_mirror.py:50-53,mcp_server/handlers/wiki_purge.py:284,mcp_server/handlers/consolidation/page_io.py:204,mcp_server/handlers/codebase_analyze.py:463. Whether each one is a defect has not been diagnosed.Coding-standards compliance
Breaking changes
None. On Linux/macOS,
as_posix()gives the same thing asstr().Reviewer checklist
Generated by Claude Code