Skip to content

feat: add stable profile registry and scoped startup reporting - #1944

Merged
ashhart merged 2 commits into
ashhart:mainfrom
garvrao80:feat/stable-profile
Nov 2, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
garvrao80:feat/stable-profile

Conversation

@garvrao80

@garvrao80 garvrao80 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1660: the first registry/lookup/reporting increment. This leaves the RFC open for the remaining switch groups and qualified fast profiles.

serve --profile stable now explicitly selects today's defaults. Omitting it produces the same parsed arguments and engine-open options. Explicit environment values win unchanged, including empty strings, zero and malformed values; the existing family parsers, errors and defaults remain authoritative. fast-exact and fast fail as unsupported choices before checkpoint loading.

  • Add one shared core registry for seven CUDA KV switches, with family/backend scope, class, effect, evidence reference and a null stable fallback. Route the existing Qwen3.5, GLM, core-KV and Flash Next readers through its environment-first helper.
  • Report the selected profile and applicable registered nondefault overrides at startup. Values are bounded and control bytes escaped. Other families, unrelated settings and secrets are not enumerated; registered overrides: none describes this registry's coverage.
  • Expose the same table in capabilities --json, document the initial scope and keep debug/experimental switches out of any automatic opt-in.

No arithmetic, device storage, scheduling, checkpoint assets or optimization defaults change. This does not claim to migrate every TF_* / TENSORFOLD_* variable or qualify a fast profile.

Validation used pinned Zig 0.17.0 on Windows x86-64 and Ubuntu/WSL x86-64, based on main 2f339ab96:

  • Linux: zig build test test-kernel-contract test-golden test-server-security test-pull-security fuzz-cortheon -j4 --test-timeout 10m --summary all exited 0: 514/514 steps; 6,432 passed, 45 skipped. All 55 server goldens matched.
  • Windows: zig build test test-kernel-contract test-golden fuzz-cortheon -j4 --test-timeout 10m --summary all recorded 5,190 passed, 109 skipped, with all 55 goldens matching. Its only four failed steps could not find sh; adding Git Bash to PATH and rerunning zig build test-check-release-paths passed 14/14 steps. No source or test expectations changed for the retry.
  • Plain zig build -j4 --summary all passed on both platforms: 31/31 Linux and 27/27 Windows steps.
  • zig build server-cpu -Doptimize=debug and the process checks below passed on both platforms.

Additional process checks ran the live lookup tests with 12 environments across all seven switches (unset, empty, zero, 00, +0, enabled and malformed values). Five invalid profile invocations exited 2 before model loading and created no files. The real CPU fixture server produced identical completion choices/usage with and without --profile stable; startup omitted an unrelated Qwen override and a fixture secret. The committed tests cover registry consistency, pointer/raw-value preservation, CLI/API option equality, JSON metadata and bounded scoped reporting.

Formatting and git diff --check pass; lean reports 439 inherited findings and zero new findings.

No Mac, GPU or real checkpoint was available locally. Host/fixture results establish this stable foundation's configuration and reporting behavior; they do not substitute for #1660's later solo/concurrent/resume token gates or arithmetic-quality gates.

@ashhart

ashhart commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Thanks @garvrao80, reviewed: this lands once its CI is green. profile.get is getenv with a null fallback for stable, and the comptime check forbids stable defaults. So each reader gets exactly the bytes it read before, including empty, zero and malformed values, and the families' own parsers still decide. fast-exact and fast refuse before loading. It follows the first table of #1660 (@jschmied's RFC), which stays open for the rest. We'll add the changelog line.

@garvrao80
garvrao80 marked this pull request as ready for review November 2, 2026 15:03
@ashhart
ashhart force-pushed the feat/stable-profile branch from 0edec2f to bbe5fd6 Compare November 2, 2026 18:00
@ashhart
ashhart merged commit 16d95cc into ashhart:main Nov 2, 2026
10 of 11 checks passed
@ashhart

ashhart commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Thank you @garvrao80. 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 3, 2026

Copy link
Copy Markdown
Owner

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.

2 participants