Repository navigation
Conversation
With WIRELOG_JOIN_BATCH_BYTES=224 in the environment, three test binaries aborted: join_spill tests/test_join_spill.c:1133 session_cold_relation tests/test_session_cold_relation.c:156 wirelog_advanced_spill tests/test_wirelog_advanced_spill.c:173 The session reads the knob when it is created (wirelog/columnar/session.c, getenv at session creation). A nonzero batch size turns off spill JOIN selection (wirelog/columnar/join.c) and makes wl_columnar_session_cold_mode false, which refuses sealing; docs/MEMORY.md documents that the knob takes precedence and that competing JOIN batch modes are refused. The fixtures therefore failed under the knob as designed. wirelog_advanced_spill is not named in #2287: it comes from 280c21f and fails the same way through the public seal call. Each main() now clears WIRELOG_JOIN_BATCH_BYTES and WIRELOG_JOIN_BATCH_STRICT before the first session exists. The two internal tests use the _putenv_s shim from 6d74992 (#2262) for MSVC; wirelog_advanced_spill uses its existing environment() helper. The knob cases in join_spill and session_cold_relation set the session fields directly and are unaffected. Under the knob these binaries now show that they ignore the environment; they do not run their fixtures in batch mode. New meson entries join_spill_join_batch_env, session_cold_relation_join_batch_env and wirelog_advanced_spill_join_batch_env run each binary with WIRELOG_JOIN_BATCH_BYTES=224. They aborted at the lines above before this change and pass after it. CI's TSan legs run them too, since those legs run meson test without a suite filter. Clearing WIRELOG_JOIN_BATCH_STRICT is defensive: the session ignores it unless the byte count is set, so no test distinguishes it.
The public header did not say that WIRELOG_JOIN_BATCH_BYTES affects configured spill sessions. The session reads it when it is created (wirelog/columnar/session.c), and when it is on, spill JOIN selection is off (wirelog/columnar/join.c) and wl_columnar_session_cold_mode is false, so wirelog_session_seal_join_input refuses before capture with WIRELOG_ERR_EXEC (wirelog/wirelog_advanced.c maps the unsupported status there). docs/MEMORY.md already records that the knob takes precedence. wirelog/wirelog-advanced.h now documents, in the wirelog_session_options_v1_t block, when the knob is on: its whole value parses as a nonzero base-10 integer the way strtoull() reads it, so leading whitespace and a sign are accepted. An empty value, "0", "0x10", "5x", "abc" and out-of-range values leave it off. The seal block names the knob among the eligibility conditions and says that this refusal lasts for the session's lifetime. The Returns paragraph is unchanged; its "invalid/unsupported" class already covers the case. No runtime change. test_wirelog_advanced_spill gains join_batch_knob, through the public API only. For "0", "", "abc", "5x", "0x10" and an out-of-range value the seal succeeds. For "4096", " 5" and "-1" it returns WIRELOG_ERR_EXEC with no spill file open; clearing the environment afterwards does not change that session, its source still accepts insert and remove, and the snapshot is unchanged. A session created with the knob unset still seals after the environment is set. On Windows, environment() deletes the variable for "", so that case repeats the unset one there.
justinjoy
force-pushed
the
claude/2287-knob-env
branch
from
October 29, 2026 10:30
9f9581f to
fa34034
Compare
This branch has not been deployed
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.
Fixes #2287.
Summary
With
WIRELOG_JOIN_BATCH_BYTES=224in the environment, three test binaries aborted.join_spilltests/test_join_spill.c:1133session_cold_relationtests/test_session_cold_relation.c:156wirelog_advanced_spilltests/test_wirelog_advanced_spill.c:173wirelog_advanced_spillis not named in #2287. It comes from 280c21f and fails the same way, through the public seal call.The session reads the knob from the environment when it is created. A nonzero batch size has two effects:
wirelog/columnar/join.c);wl_columnar_session_cold_modefalse, so sealing is refused.docs/MEMORY.mddocuments both: the knob takes precedence, and competing JOIN batch modes are refused. So the fixtures failed under the knob by design. This is the same class as #2262 (6d74992).Change (test-only)
main()clearsWIRELOG_JOIN_BATCH_BYTESandWIRELOG_JOIN_BATCH_STRICTbefore the first session exists._putenv_sshim from 6d74992 for MSVC.wirelog_advanced_spilluses its existingenvironment()helper.join_spillandsession_cold_relationset the session fields directly, so this change does not affect them.*_join_batch_envrun each binary withWIRELOG_JOIN_BATCH_BYTES=224. They aborted at the lines above before the change and pass after it.meson testwithout a suite filter._STRICTis defensive: the session ignores it unless the byte count is set, so no test distinguishes it.Validation
On bf0c978, then re-checked after rebasing onto 3ac18bc with an identical patch. The final rebase onto 81f244c is covered under "Rebase onto 81f244c" below.
--timeout-multiplier 4), 6 entriesWIRELOG_JOIN_BATCH_BYTES=224Mutants, built in a copy, per file:
Review
49ab3778. The rebased commit carries the same patch.LD_PRELOADno-opunsetenvthat the clears are what make the binaries pass._WIN32unsetenv shim now exists in three test files.Second commit: public header doc
wirelog/wirelog-advanced.hdid not mentionWIRELOG_JOIN_BATCH_BYTES. This commit documents it.strtoull()reads it. Leading whitespace and a sign are accepted, so"-1"turns it on."0","0x10","5x","abc"and out-of-range values leave it off.wirelog_session_seal_join_input()returnsWIRELOG_ERR_EXEC.test_wirelog_advanced_spillgainsjoin_batch_knob, which uses the public API only. It checks:"4096"," 5"and"-1":WIRELOG_ERR_EXEC, with no spill file open;Validation:
check-advanced-header, doxygen headers, uncrustify,git diff --checkWIRELOG_OKwith the knob on, the new case aborted at:443.cold_modemakes the test abort.ERANGEcheck makes the test abort, once the out-of-range value was added on the Reviewer's finding.An independent Reviewer, a fresh re-Reviewer, the Architect and the Critic approved tree
b6e28ea7.Rebase onto 81f244c
Main added sealed-input projection/filter support, which conflicted in three places. The conflicts were resolved by hand:
tests/test_session_cold_relation.c: the knob clear stays the first statement ofmain(), before main's new session-creating calls.tests/test_wirelog_advanced_spill.c:join_batch_knob()runs after main's newmixed_projection()andunsupported_filters().wirelog/wirelog-advanced.h: main's rewritten seal eligibility paragraph is kept, and the knob condition is its own sentence after it.After the rebase, all gates were rerun on 81f244c (rel/ASan/TSan x4 6/6, full release suite 480/0/14, knob gate 480/0/14, header gates, uncrustify). An independent Reviewer approved the conflict resolution and then the follow-up wording fix (tree
130f4466).