Skip to content

Write Trial waiting lines so a long Trial is not Silent - #1984

Merged
JacobStephens2 merged 9 commits into
mainfrom
issue-1495
Nov 11, 2026
Merged

JacobStephens2 merged 9 commits into
mainfrom
issue-1495

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

During Trials, the Experiment's Command log gained a line only when a Trial started or ended. A Trial running longer than inbox.silent_minutes therefore made a healthy Experiment Silent in Needs you. There were two causes:

 experiment::run
   logs::configured(&config)
+  poll::configure_waiting_lines(config.effective_waiting_line_interval())   # Experiments skip command::start
   ...
   Execution::run (each worker's Trial)
     progress::step("Trial <key> starting")
     process::output_until(..., check = ||
       monitor.check(signal)?
+      if waiting.should_report(())                # WaitingLine::already_reported: first repeat after one interval
+        progress::step("Trial <key> still running")
     )
     ... outcome ...
  • The line is written only inside Trial supervision, after the monitor's checks pass. Completion, timeout, interruption and a plan-limit stop all end it.
  • The Bar, outcome classification and resume are unchanged.
  • Trials stay private Experiment work (ADR 0027).
  • logs.waiting_line_minutes descriptions now include Trials, in src/config.rs and docs/guide.md. The manual is regenerated.
  • The hand-written site pages don't describe waiting-line intervals, so they are unchanged.

Evidence

Execution evidence

  • Before: cargo test --test experiments trials_write_waiting_lines on the unfixed code. Nothing is logged between each Trial's start (16:26:00) and its outcome:
    ---- trials_write_waiting_lines_while_both_workers_are_mid_trial stdout ----
    panicked at tests/experiments.rs:760:9:
    the baseline Trial repeats its waiting line while it runs:
    thirdshift: 16:26:00 Trial 1bb8…--baseline--0 starting
    thirdshift: 16:26:00 Trial 1bb8…--candidate--0 starting
    thirdshift: 16:26:02 Trial 1bb8…--baseline--0 succeeded
    thirdshift: 16:26:02 Trial 1bb8…--candidate--0 succeeded
    test result: FAILED. 0 passed; 1 failed
    
    With the Trial lines in place, removing only the new configure_waiting_lines call fails all three log tests. The Experiment then ignored THIRDSHIFT_WAITING_MINUTE_MS and logs.waiting_line_minutes.
  • After: cargo test --test experiments -- waiting_line plan_limit_stop:
    test trials_write_waiting_lines_while_both_workers_are_mid_trial ... ok
    test trial_waiting_lines_fall_back_to_half_the_silent_time ... ok
    test a_timed_out_trial_stops_its_waiting_lines ... ok
    test a_plan_limit_stop_ends_its_trials_waiting_lines ... ok
    test a_trial_waiting_line_keeps_a_long_trials_stage_working ... ok
    test result: ok. 5 passed; 0 failed
    
    a_trial_waiting_line_keeps_a_long_trials_stage_working reproduces the report's shape:
    • Setup: a live Experiment with both workers mid-Trial, its Trials stage aged 15 min and its Command log aged 11 min.
    • Before any waiting line: status --json shows silent in needs you.
    • After the next waiting line: ok and working, also in show --json, with the Trials stage still aged.
  • Wider checks:
    • cargo test --test experiments --test run_health: 191 + 5 passed.
    • cargo test --no-fail-fast (full suite): passed.
    • npm test --prefix site and npm run docs:check --prefix site: passed.
    • cargo clippy --all-targets: clean.
    • scripts/affected-tests main stopped on tests/process findings::fixing_dispatches_each_reproduced_finding_and_keeps_unreproduced_findings_private. That test is flaky on unchanged origin/main too (3 of 6 runs failed there in a temporary worktree), and it passed in the full run above.

Visual evidence

None. The only rendered change is three lines of prose in the generated manual (site/docs/index.html), with no layout change.

Merge Danger

Door: two-way

Blast Radius: Experiments

Experiment Command logs and terminal output gain a "Trial … still running" line per running Trial, every effective waiting interval (5 min by default).

Review

  • Reports: Standards found 5 judgement calls; Spec found 4 coverage gaps. No finding says behaviour is wrong.
  • Every changed file was read by both reviewers. site/docs/index.html was accepted as generated output (npm run docs:check --prefix site exited 0), and both reviewers also read its diff.
  • Fixes made after review:
    • Renamed WaitingLine::reported to already_reported (Standards 1).
    • Added the Silent→Working health test with aged timestamps (Spec 1, 2).
    • Added the plan-limit stop test (Spec 3).

Unaddressed findings

Standards

  • 2. Possible Primitive Obsession (WaitingLine with () state): declined. This matches the existing poll::WaitingLine use with () at src/pull_request.rs:524-530. The Agent Brief says "Use poll::WaitingLine".
  • 3. Possible Duplicated Code: configure_waiting_lines repeated beside logs::configured: declined here. Other entry points (src/processes.rs:650,742, src/processes/review.rs:22,202, src/processes/source.rs:919) may skip it too. Changing them is outside An Experiment shows as Silent in Needs you while a Trial runs longer than inbox.silent_minutes #1495 and needs triage; filed as Process and Review runs that skip command::start may not configure logs.waiting_line_minutes #1983.
  • 4. Possible Duplicated Code: the rendezvous shell script in tests/experiments.rs: declined. It follows the three existing copies in the same file. Extracting a helper would touch unrelated tests.
  • 5. Terminology: GLOSSARY "Silent" says "Ticket run": declined. docs/guide.md:303 already applies Silent to live work generally, and the glossary was not part of this Ticket.

Spec

  • 3, interruption part: no separate assertion. Waiting lines are written only inside process::output_until's check closure (src/evals/experiment/execution.rs), which ends with the Trial process. a_trial_waiting_line_keeps_a_long_trials_stage_working ends by stopping the live Experiment and asserts it exits as interrupted. Ordinary silent Commands stay covered by tests/run_health.rs (5 passed), and the new health test also asserts silent before a waiting line.
  • 4. "can't confirm scripts/affected-tests main was run": refuted by the run. See Wider checks above.

CI notes

  • experiments process::process_session_evidence_check_all_private_fix_identifiers_and_abbreviated_commits (run 42923244344) failed intermittently, and the failure is unrelated to this branch. The test asserts request.json lacks the substring 421. In this run the random Experiment id 453591dbb2bc342181bd… contained it in output_dir, and the document held no private fix data. This branch changes neither the test nor what it writes. Locally the test passed on 018319bc.

Closes #1495

Built with claude 2.1.314 · opus · default effort

Security review outcome

No unaddressed introduced findings.

@JacobStephens2
JacobStephens2 merged commit 60b1ca6 into main Nov 11, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1495 branch November 11, 2026 01:41
This was referenced Nov 11, 2026
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.

An Experiment shows as Silent in Needs you while a Trial runs longer than inbox.silent_minutes

1 participant