Skip to content

test(serve): align Windows schema tests with current contracts - #5

Open
Apoze wants to merge 1 commit into
natpate:masterfrom
Apoze:fix/windows-openai-schema-test-namespace
Open

test(serve): align Windows schema tests with current contracts#5
Apoze wants to merge 1 commit into
natpate:masterfrom
Apoze:fix/windows-openai-schema-test-namespace

Conversation

@Apoze

@Apoze Apoze commented Aug 26, 2026

Copy link
Copy Markdown

test(serve): align Windows schema tests with current contracts

Problem

ninfer_openai_schema_test no longer matched three contracts already implemented by the Windows
server branch:

  • MSVC requires the speculative backend enum to be qualified with its ninfer namespace;
  • conflicting enable_thinking=false and reasoning_effort=low is rejected by the request parser,
    before prompt semantics are resolved; and
  • /props exposes n_ctx directly under default_generation_settings, not under params.

The stale assertions caused a compile failure followed by a failing schema test even though the
server behavior was correct.

Design and affected behavior

Update only tests/test_openai_schema.cpp to assert the current parser and /props contracts and
to use the fully qualified enum. No serving, inference, model, sampling, CUDA, or public protocol
behavior changes.

Verification

Windows 11, MSVC 19.39 / Visual Studio Build Tools 2022, CUDA 13.1, RTX 5090:

cmake --build C:\src\ninfer-build -j --config Release --target ninfer_openai_schema_test

Result: target built successfully.

ctest --test-dir C:\src\ninfer-build -C Release -R "^ninfer_openai_schema_test$" --output-on-failure

Result: 1/1 passed.

git diff --check b686696eebd43b72f58239740ae002fad6afaf5e..7ec96c7e50988e3e053d959640b46ded32700944

Result: passed with no output.

The full suite was not rerun because this is a test-only correction in one translation unit and
does not change production code.

AI disclosure

The implementation was produced with OpenAI GPT-5.6 Sol (Codex, xhigh reasoning). I reviewed the
complete diff, verified each assertion against the current implementation, and ran the focused
Windows build and test above.

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