Skip to content

fix(ci): correct platform assertions and isolate wiki CLI tests - #1863

Merged
phernandez merged 2 commits into
mainfrom
fix/main-ci-platform-tests
Oct 25, 2026
Merged

phernandez merged 2 commits into
mainfrom
fix/main-ci-platform-tests

Conversation

@phernandez

@phernandez phernandez commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Why

Main's Tests run 40122094669 failed six tests across four Windows SQLite jobs and one Postgres job. The failures came from path separator assertions, newline translation in a checksum fixture, blank directory routing on Windows, and shared Postgres state in the wiki CLI test.

What Changed

  • Compare project-conflict messages with normalized path separators, retaining exact message and directory checks.
  • Write the restored-note fixture as exact UTF-8 bytes so its file checksum matches the accepted content on Windows.
  • Strip directory-delete whitespace before project routing, matching the API's existing normalization and letting the project-root guard refuse / consistently. Add a tab-padded root regression case.
  • Add a focused Windows job for these five test files on branch pushes; the full Windows suites currently run only on main.
  • Reset the wiki CLI test's database through the existing engine fixture, then close that fixture engine before invoking the CLI so both rebuild and status use the persistent database.

Implementation Details

The wiki test previously bypassed the fixture that resets the shared Postgres schema. Simply adding the fixture would give SQLite's first CLI invocation an in-memory database that disappears during CLI cleanup. Closing the fixture engine first preserves the normal persistent CLI lifecycle on both backends.

Testing

  • uv run pytest tests/cli/test_wiki_command.py tests/indexing/test_note_content_promotion_guard.py tests/mcp/test_tool_bm_delete.py tests/mcp/test_tool_project_management.py test-int/mcp/test_project_management_integration.py tests/mcp/test_note_targets.py -q -o addopts= — 129 passed.
  • BASIC_MEMORY_TEST_POSTGRES=1 uv run pytest tests/mcp/test_tool_project_management.py::test_create_memory_project_refuses_same_name_different_path tests/cli/test_wiki_command.py tests/indexing/test_note_content_promotion_guard.py tests/mcp/test_tool_bm_delete.py -q -o addopts= — 41 passed.
  • Rechecked the final wiki database lifecycle against Postgres with BASIC_MEMORY_TEST_POSTGRES=1 uv run pytest tests/mcp/test_tool_project_management.py::test_create_memory_project_refuses_same_name_different_path tests/cli/test_wiki_command.py -q -o addopts= — 9 passed, including a preceding database-backed test to exercise isolation.
  • just fast-check — passed (ruff lint, format, full typecheck).
  • just doctor — passed sandboxed write/index/search.
  • git diff --check — passed.

Risks / Follow-ups

Windows execution is covered by the new focused CI job; local verification used macOS with SQLite and Docker Postgres. The only production change applies the existing directory-delete whitespace normalization before routing. Contributor fixes are separate PRs.

Signed-off-by: phernandez <paul@basicmachines.co>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T14:49:21.277742Z 9ec2286 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez
phernandez merged commit bdb91c6 into main Oct 25, 2026
44 checks passed
@phernandez
phernandez deleted the fix/main-ci-platform-tests branch October 25, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant