mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1919] Small defects in setup, serve, the engine and the build, still present on v0.1.42 #759
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#759
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gputier on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1919
A read of v0.1.42 turned up the defects below. Each one was checked against the source, and the file:line references are v0.1.42 line numbers. None of them changes the normal output on a supported PC, and none is a calculation error. Items marked "read only" follow from the code, but I did not reproduce them on a GPU.
setup.py:1703 (also whole_shard at setup.py:1547), with tools/gguf_reader.py:66-72: expected_bytes() returns None when the tensor type is missing from BLOCK_GEOMETRY, or when the element count is not a block multiple. Both callers fall back to
or 0. So a truncated shard whose last tensor has such a type passes check_shards as whole, and the engine fails later. Setup should stop and name the short shard. (read only)tools/gguf_reader.py:117 (GGUF_META[t]), tools/gguf_reader.py:112-113 and :128: an unknown metadata value type raises KeyError, and a 64-bit string length makes fh.read() raise OverflowError. setup.py:1701 catches only (ValueError, struct.error), so setup prints a Python traceback instead of a message. Reproduced on a synthetic header: value type 99 gives "KeyError: 99", and a string length of 2**63 gives "OverflowError". Expected: "is not a whole GGUF shard" for every malformed header.
setup.py:3859-3864 (write_config), with the api_key written at setup.py:5727-5728: the run config holds the API key and is written with the default umask. The write path has no chmod 0600. Expected: mode 0600 on POSIX. (read only)
setup.py:3829 and setup.py:3847-3848 (data_folder): a folder whose data has already left is skipped (
not has_data(folder)) before repoint_config runs on its configs. Its strata-*.json files keep the old model paths. Expected: the configs of every install that points into the moved folder get repointed. (read only)setup.py:3756-3775 (move_into): there is no symlink check. For a symlink to a directory, src.is_dir() is true and iterdir() follows the link. The target's files are moved out and the link stays in place. Expected: a symlinked folder is left alone, neither merged nor emptied. (read only)
setup.py:3668-3671 (the low-RAM confirm_risk text): "A smaller size (Q2_0 or IQ2_XS) fits" and "choose Q2_0 or IQ2_XS" are printed for every family. But Q2_0 is offered only for family qwen (MODELS, setup.py:204). With --family swift, the advice names a model that setup does not offer for that family. Expected: the suggestion lists only the models of the chosen family.
tools/iq_pack.py:575 now writes native_experts.txt through a temporary file. setup.py:5531, however, treats the file's existence alone as "pack finished". A native_experts.txt left by a run before #172 is still accepted, so the pack is not rebuilt. Expected: the completeness check reads the content (or a size or hash) before skipping the build. (read only)
serve/server.py:843-844 (death_note): when no watchdog line is found, the cause is taken from the last log line starting with "strata" or "ERR". A progress line such as "strata trace: read N tokens" (src/program/generate.cpp:10776) can therefore be quoted as the cause of the exit. Expected: only an exit or error line is quoted. (read only)
docs/DETAILS.md:652-662: the endpoints table has no row for /settings. The route appears only in prose, at lines 871 and 891. Expected: a table row for GET and POST /settings, with the same API-key rule as the prose.
.gitignore:22: the comment "# Pi harness metadata (local session state, not project source)" is not followed by any pattern that matches Pi harness metadata. The patterns below it (*.sqlite, *.npz) do not match it. Expected: remove the comment, or move it above the patterns it describes.
src/program/generate.cpp:10787 and :10794 (prompt read failure in serve): cudaPeekAtLastError() reads the last CUDA error without clearing it. So an error that was already handled and is not sticky makes the engine call std::_Exit(1) instead of returning 1 (line 10787). When stop_req is set, a fault raised at the same time is reported as a cancellation (cancelled = true, line 10794) without checking the error. Expected: a sticky check with cudaGetLastError(), and the error checked in the stop branch too. (read only)
src/program/generate.cpp:7420-7424 with src/core/verify.cpp:495-501: serve with no expert cache (d_res == nullptr) fails in Verifier::init ("verify: needs the profile-filled VRAM expert tier ..."), and serve returns 1, so no server starts. The message suggests a smaller --max-context, --kv q4_0, --draft-vocab en, or images on the CPU. None of these lets the server start without a cache. Expected: either a serve path that works without the cache, or a refusal that names a setting that does work. (read only)
src/program/generate.cpp:12096-12108 (generate mode): with no residency table, the prompt path does not lend cache slots and keeps the automatic chunk, prefill_auto_max, which defaults to 8192 (generate.cpp:527). The fallback to 1024 for a card with no cache (generate.cpp:7035-7036, "#85") exists only in the serve path. Expected: the same 1024 fallback in generate mode. (read only)
src/core/device.cu:247 and :309 (device_info): the compute capability refusal (kMinCc = 75) runs only inside device_info(). Its only caller in the tree is src/core/device_main.cpp:66 (strata-device). The engine does not call device_info(), so in the engine a card below 7.5 is not refused by this check. Expected: the same refusal in the engine start path, or a comment saying the check is diagnostic only.
CMakeLists.txt:164:
continue()for the values native, all and all-major skips the rest of the loop body. So the warning for sm_120 with CUDA below 13.0 (CMakeLists.txt:183-185) is never printed for those values. Read only: the warning was not seen with a real CUDA 12.8 toolkit. Expected: the warning runs for every value that resolves to sm_120.CMakeLists.txt (whole file): the Python tests (serve/test_.py and tools/test_.py) are not registered with add_test, so ctest does not run them. The .github/ directory holds only the issue and pull request templates, with no workflow, so no CI runs them on a push either. Expected: the Python tests are registered in ctest, and a workflow runs ctest and the Python tests.
Missing tests: no test exercises repoint_config (setup.py:3777), _cpuid_avx2 (setup.py:713) or the need_cuda version gate (setup.py:3229). Expected: one test for each.
@gputier commented on GitHub (Oct 17, 2026):
Re-checked against v0.1.45. Every item is still present; none is fixed by a commit since v0.1.42. New line numbers below.
expected_bytes()unchanged (tools/gguf_reader.py:66-73, no diff since v0.1.42);or 0still atsetup.py:1710(whole_shard) andsetup.py:1978(check_shards).GGUF_META[t]attools/gguf_reader.py:117/:123,fh.read(n)at:113.check_shardsstill catches only(ValueError, struct.error)(setup.py:1976),whole_shard(OSError, ValueError, struct.error)(setup.py:1712). Re-run on a synthetic header with the v0.1.45 reader: value type 99 givesKeyError 99, a string length of 2**63 givesOverflowError, neither caught.write_config(setup.py:4513-4518) has no chmod; the only chmod calls insetup.pyare 0o755 (:3677,:5514).api_keyset atsetup.py:5894.data_folderstill skips a folder withnot has_data(folder)(setup.py:4483) beforerepoint_config(setup.py:4501-4502).move_into: no symlink check (setup.py:4410-4428);src.is_dir()/src.iterdir()at:4422-4423follow the link when the destination exists.setup.py:4322,:4325,confirm_paging); Q2_0 is still"families": ("qwen",)(setup.py:246).setup.py:6806still treatsnative_experts.txtexisting as done.death_note: the fallback still takes the last line starting withstrataorERR(serve/server.py:1030);strata trace: read ...is atsrc/program/generate.cpp:13409./settingsmissing from the endpoints table:docs/DETAILS.md:754-766; the route is only in prose at:1018and:1038(handled atserve/server.py:5440,:5550)..gitignore:22: the "Pi harness metadata" comment is still above*.sqlite,*.npz,*.occ1,td.log. The only change since v0.1.42 isdist-hip/at the end.cudaPeekAtLastError()atsrc/program/generate.cpp:13432; the stop branch setscancelled = truewithout checking the CUDA error (:13439).d_res == nullptronly withgraph_hits(generate.cpp:7841-7842); otherwisever.initfails (:8585, returns 1 at:8590) with the same message (src/core/verify.cpp:664-669), which still suggests--max-context,--kv q4_0,--draft-vocab en, images on the CPU.generate.cpp:8135-8136, insideif (o.serve)from:7840). Generate mode sets the auto chunk only underd_res != nullptr(:14913,:14923-14924), elseprefill_auto_maxstays (8192 default,:616). Only the no-profile / no-borrow case is capped, at 2048, for both modes (:2945-2948, already in v0.1.42).kMinCc: still only indevice_info()(src/core/device.cu:312/:315), whose only caller issrc/core/device_main.cpp:66. Note thatinclude/strata/core/device.hpp:59-61calls it "the matching check at run time".continue()fornative/all/all-majoratCMakeLists.txt:178-180, before the sm_120 + CUDA < 13.0 warning at:197-200.add_testisisa_guard_check,CMakeLists.txt:1945/:1949);.github/holdsFUNDING.yml,ISSUE_TEMPLATE/,pull_request_template.md, no workflow.repoint_configand_cpuid_avx2still have no test (no match undertools/orserve/). For the CUDA gate, to be precise:tools/test_setup_older_gpus.py:148-154(already in v0.1.42) covers the CUDA 12 path (need12), andtools/test_setup_cuda_repo.py(new,fb7ee724) covers "no nvcc". Still untested: an sm_120 card with a 12.x toolkit on the default path, whereneed_cuda = (13, 0)(setup.py:3865,:3871).@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.