mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4545] [Other] tools/ab_engine.py reuses ab_<arm>_r<n>.log in the temp dir across runs, so a later A/B appends its engine logs to an earlier one #2050
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#2050
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 @otaliptus on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4545
Area
[Other] (a tool under tools/)
Desktop app, Terminal or source?
Source
What happened
tools/ab_engine.pygives every arm's engine a log file with a fixed name in the temp directory:and the server opens a config's log in append mode on purpose (
open(log, "a", ...), #779, so a crash report keeps the time). So a second A/B run days later, with the same arm letters, appends its engine output to the first run's files. After two sessions (2026-10-26 and 2026-10-28)ab_B_r1.logholds six[strata] … engine started:blocks from engines with different binaries and differentenvsettings. A grep for a feature line (for me: the int8 crossover line) then finds the earlier session's arm B and looks like the current engine ignored its environment. It cost me an hour on 2026-10-26 before I noticed the dates on theengine startedlines.Expected: a run of the tool starts from empty engine logs, or tells where this run's logs are.
Suggestion: truncate the file before each start (
Path(cfg["log"]).write_text("")), or put each run's files in atempfile.mkdtemp(prefix="ab_engine_")and print that path once.Smallest steps or command that reproduce it
python tools/ab_engine.py cfg.json A:STRATA_X=1 B:STRATA_X=2 --rounds 1grep -c 'engine started' $TMPDIR/ab_B_r0.log→ 2 (and more with every run)Reproduction status
Reproduced locally
Strata version
Strata 0.2.11 (re-checked 2026-11-05 on the tag; still present). First seen on Source checkout v0.2.7.1 (
46c152a1), engine 0.1.53;tools/ab_engine.pyis identical on main today; on 0.2.11: tools/ab_engine.py is byte-identical, 16 appended engine blocks in one log here (comment of 2026-11-05)Graphics card, memory and system
Intel Arc Pro B70 32 GB · 62 GB RAM · Debian 13 (not GPU specific)
Model, size and settings
Qwen3.8-Flash-Next IQ3_S (not relevant)
Logs
grep -n 'engine started' ab_B_r1.logafter the two sessions: six lines, dated 2026-10-26 03:54 to 2026-10-28 20:52.@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. 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.
@otaliptus commented on GitHub (Nov 5, 2026):
/reopen
Re-checked on v0.2.11 (2026-11-05): still present.
tools/ab_engine.pyis byte-identical between v0.2.10 and v0.2.11; lines 96-97 still put every arm's engine log attempfile.gettempdir()/ab_{name}_r{rnd}.log, andserve/server.pystill opens a config's log in append mode.ab_B_r0.lognow holds 16[strata] ... engine started:blocks from A/B runs on 2026-10-26, 10-28, 11-04 and 11-05, with Flash-Next and Swift arms, three different engine binaries and differentenvsettings mixed in one file;ab_A_r0.loghad 21. It bit again this week: a grep for the drafter's acceptance line in arm B's log matched the previous day's run until I checked the dates on theengine startedlines.Suggestion unchanged: truncate the file before each start, or give each run a
tempfile.mkdtemp(prefix="ab_engine_")and print that path once.@github-actions[bot] commented on GitHub (Nov 5, 2026):
Not reopened yet. Still missing:
Edit the issue and comment
/reopenagain. Details: CONTRIBUTING.md@otaliptus commented on GitHub (Nov 5, 2026):
/reopen
The "Strata version" field now starts with 0.2.11, the version re-checked today (details in the comment above).
@github-actions[bot] commented on GitHub (Nov 5, 2026):
Reopened, thank you. A maintainer will pick it up from here.