Skip to content

ari test: a program may run as long as the run's timeout, not a running app's 0.1 s - #1003

Merged
transfix merged 1 commit into
masterfrom
fix/ari-test-time-backstop
Nov 3, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/ari-test-time-backstop

Conversation

@transfix

@transfix transfix commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Why

ari_chat_component failed all three ctest attempts on #995's
package-linux / libcvc-debug-grpc job (run 41586658335). Each attempt reported
did not complete: time_limit_exceeded, on a different set of subtests. Nothing in #995 touches the
chat or users components or ari test.

  • ari test runs each test program as an action. An action gets ariadne.limits.action_max_time:
    0.1 s, charged mostly as the thread's CPU time.

  • The chat component's test programs take a few thousand steps each. That's a few milliseconds in
    a Release build, close to 0.1 s in a Debug build, and past it on a slow runner.

  • That runner ran the whole suite in 3558 s, against 1579–2220 s on other runs. Unrelated tests took
    about twice as long (PI09_BoostThroughWaiterEdge 6.41 s vs 3.20 s).

  • On other branches' Debug jobs ari_chat_component passes in 0.86–1.19 s; on this one it took
    1.7–1.86 s.

  • Locally (Release), the same subtests fail the same way once the budget is cut to a millisecond:

    --action-time result
    0.1 ok
    0.01 ok
    0.003 ok
    0.001 FAIL: shows_the_room, appends_only_what_is_new, another_run_rebuilds_the_view … time_limit_exceeded

This can hit any PR whose Debug job lands on a slow runner.

What changes

  • The default: under ari test, a program's time backstop is the run's own --timeout (30 s by
    default) instead of a running app's 0.1 s. A test checks what a document does, not how fast. The
    step cap (action_max_steps, 5000) still stops a runaway, and --timeout still bounds the run.
  • --action-time S: sets the backstop explicitly. 0.1 holds a document to what a running app
    allows, and 0 lifts it. It is parsed with the other host flags, in host_cli.
  • Docs: ari test's usage text and docs/ARIADNE.md §13 say so.

Tests

  • AriTest.AProgramMayRunAsLongAsTheTimeout, which runs the built ari:
    • the same program passes by default and with --action-time 0;
    • with --action-time 0.000001 it is killed with time_limit_exceeded;
    • a bad value is refused.
  • AriadneHostCli.ActionTimeIsSecondsFromZero: parsing (unset, 0.1, 0, and -1/soon/2s/inf refused).
  • On a Windows static Release build, these all pass:
    • the AriTest.*, AriQuit.* and AriRun.* suites;
    • ari_chat_component, ari_docset and ari_url_document;
    • ariadne_host_test (54) and ari_net_test (8).
  • clang-format 18.1.8 is clean.

The flake is a slow Debug runner, which I didn't reproduce locally. The table above shows the same
failure mode with the budget scaled to this machine.

…ng app's 0.1 s

ari_chat_component failed every ctest attempt on a Debug CI runner with
"did not complete: time_limit_exceeded" on different subtests each time,
though it passes in about a second on other Debug runs and in 0.2 s locally.
ari test runs each test program as an action, and an action gets
ariadne.limits.action_max_time, 0.1 s of (mostly CPU) time. The chat
component's tests take a few thousand steps each: a few milliseconds in a
Release build, close to the 0.1 s in a Debug one, and past it on a runner that
ran the whole suite about twice as slowly as usual. The same subtests fail
locally once the budget is cut to a millisecond.

A test checks what a document does, not how fast. Under ari test a program's
time backstop is now the run's own --timeout (30 s by default), while the step
cap (action_max_steps) still stops a runaway. --action-time S sets it: 0.1
holds a document to what a running app allows, and 0 lifts it.

Tests: AriTest.AProgramMayRunAsLongAsTheTimeout (the default and 0 pass, a
millionth of a second kills the same program, a bad value is refused) and
AriadneHostCli.ActionTimeIsSecondsFromZero.
@transfix
transfix merged commit fcb6376 into master Nov 3, 2026
26 of 27 checks passed
@transfix
transfix deleted the fix/ari-test-time-backstop branch November 3, 2026 19:04
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.

1 participant