Repository navigation
environment: refuse malformed settings by name at startup, and report the profile groups (#2370) - #2405
Merged
Conversation
Owner
Author
|
Two changes after a second read, on
The landing gate's host checks pass on the new head. |
This was referenced Nov 7, 2026
Main's readers fell back to their defaults on empty text; the strict parser refused it for every rule but three. Blank values now return null for every rule, so only malformed text is refused. The per-rule empty_default flag is gone with it.
ashhart
force-pushed
the
lead/env-refusals
branch
from
November 7, 2026 07:59
e5c1b50 to
9caadba
Compare
ashhart
added a commit
that referenced
this pull request
Nov 8, 2026
#2405 routed every malformed TF_PROMPT_ROWS through the environment table's generic refusal, so a count under 128 lost the floor's explanation and test-qwen27-prompt-floor-host (not in CI) failed on main. A whole count below the floor is admitted through the floor's message; any other bad text keeps the table's.
ashhart
added a commit
that referenced
this pull request
Nov 8, 2026
…s message 6a1feb2 (#2405) wrote two expectations here that main has since changed on purpose: - 19e9062 (environment: empty or whitespace-only values mean unset again) made blank text unset for every setting. "" now reaches the loader, and expecting InvalidEnvironment for it stopped the malformed-value loop at its first value. "" leaves that loop, and a new test pins "", " " and "\t\n" as unset: the loader is called and why is untouched. - 199a02c (#2527) gave a whole count below 128 the prompt floor's own message again. The below-floor test expected the generic table message, so it failed as soon as #2527 landed. It now expects the floor's text, origin and remedy, as test-qwen27-prompt-floor-host does. test-qwen27-prompt-rows-host: 14 of 14.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2370.
A malformed setting in the environment used to be read leniently, or ignored, deep inside an engine. This makes the native server refuse it by name at startup, before any checkpoint or driver work.
What changes
platform/environment.zig,server/main.zig,server/engines.zig): a malformed value stops the server with the variable's name, the text it was given (escaped), and the forms it accepts. Flags keep their precedence. Valid values, whitespace, caps, clamping and a disabled feature's precedence behave as before, and an empty or whitespace-only value still means unset, as on main. The documented lenient forms stay lenient: graph-cache0/off, slot-resume0, the page switches, and the presence-based slide modes.native/cuda_device.zig,native/qwen4_cuda.zig,cli/cuda_main.zig). HIP's named budget refusals now include the bad text (hip/admission.zig).core/profile.zig): six setting groups get their classes and stable fallbacks, so--profileand the startup line report them. Kolibri reports an exact0as disabling, Dory reports every present non-zero value, and Gemma uses its real tensor-stack names.native/disk_identity.zig): a kept state's identity now records explicit prompt widths and Dory's exact-zero setting, and hashes the slide group's real member values in their scopes. Identities hash each applicable setting's value even when it's unset, so this re-keys every kept disk state of Qwen 3.5 and Qwen3.8-27B on Metal, and of Nemotron and Qwen 3.5 on CUDA, whatever the settings: each is prefilled once after upgrading, with the same reply, and saved again under the new identity.capabilities --jsonstops listing two environment names the native binary doesn't read (TENSORFOLD_NO_UPDATE_CHECK,HF_HUB_OFFLINE).docs/environment.mdlists every validated variable, its accepted forms and its refusal; the developer selectors and policies left as they are are listed there too.No DeepSeek, Flash Next, lane-host or kernel implementation file changes.
Tests
Host only. The strict-parser refusals and every valid, unset, empty and whitespace-only fixture; registry and startup and JSON reporting; Qwen's native prompt widths; the CUDA runtime and host suite; HIP's named refusals; the native CUDA and server cross-compiles for both Linux targets; disk-identity regressions for the new members. The Metal server refuses all 15 malformed-setting cases before resolving a model, and starts as before with valid or unset values. Lean has no new findings and every changed Zig file is at most 600 lines. The landing gate's host checks pass on today's main.
No model or GPU run: this changes how settings are parsed and reported, not what an engine computes.