Skip to content

Fix rotating-prefill tests to use public cache state - #38

Merged
ronaldmannak merged 1 commit into
claude/mlx-vlm-nativ-picocore-wgky0ffrom
codex/rotating-cache-test-access
Sep 12, 2026
Merged

ronaldmannak merged 1 commit into
claude/mlx-vlm-nativ-picocore-wgky0ffrom
codex/rotating-cache-test-access

Conversation

@ronaldmannak

Copy link
Copy Markdown
Owner

Closes #36.

The two rotating-prefill regressions in the integration branch cannot compile because they read private RotatingKVCache.keys and .values. This repair reads the same arrays through the existing public state accessor so the regressions can run.

What changed

  • Replace twelve private-property references with state.first / state.last.
  • Preserve every expected K/V value, row offset, and continued-decoding assertion.
  • Apply the repository's pinned formatter to those two tests.

Evidence

On macOS, with the fork's existing MLX 0.31.6 dependency:

xcodebuild test -scheme mlx-swift-lm-Package -destination 'platform=macOS,arch=arm64' -skipPackagePluginValidation -skipMacroValidation -derivedDataPath /private/tmp/mlxlm-phase2-derived -only-testing:MLXLMTests/BatchRotatingKVCacheCoverageTests
Test run with 9 tests in 1 suite passed after 0.072 seconds.
** TEST SUCCEEDED **

pre-commit run --all-files
swift-format.............................................................Passed

The baseline failed to compile at the twelve private-property references. The full -only-testing:MLXLMTests run now compiles and executes: all 757 Swift Testing tests passed; the XCTest portion ran 549 tests, with one existing skip and one failure in unchanged TurboQuantIntegrationTests.testRawKeyModeBFloat16MatchesReference (cosine 0.9440668, required > 0.97). The overall full-suite result is TEST FAILED, not green. No assertion was changed to accommodate that result. DocC and iOS were not run for this test-only repair.

Test changes

Only the access path and indentation of two existing tests change. Their expected arrays, offsets, and lifecycle checks remain identical.

Scope

This targets claude/mlx-vlm-nativ-picocore-wgky0f (the integration branch currently proposed by #32). It adds no public API and does not fix the separate window-boundary masking issue tracked by #35. The full-suite TurboQuant failure needs separate investigation.

AI assistance: Codex prepared this change and validation report.

@chatgpt-codex-connector

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-09-10T22:13:32.885987Z 39cf01c PR opened
ℹ️ 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.

@ronaldmannak
ronaldmannak merged commit 39cf01c into claude/mlx-vlm-nativ-picocore-wgky0f Sep 12, 2026
5 checks passed
ronaldmannak pushed a commit that referenced this pull request Sep 12, 2026
Brings the fork mirror's 19 upstream commits (2026-08-31 to 2026-09-11)
onto the batched-cache layer plus the VLM stack (#38
to #48, absorbed by fast-forward). The dry-run merge was conflict-free;
both sides touched KVCache.swift and Evaluate.swift in disjoint hunks.

Upstream changes that sit under the batching work: ml-explore#584 (RotatingKVCache:
wrap-aware trim) and ml-explore#611 (generation loop no longer blocks cooperative
workers). The batch and wrapped-cache tests must be re-run on Apple
silicon; the fork's CI skips every job.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RT2yoDKAz695YTHR6hDuoC
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