Skip to content

Native Windows: memory lookup and ranking fixes, native suites in CI - #793

Merged
screenleon merged 7 commits into
mainfrom
fix/windows-native-stability
Nov 12, 2026
Merged

screenleon merged 7 commits into
mainfrom
fix/windows-native-stability

Conversation

@screenleon

@screenleon screenleon commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes two product defects that only show on native Windows, makes three suites pass there, and adds CI that runs suites natively.

  • Memory directory not found. Claude Code on Windows names a project directory after the drive-letter path with every non-alphanumeric character turned into - (C--Users-Jo-Doe-repo). find_memory_dir (hook lookup, memory.sh) and the installer/migrator lookup (memory-dir.sh) only tried the POSIX spelling, so a repository on a native Windows host never found its memory. Both now also try the Windows name; other platforms are unchanged.
  • Memory ranking. A native sqlite3 ends rows with CR LF, which left a CR on last_access_day, read as 0, so every card ranked oldest. The reader strips it on native Windows only.
  • Tests. test-pmctl-memory, test-pmctl-pm and test-pmctl-ship-finish now pass natively (default /tmp and a clean scratch dir): fixtures use the spelling the product records, the scratch root is the physical path, and the ship-finish bash -c shells load the jq LF shim the product entry loads. Cases that need tab/backslash file names or real symlinks skip with a stated reason.
  • CI. New windows-native-suites job (windows-latest, one job per suite, 8 suites) beside windows-native-smoke.
  • Gate quota detection. A real gate that hit the Codex usage limit reported an unexplained "transport failure" and retried: a run through pmctl dispatch run has no adapter banner in the reviewer log, only run: <id> and a <id>.footer naming the executor's stderr/event files. The check now follows the footer (and still reads a banner in a directly dispatched log).
  • Docs (docs/platform-support.md) and CHANGELOG updated.

Verification

  • The last PR gate attempt on an earlier commit ended without a verdict because the Codex plan quota was used up (resets 2026-11-12 11:20); the reviewer is not switched. A GO on the final commit is still required before merge.

  • PR gate on the earlier commit eee228e, native Windows, default environment (no PM_DISPATCH_STATE_ROOT, no TMPDIR): GO; verify artifact_valid/subject_current/policy_applicable all pass. Earlier rounds on this branch found a real fixture defect under the default /tmp (fixed) and the sibling lookup in memory-dir.sh (fixed).

  • WSL2: test-pmctl-memory 138, test-pmctl-pm 32, test-pmctl-ship-finish 82, test-guards 329, test-doctor 97, test-pmctl-context 206 all pass; CI lints 19 passed, 0 failed, 2 skipped (the skipped ones need CI-only variables).

  • Not verified: a scratch directory on a non-C drive (this machine has only C:), and the new windows-native-suites job on a real runner until this PR's CI runs.

  • Native Windows stays experimental; promoting it needs this job to stay green first.

  • Permanent test admissions: one case added to the pre-existing test-pmctl-memory.sh (memory discovery: both helpers find the native Windows project directory name): criteria 1-6 met (it pins the observable result of both public lookups for the documented Windows project-directory name, with the physical path a hook passes; no source grep, no private helper); layer: library, observing the printed directory; it applies to native Windows only and skips elsewhere with a stated reason. The gate round that flagged its fixture (hard-coded drive letter, /tmp alias) was resolved by deriving both from the real path, not by adding cases. A second case was added to the pre-existing test-gate-protocol.sh (quota signature: found through the run footer next to a pmctl dispatch log): criteria 1-6 met (it pins the observable output of the public function for the layout measured on a real failed gate, including a negative control; no source grep); layer: library. The reviewer-quota test in test-pr-gate.sh was not extended.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ESW7P8BvZ5Crn6vi6EA2J7

screenleon and others added 7 commits November 11, 2026 18:18
…te rows without a CR; align Windows test fixtures

Claude Code on Windows names a project directory after the drive-letter path with every
non-alphanumeric character turned into '-' (C--Users-Jo-Doe-repo); the lookup only tried the
POSIX spelling, so memory was never found for a repository on a native Windows host. A native
sqlite3 ends rows with CR LF, which left a CR on last_access_day and ranked every card as
oldest. Test fixtures now use the spelling the product records.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESW7P8BvZ5Crn6vi6EA2J7
…angelog

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESW7P8BvZ5Crn6vi6EA2J7
…native-Windows project name

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESW7P8BvZ5Crn6vi6EA2J7
…ult /tmp on native Windows)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESW7P8BvZ5Crn6vi6EA2J7
…ite-parity uses the physical scratch path

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESW7P8BvZ5Crn6vi6EA2J7
A gate run through pmctl dispatch run has no adapter banner in the reviewer log; the executor's
own output is in the files the run's <run-id>.footer names. On a real run that hit the Codex usage
limit the failure was reported as an unexplained transport failure and retried once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESW7P8BvZ5Crn6vi6EA2J7
@screenleon
screenleon merged commit 9ad693d into main Nov 12, 2026
97 checks passed
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