Skip to content

server: --profile fast refuses as not planned (#1660) - #2794

Merged
ashhart merged 6 commits into
ashhart:mainfrom
devopsfortunato:profiles-fast-not-planned
Nov 12, 2026
Merged

ashhart merged 6 commits into
ashhart:mainfrom
devopsfortunato:profiles-fast-not-planned

Conversation

@devopsfortunato

@devopsfortunato devopsfortunato commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

--profile fast now refuses as not planned instead of waiting beside fast-exact for a gate it will never pass: a speed mode that changes output tokens is not shipped, even opt-in, so the arithmetic class has no profile to join. fast-exact keeps its own refusal and says what it still needs. An unknown spelling gets its own sentence naming the three profiles, so it cannot be mistaken for either refusal.

Before: argument --profile: only stable is served; fast-exact and fast need qualification
Now:

  • argument --profile: fast is not planned: a speed mode that changes output tokens is not shipped, so the arithmetic class has no profile to join
  • argument --profile: fast-exact is not yet qualified: solo, concurrent 1/2/4/8 and resumed runs equal to stable, and a measurement where no served cell for its family gets slower
  • argument --profile: unknown profile 'banana': expected stable, fast-exact or fast

Two supporting details: --profile now bypasses the usage table's generic invalid choice line so its own sentences are what a user sees, and zig/src/core/profile.zig's TF_FLASHNEXT_KV_PAGES row no longer says "fast-profile qualification pending" — the capabilities output must not advertise either unserved profile, which the existing test at cli_test.zig:52 enforces.

Docs: docs/profiles.md stops pairing the two profiles and its "Further profile work" note says fast is not planned while fast-exact keeps the token gates plus the no-slower measurement; docs/optimization-ledger.md entry 27 matches.

No behavior change to stable: its parse path, supported arguments and capabilities output are unchanged.

Checks

Reviewed twice, and both rounds' findings are in: the fast-exact line says it needs its gates rather than reading as if they pass, the unknown-profile line says stable is the only served profile instead of advertising two values that are never accepted, the registry row says no profile qualifies it yet, and both spellings of all three values are covered by the test.

  • zig build test-server-cpu --summary all: Build Summary: 5/5 steps succeeded; 1283/1288 tests passed (5 skipped), 0 failed. The new test is stable profile: fast is not planned, fast-exact is not yet qualified and an unknown spelling names all three, which asserts each exact sentence.
  • Control: with the old single sentence restored, that test fails; with the leaky registry wording (fast-exact qualification pending) restored, cli_test.zig:52 fails because the capabilities JSON must not carry the name. Both reverted.
  • zig fmt --check build.zig zig and git diff --check clean; every added comment is one line.

Checklist

devopsfortunato added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 10, 2026
devopsfortunato added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 10, 2026
…names the served profile (ashhart#2794)

fast-exact's line now says it needs the gates rather than reading as if they pass, the unknown-profile sentence stops advertising two values that are never accepted, the registry row says no profile qualifies it yet, and both spellings of all three values are covered.
@devopsfortunato

Copy link
Copy Markdown
Contributor Author

Round 2 on the refusals, so the sentences say only what you decided:

  • fast-exact: "argument --profile: fast-exact is not yet qualified: it needs solo, concurrent 1/2/4/8 and resumed runs equal to stable, and a measurement where no served cell for its family gets slower" — the verb matters, since without it the list read as if those runs already pass.
  • unknown: "argument --profile: unknown profile 'banana': stable is the only served profile" — the old wording advertised two values that are never accepted.
  • The test now covers both spellings of all three values (--profile fast and --profile=fast), each asserting the exact sentence, and its title and the CHANGELOG clause no longer say the unknown message "names all three".
  • zig/src/core/profile.zig's row says "no profile qualifies it yet", which still keeps fast-exact out of the capabilities JSON — the pre-existing test at cli_test.zig:52 requires that name to be absent there.

One thing a reviewer asked about that is worth answering on the record: the --profile row keeps .choices = &."stable"\}, and the change bypasses the choices gate in the parse loop only for that one flag, so capabilities is unchanged — cli_capabilities.zig:44 still emits "--profile": {"values": ["stable"]} because it reads f.native_values orelse f.choices. The three sentences are reachable, which the exact-string assertions prove: they fail if the gate intercepts first.

Checks: zig build test-server-cpu --summary all → 5/5 steps succeeded (1283/1288 tests, 5 skipped, 0 failed); zig fmt --check and git diff --check clean. The docs' "Further profile work" section already says fast is not planned, and the older #1944 CHANGELOG line that says both were "refused until qualified" sits under the released ## 1.2.2 heading, so it is history rather than a contradiction.

devopsfortunato added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 10, 2026
devopsfortunato added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 10, 2026
…names the served profile (ashhart#2794)

fast-exact's line now says it needs the gates rather than reading as if they pass, the unknown-profile sentence stops advertising two values that are never accepted, the registry row says no profile qualifies it yet, and both spellings of all three values are covered.
@devopsfortunato
devopsfortunato force-pushed the profiles-fast-not-planned branch from 0ea827f to 645cf9d Compare November 10, 2026 20:12
@ashhart

ashhart commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Thanks @devopsfortunato, this is what we asked for on #1660. --profile fast now refuses as not planned
(zig/src/server/cli.zig:435), fast-exact names its gates (cli.zig:434), and the docs say the same thing
(docs/profiles.md:9-10 and :243-246, ledger entry 27). The check at cli.zig:307 skips only --profile, stable
still parses, and capabilities still lists "--profile": {"values": ["stable"]}. We ran zig build test-server-cpu
on 645cf9d: no failures, and your new test fails when the cli.zig:307 change is undone. Thanks for the rebase too.

One thing blocks landing. zig/src/server/cli_test.zig is now 620 lines, over our 600-line limit, so the lean check in
the zig job fails (zig/src/server/cli_test.zig: over 600 lines (1 new)), and
python3 tools/pr_check.py --base origin/main --pr 2794 reports the same. Could you move the three stable profile:
tests (cli_test.zig:19-117) into a new zig/src/server/cli_profile_test.zig and import it in
zig/src/server/root.zig next to cli_test.zig (line 69)?

While you're there, one CHANGELOG fix: "fast-exact still says what it needs" should say "now says". On main the
table's choices check answers first, so --profile fast-exact prints argument --profile: invalid choice: 'fast-exact'
and never reaches the old sentence. Optional: in the fast-exact sentence, "for its family" might read better as "for
that switch's family", since the profile has no family of its own.

Once CI is green it goes on the landing queue. Main freezes tomorrow morning for 1.2.7: if it gets through the queue
before then it's in that release, otherwise it lands right after.

  • Synthena (Ash's Agent)

devopsfortunato added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 10, 2026
…stays under the line cap (ashhart#2794)

Same test verbatim: three values, both spellings, exact sentences. cli_test.zig is back to 600 lines and lean reports 0 new.
@ashhart

ashhart commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Thanks @devopsfortunato. The refusal test now lives in zig/src/server/cli_profile_test.zig, imported at root.zig:70, and cli_test.zig is back to 600 lines, so the lean check is clear. We'll take the CHANGELOG wording ("now says") and the ledger merge with entry 28 on our side when it lands, so nothing more is needed from you. Once CI is green on this head it goes on the landing queue.

  • Synthena (Ash's Agent)

@ashhart
ashhart force-pushed the profiles-fast-not-planned branch from cd60945 to d54f031 Compare November 11, 2026 00:16
ashhart pushed a commit to devopsfortunato/TensorFold that referenced this pull request Nov 11, 2026
ashhart pushed a commit to devopsfortunato/TensorFold that referenced this pull request Nov 11, 2026
…names the served profile (ashhart#2794)

fast-exact's line now says it needs the gates rather than reading as if they pass, the unknown-profile sentence stops advertising two values that are never accepted, the registry row says no profile qualifies it yet, and both spellings of all three values are covered.
ashhart pushed a commit to devopsfortunato/TensorFold that referenced this pull request Nov 11, 2026
…stays under the line cap (ashhart#2794)

Same test verbatim: three values, both spellings, exact sentences. cli_test.zig is back to 600 lines and lean reports 0 new.
@ashhart

ashhart commented Nov 11, 2026

Copy link
Copy Markdown
Owner

We rebased this onto today's main to settle the one conflict, in docs/optimization-ledger.md: your rewording of entry 27 is kept, and main's new entry 28 follows it. Your four commits are otherwise unchanged and still yours. It joins the landing queue once CI finishes on the new head.

  • Synthena (Ash's Agent)

devopsfortunato and others added 6 commits November 12, 2026 00:50
…qualified (ashhart#1660)

A speed mode that changes output tokens is not shipped, so fast says so instead of waiting beside fast-exact for a gate it will never pass. The unknown spelling gets its own sentence naming the three profiles, and the registry and docs stop implying that either unserved profile is coming.
…names the served profile (ashhart#2794)

fast-exact's line now says it needs the gates rather than reading as if they pass, the unknown-profile sentence stops advertising two values that are never accepted, the registry row says no profile qualifies it yet, and both spellings of all three values are covered.
…stays under the line cap (ashhart#2794)

Same test verbatim: three values, both spellings, exact sentences. cli_test.zig is back to 600 lines and lean reports 0 new.
@ashhart
ashhart force-pushed the profiles-fast-not-planned branch from d54f031 to c36b301 Compare November 12, 2026 00:50
@ashhart
ashhart merged commit 4f8317d into ashhart:main Nov 12, 2026
5 of 9 checks passed
ashhart pushed a commit that referenced this pull request Nov 12, 2026
ashhart pushed a commit that referenced this pull request Nov 12, 2026
…names the served profile (#2794)

fast-exact's line now says it needs the gates rather than reading as if they pass, the unknown-profile sentence stops advertising two values that are never accepted, the registry row says no profile qualifies it yet, and both spellings of all three values are covered.
ashhart pushed a commit that referenced this pull request Nov 12, 2026
…stays under the line cap (#2794)

Same test verbatim: three values, both spellings, exact sentences. cli_test.zig is back to 600 lines and lean reports 0 new.
@ashhart

ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Thank you @devopsfortunato. 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 13, 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