Skip to content

native tests: the Qwen27 lanes' facts read a dense model's config (test-native crash) - #2122

Merged
ashhart merged 2 commits into
ashhart:mainfrom
BobClawblaw:qwen27-facts-test
Nov 4, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
BobClawblaw:qwen27-facts-test

Conversation

@BobClawblaw

Copy link
Copy Markdown
Contributor

What this changes

Three tests in zig/src/native/draft_sources_metal_test.zig call the Metal Qwen27 lanes' facts() with the runner left undefined. Since #1125, facts() reads runner.model.config.moe(), so the first of them crashed zig build test-native with SIGSEGV on main. Each test now points the runner at a model with a dense config (experts = 0). The first also checks that plain_guard is off for that config and on once the config has routed experts. Only the tests change; the engine does not.

Checks on this head

  • Head commit: a103069ac
  • zig build test-native: passes on M5 Ultra, macOS, Zig 0.17.0. On main b331731e6 it crashes in this test with SIGSEGV. With facts() mutated to ignore the config (routed = false), the test fails on the plain_guard check.
  • zig fmt --check, lean (lean_new.py): pass; lean is 425 on the base and 425 on this head, 0 new
  • Not run, and why: the rest of the CI set locally (zig build test, golden, the contract); the change is one test file that only test-native builds, and CI runs the rest.

Receipt

n/a: tests only, no served path changes.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (The crash is the failure before; the plain_guard check fails if facts() stops reading the config.)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. Pointing the runner at a dense config fixes the crash, and checking plain_guard both ways makes the test catch facts() ignoring the config. Ready to land.

ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 4, 2026
@ashhart
ashhart merged commit 6696fc2 into ashhart:main Nov 4, 2026
1 of 7 checks passed
@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thank you @BobClawblaw. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

@ashhart

ashhart commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw! This is in TensorFold 1.2.3, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.3

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.

test-native crashes in the Metal Qwen27 lanes' draft-sources tests

2 participants