Skip to content

Nightly reds: libhv log-file switch, STYLE030 static_if require, Windows bash, seqbox window - #4158

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/nightly-reds-0928
Sep 28, 2026
Merged

borisbat merged 1 commit into
masterfrom
bbatkin/nightly-reds-0928

Conversation

@borisbat

Copy link
Copy Markdown
Collaborator

Why. The 2026-09-28 nightly went red in 16 jobs from five causes. This fixes four; the strudel worker reds on the tsan lane get their own PR.

What changes.

  • dasHV patches libhv's logger_set_file (the fix sent upstream as fix(hlog): logger_set_file switches an already-open log file ithewei/libhv#892): it closes the open log file, so hv_set_log_file switches files after libhv has logged.
  • dasllama_fat_start.das: nolint:STYLE030 on a require used only inside the llvm_tune static_if arm, which the LLVM-off lint lane never sees.
  • ci/test_render_manifests.py runs checksum_assets.sh through Git's bash; a bare bash from Python on Windows is WSL.
  • The seqbox test keeps its workers running until snapshots land (10 s cap) instead of stopping at 250 ms.
  • make-pr and preflight default DAS_LOG_LEVEL to info through one helper, utils/common/log_floor.das.
  • tests-cpp/REVIEW.das skips lane wiring for a file whose tests only run cmake or ctest and that builds nothing; a new tests-cpp/REVIEW.md rule keeps every other unwired file reported.

Observable behavior.

  • tests/dasHV/test_log_file.das: red in every lane running the dasHV folder -> green
  • nightly lint lane: STYLE030 on dasllama_fat_start.das -> clean
  • Windows check_manifest_render: exit 127 -> green
  • mingw seq box survives concurrent writers on a starved runner: fails -> passes
  • make-pr with no DAS_LOG_LEVEL: prints nothing -> prints its gate ledger

Where to look. modules/dasHV/patch_libhv.cmake (patches from a saved pristine copy, fails the build on a drifted anchor) and the narrowed check in tests-cpp/REVIEW.das.

#nightly

Validation, claims, ledger

Validation

  • tests/dasHV as one folder in one process (the failing shape), Windows Release: 145/145.
  • Patch script: cmake -S . -B build (DAS_TOOLS_DISABLED OFF), then ctest --test-dir build -C Release -L small -R dashv_patch_libhv passes; four mutants of the script (warning instead of fatal, reading the live file instead of the pristine copy, no usage guard, unmoved mutex init) each turn it red.
  • The mutex-init hunk is required: without it the Windows build dies at the first dasHV test (exit 127).
  • seqbox: same configure, ctest --test-dir build -C Release -L small -R "seq box survives concurrent writers". 24 copies pinned to one core: before 20/24 fail with the nightly's checks, after 24/24 pass.
  • STYLE030: LLVM-off lint of the file reports the nightly's warning without the marker, 0 issues with it.
  • manifest test: 9/9 on Windows and 9/9 on Linux (WSL); the old exit 127 reproduced first.
  • make-pr test_gates.das 8/8; emptying the setter and dropping the call from main() each fail a test.
  • tests-cpp/REVIEW.das: green on the tree; red on style_lint/ with its wiring removed, on a bare COMMAND daslang probe, and on a cmake -P test beside an add_custom_target.
  • Not run: the full preflight (each change has its own targeted gate above); the dasLLAMA model-free / --changed suites - the only dasLLAMA change is a lint-suppression comment, and the local build has LLVM off.
  • Codex review round on an earlier tip of this branch: no findings.

Claims - stated, not tested

  • The patch's hardening lines match upstream: NUL-terminating filepath, resetting can_write_cnt, clearing cur_logfile, and the lock around the close. test_log_file does not tell them apart; a break would show only for a path of 255+ characters, a switch into an already over-size file, logger_get_cur_file() read between a switch and the next write, or a log write racing the switch.

Not done

  • Strudel worker tests red on the tsan lane: a separate PR after a WSL tsan repro.
  • STYLE030 reading names used only in a discarded static_if arm: ledgered.
  • A check that flags a bare "bash" in ci/*.py: ledgered.
  • Folding the patch helpers with dasAudio's miniaudio_memory64.cmake: declined.
  • Self-review defects the audits found in eight other checklists: ledgered.
  • patch_libhv.cmake goes away when the libhv pin moves past fix(hlog): logger_set_file switches an already-open log file ithewei/libhv#892.

…uire, Windows bash in the manifest test, seqbox window

dasHV carries a libhv patch (modules/dasHV/patch_libhv.cmake, the ExternalProject PATCH_COMMAND):
logger_set_file closes the open log file under the logger mutex, so hv_set_log_file switches
files after libhv has logged - test_log_file failed in every lane that runs the dasHV folder in
one process. The same fix is upstream as ithewei/libhv#892; the patch drops when the pin moves
past it. The script patches from a saved pristine copy and fails the build, naming the anchor,
when one is gone; tests-cpp/big/dashv_patch_libhv (label small) drives it over a fixture.

dasllama_fat_start.das: dasllama_env's only use sits in the llvm_tune static_if half, so the
LLVM-off lint lane flags the require; nolint:STYLE030 like strings_boost beside it.

ci/test_render_manifests.py runs checksum_assets.sh through Git's bash - a bare "bash" from
Python on Windows is System32's WSL launcher.

test_seqbox_concurrent_writers keeps running past its 250 ms window until a snapshot was
published and read (10 s cap) - a starved runner stopped the workers before they ran.

tests-cpp/REVIEW.das skips the lane-wiring check for a file whose every test runs ${CMAKE_COMMAND}
or ${CMAKE_CTEST_COMMAND} and that declares no target or custom command - the patch test builds
nothing; writing_cpp_tests.md names that shape, and tests-cpp/REVIEW.md binds any later
change to that check to keep reporting a file that builds something and leaves its lane unwired.

make-pr reads at info unless DAS_LOG_LEVEL is set - under the default warning floor its gate
ledger printed nothing. The guard is utils/common/log_floor.das, which preflight now calls too.
CLAUDE.md's to_log line names the floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 28, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It patches an external dependency's C source at build time and alters concurrency-test timing and build-wiring across the full CI matrix, which cannot be fully verified here and warrants human review.

Review effort: Balanced
Findings: None

What changed in this PR

This PR fixes four of the five root causes behind a red 2026-09-28 nightly (16 jobs). It patches libhv's logger_set_file at build time so hv_set_log_file actually switches log files, silences a false STYLE030 lint on a static_if-only require, makes a Windows CI test invoke Git's bash instead of the WSL launcher, widens a concurrency test's snapshot-landing window on starved runners, and centralizes the DAS_LOG_LEVEL default-to-info behavior into a shared log_floor helper. It also narrows the tests-cpp lane-wiring gate so a build-nothing cmake/ctest-only test folder is not falsely required to wire a lane.

Changes:

  • Add modules/dasHV/patch_libhv.cmake (idempotent, pristine-anchored source patch) plus a cmake -P fixture test, and wire it into dasHV's ExternalProject.
  • Extract default_log_floor_to_info() into utils/common/log_floor.das, adopt it in make-pr and preflight, and add tests.
  • Narrow the tests-cpp/REVIEW.das lane-wiring check via builds_nothing_for_its_tests, fix the Windows bash resolution in ci/test_render_manifests.py, widen the seqbox test window, and add a STYLE030 suppression.
File Description
utils/​common/​log_floor.das New shared helper that defaults DAS_LOG_LEVEL to info when unset.
utils/​internal/​preflight/​main.das Replaces inline env logic with the shared helper.
utils/​internal/​make-pr/​main.das Calls the shared helper in main(); drops a non-attaching trailing //!.
utils/​internal/​make-pr/​test_gates.das Adds tests for the helper and for make-pr printing its gate lines with no floor set.
tests-cpp/​small/​test_seqbox_concurrent_writers.cpp Waits (10 s cap) for snapshots to land before stopping workers.
tests-cpp/​REVIEW.das Adds builds_nothing_for_its_tests to skip lane wiring for cmake/ctest-only folders.
tests-cpp/​REVIEW.md New rule documenting the narrowed lane-wiring gate.
tests-cpp/​big/​dashv_patch_libhv/​* Fixture, cmake test driver, and CMakeLists exercising the patch script.
modules/​dasHV/​patch_libhv.cmake New idempotent patch applying the libhv logger_set_file fix.
modules/​dasHV/​CMakeLists.txt Wires PATCH_COMMAND and re-patch-on-edit step dependency.
modules/​dasLLAMA/​dasllama/​dasllama_fat_start.das Adds nolint:STYLE030 for a static_if-only require.
ci/​test_render_manifests.py Resolves Git bash on Windows; skips when no bash.
skills/​internal/​writing_cpp_tests.md, CLAUDE.md Doc updates for build-nothing test folders and log-level filtering.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@borisbat

Copy link
Copy Markdown
Collaborator Author

daspkg_index / index_sweep is red for a reason outside this PR: the sweep installs every package in the live borisbat/daspkg-index, and dasSDL3 joined the index at 08:45 UTC today (borisbat/daspkg-index#32). Its CMake stops off Windows on purpose (Package pilot requires Windows x64 MSVC), and the index has no platform field for the sweep to skip it, so every run of this lane is red from now on, master included. The fix is its own PR; this watch ignores that lane.

@borisbat
borisbat merged commit 5e3f07f into master Sep 28, 2026
69 of 71 checks passed
@borisbat
borisbat deleted the bbatkin/nightly-reds-0928 branch September 28, 2026 12:59
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