[GH-ISSUE #3654] [Other] A failed test start keeps only the tail of the engine log and destroys the host, server and PID records that show why it failed #1507

Closed
opened 2026-11-04 01:51:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @njcray2 on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3654

Area

[Other]

Desktop app, Terminal or source?

Terminal (the strata command)

What happened

While debugging #3605 the deletion of the evidence made the process much harder.

After a failed test start, the only surviving evidence is .updates\logs\test-start-<version>.log — the last 64 KiB of the engine's own log (updater.py:679). Everything that would have shown the PID mismatch is in the sandbox profile directory, and updater.py:758 removes the sandbox with shutil.rmtree(longpath.long_path(sandbox)). I had to run an external watcher that copied those files every 3 s to get them at all; in the successful run they were:

run.json                                   1617 B
runtime\updtest.json (host state)           173 B
runtime\updtest-<host_token>.child.json     233 B   (pid the host recorded)
runtime\updtest-<ready_token>.ready.json    294 B   (pid the server published)
runtime\updtest.server.log                 1217 B
runtime\updtest.host.log                      0 B
engine.log                                 6808 B

The kept 64 KiB is precisely the part that looks innocent ("the engine loaded, then silence"). Related, in the same failure path: when the host cannot identify its own server child, the shutdown degrades — runtime.stop returned server_stop_deadline_expired, and the host log recorded PermissionError: [WinError 32] … smoketest2-<host_token>.child.json (the marker could not be removed while it was held). Those two lines only exist in the file that was deleted.

Smallest steps or command that reproduce it

Fail a test start for any reason, then list the components store: .updates\logs\test-start-*.log exists, the sandbox directory does not.

Reproduction status

Reproduced locally (the deletion, and the two stop-path errors).

Strata version

Strata 0.2.2 · engine 0.1.47

Graphics card, memory and system

RTX 4070 Ti SUPER 16 GB · 63 GB RAM · Windows 11 x64

Analysis (optional)

Copy the whole runtime directory (or at least run.json, the child marker, the ready record and both logs) into .updates\logs\test-start-<version>-<n>\ when the test fails, and keep the sandbox until the next successful update. Cheap, and it converts an "engine doesn't respond" report into a diagnosed one.

Originally created by @njcray2 on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3654 ### Area [Other] ### Desktop app, Terminal or source? Terminal (the `strata` command) ### What happened While debugging #3605 the deletion of the evidence made the process much harder. After a failed test start, the only surviving evidence is `.updates\logs\test-start-<version>.log` — the last 64 KiB of the engine's own log ([updater.py:679](#L679)). Everything that would have shown the PID mismatch is in the sandbox profile directory, and [updater.py:758](#L758) removes the sandbox with `shutil.rmtree(longpath.long_path(sandbox))`. I had to run an external watcher that copied those files every 3 s to get them at all; in the successful run they were: ``` run.json 1617 B runtime\updtest.json (host state) 173 B runtime\updtest-<host_token>.child.json 233 B (pid the host recorded) runtime\updtest-<ready_token>.ready.json 294 B (pid the server published) runtime\updtest.server.log 1217 B runtime\updtest.host.log 0 B engine.log 6808 B ``` The kept 64 KiB is precisely the part that looks innocent ("the engine loaded, then silence"). Related, in the same failure path: when the host cannot identify its own server child, the shutdown degrades — `runtime.stop` returned `server_stop_deadline_expired`, and the host log recorded `PermissionError: [WinError 32] … smoketest2-<host_token>.child.json` (the marker could not be removed while it was held). Those two lines only exist in the file that was deleted. ### Smallest steps or command that reproduce it Fail a test start for any reason, then list the components store: `.updates\logs\test-start-*.log` exists, the sandbox directory does not. ### Reproduction status Reproduced locally (the deletion, and the two stop-path errors). ### Strata version Strata 0.2.2 · engine 0.1.47 ### Graphics card, memory and system RTX 4070 Ti SUPER 16 GB · 63 GB RAM · Windows 11 x64 ### Analysis (optional) Copy the whole runtime directory (or at least `run.json`, the child marker, the ready record and both logs) into `.updates\logs\test-start-<version>-<n>\` when the test fails, and keep the sandbox until the next successful update. Cheap, and it converts an "engine doesn't respond" report into a diagnosed one.
Author
Owner

@Niko1221 commented on GitHub (Oct 27, 2026):

Thanks. A failed test start now keeps the runtime records (run.json, the host, child and ready files and both logs) next to the engine log. Fixed in 0.2.7.

Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7

<!-- gh-comment-id:6445942206 --> @Niko1221 commented on GitHub (Oct 27, 2026): Thanks. A failed test start now keeps the runtime records (run.json, the host, child and ready files and both logs) next to the engine log. Fixed in 0.2.7. Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1507
No description provided.