journeys tui-kit: tk-storm, the L1 CLI storm in compiled Rust (held schedule, rate verdict)

Merged
LA
5d ago
+850-23

Summary

This is item 2 of the compiled-load plan (STATUS 4801; cmux-ad 03:40Z). The TYPING UNDER LOAD L1 CLI storm is now tk-storm, in Rust. This PR is stacked on #31748 (tk-gradient); its own change is the top 2 commits, 1c3338ede43e and e7cd7c40e504 (review fixes).

  • tk-storm: N worker threads share one schedule: call n is due at start + n / rate.
    • They run load_profiles.py's L1 mix with the same weights and argv shapes: list, tab create and close (each worker closes only its own tabs), terminal write, screen read, notify --desktop false, workspace status, progress and log, and snapshot.get on the app socket.
    • Each call is one calls.jsonl line.
    • Each CLI call is killed after 30 s.
    • The rate window ends at the stop, and only calls that started inside it count.
    • The summary has achieved_per_s, ok_per_s, asked_per_s, verdict and leftover_tabs, which the Python teardown closes. The verdict is NOT RUN when the calls that worked are below 95 % of the asked rate.
  • load_profiles L1: --engine auto (the default) runs tk-storm when it is built. Python then does only the set-up, the wait and the teardown. The Python storm, and every profile with an asked rate, now also gives a verdict. LOAD-DONE prints the verdict and the engine.
  • Items from the #31748 review:
    • tk-gradient waits on a full non-blocking stdout (poll), so it no longer stops half way.
    • Its events carry darwin_bg.
    • build-bins passes --target-dir, and fails when a program is missing after the build.
    • heavy --build-bins always builds (incrementally).
    • The Python bytes field counts UTF-8 bytes.
    • --duration and --frames refuse negative values, and --size refuses 0.
    • The pace_probe docstring is first in its function again.

Testing

Observed / Not run

Observed (cmux-orchestrator-1):

  • test_load_profiles.py: 15 tests OK. The new test_rust_storm_holds_the_rate is skipped here (no Rust build on this VM). The new test_python_engine_verdict passes.
  • test_tuikit.py: 36 tests OK, 2 skipped.
  • rustfmt --check: clean.
  • prepush-gate.py: no new violations.

Not run:

  • The crate is not compiled. The fleet self-test compiles it after this lands, and runs the Rust tests with CMUX_TUIKIT_REQUIRE_RUST=1. One of them checks that tk-storm holds 60 calls/s with no failed call against the stand-in CLI, whose grammar check refuses any wrong argv. The same test checks that the log has every counted call, that no second holds more than 1.3x the rate, and that at least 12 of the 13 kinds ran.
  • Against a real tagged build: the CLI call latency sets the reachable rate (about 8 workers ÷ the call latency). Above that, the run says NOT RUN.

Changelog

none