Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

Start Chromeria when T3 is down (#140); release 0.40.0 - #141

Merged
lukemaj merged 1 commit into
mainfrom
fix/140-start-chromeria
Sep 28, 2026
Merged

lukemaj merged 1 commit into
mainfrom
fix/140-start-chromeria

Conversation

@lukemaj

@lukemaj lukemaj commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Closes #140.

What changed

  • runner/controller.py _await_prism: while T3 is unreachable, once 60 continuous seconds have passed the loop runs the launch command once, then again every 5 minutes while T3 stays down. The existing backoff and the 24h cap stay as the backstop.
  • Command: T3_LAUNCH_CMD when set (empty or blank turns launching off); otherwise /usr/bin/open -g -a Chromeria on macOS and off elsewhere. Run through subprocess.run on shlex.split (no shell), 15 second timeout.
  • Each launch is a launching_t3 ledger event in status with at, command and result (ok, exit N: <stderr>, or the exception). A failed launch never ends the wait.
  • T3 answering with an error, an empty Prism list and cancel are unchanged (the Wait for T3 instead of blocking when Prism is unreachable #136 tests pass unmodified).
  • Release 0.40.0: VERSION, three plugin.json mirrors, CHANGELOG.md, RUNNER.md.

Timing note: the launch happens at the first reread after 60 seconds. With the 5/10/20/40/60 backoff that is 75 seconds, then 375, 675, and so on.

Test safety

Tests never start the real Chromeria: Base.run_controller in tests/test_issue133.py now replaces controller._launch_t3 with a recorder, and isolate_t3_env sets T3_LAUNCH_CMD="".

Proof

  • tests/test_issue140.py (fake clock, fake client, fake launcher): no launch before 60s; launch at 75s and the job continues once the read succeeds; relaunch at 375, 675, 975; failed launches recorded and the wait goes on; empty command disables launching. _launch_t3 checked against real harmless commands: success, nonzero exit, missing binary, bad quoting, ; passed as an argument (no shell), timeout.
  • uv run --with pytest python3 -m pytest -q: 328 passed, 30 subtests passed.
  • python3 scripts/test.py: Ran 328 tests, OK.
  • versionctl release-check: release candidate OK: v0.40.0 at 619b92b.

Not checked: a live launch of Chromeria through the runner (not run, since the real app was in use).

🤖 Generated with Claude Code

After 60 continuous seconds without an answer, the T3 wait loop runs
T3_LAUNCH_CMD (default /usr/bin/open -g -a Chromeria on macOS, off
elsewhere, empty turns it off) once, then every 5 minutes. Each launch
is a launching_t3 ledger event; a failed launch never ends the wait.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lukemaj
lukemaj merged commit cecc4b3 into main Sep 28, 2026
1 check passed
@lukemaj
lukemaj deleted the fix/140-start-chromeria branch September 28, 2026 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Start Chromeria when T3 is down instead of only waiting

1 participant