Skip to content

Gate pull requests on the Rust tests and the runtime suite - #246

Merged
lydakis merged 1 commit into
mainfrom
claude/project-thread-ocixh3
Oct 28, 2026
Merged

lydakis merged 1 commit into
mainfrom
claude/project-thread-ocixh3

Conversation

@lydakis

@lydakis lydakis commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Until now no workflow ran on pull requests, and the release workflow runs only cargo test and the release script tests, so the Python runtime suite (AGENT_TEST_RUNTIME=1: replay, restart and recovery, steering, compaction, forks, approvals, triggers, lookout) was enforced by nobody.

What this adds

.github/workflows/test.yml, on every pull request and push to main, two jobs side by side on ubuntu-24.04:

  • rust: cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace (with fuse3 installed, since Sonny's SandFS task-copy tests mount through FUSE on Linux), and the release script tests.
  • runtime: cargo build --release --workspace --bins, then the whole Python suite against those binaries with AGENT_TEST_RUNTIME=1. Scripted models only: no provider key, nothing spent.

tests/run.py runs the suite's modules side by side (python -m tests.run [--jobs N] [MODULE ...], default 4), printing a module's output only when it fails. Locally (4 vCPU Linux) the 482 tests take about 14 min one module after another and about 4.5 min at 4 jobs; the longest module, test_turn_compaction, is about 150 s by itself.

Test fixes the parallel runs found

Running modules side by side found three races in the tests themselves, fixed here:

  • SocketClient connected as soon as the socket path existed. The path appears at bind, a moment before the daemon listens, so it sometimes got ConnectionRefused. Now it retries until the deadline, as the agent CLI already does.
  • test_shell_workspace_result_and_cancelled_descendants read child.pid once the file existed, before the shell had written the PID (int('')).
  • test_a_fatal_storage_failure_still_answers_admissions_queued_before_it gave the daemon 0.2 s to queue the failing write and to read 32 admissions behind a held write lock. Now 0.5 s and 1 s, which is still well inside SQLite's 5 s busy timeout.

At 8 jobs, or with Clippy running at the same time, a few more tests failed. These look like a daemon ordering gap, not a test bug: a client that has seen turn_finished (or turn_waiting) can still briefly get bot_busy from delete, or a non-zero active_turns from stats, because the event is published at commit while the dispatcher frees the slot afterwards. It isn't changed here. 4 jobs was clean in 2 of 3 local runs before the storage-failure fix, and that one failure was the storage-failure test.

Doc drift

  • README: a bot no longer "keeps its model, instructions, and tools for life". It keeps them until a client changes them with configure (Sonny does when you switch a lead's model, or when skills or memory change). "the app" is now Sonny.
  • CLI.md: --agents is "what Sonny composes for its agents", not "the default in the app".
  • SONNY.md: schedule --model is bot_exists because it only starts the cleanup agent, not because "an agent keeps its model for life".
  • RUST_PROTOTYPE.md: names the new workflow and tests.run.

Checks

  • AGENT_TEST_RUNTIME=1 python -m tests.run --jobs 4: all modules ok; the three fixed tests pass 6/6 under 4 extra busy-loop processes.
  • cargo test --locked --workspace --no-fail-fast: all 11 test binaries ok (with fuse3).
  • cargo fmt --all --check, cargo clippy --locked --workspace --all-targets -- -D warnings: clean.
  • python3 -m unittest discover -s release: ok.
  • This PR's own run of the new workflow is the first real timing on GitHub's runners.

A new Test workflow runs on every pull request and push to main. One job
checks formatting, Clippy, the workspace's Rust tests (with fuse3 for
Sonny's SandFS copies) and the release script tests. The other builds the
daemon and Sonny for release and runs the Python runtime suite with
AGENT_TEST_RUNTIME=1: replay, restart and recovery, steering, compaction,
forks, approvals, triggers and the lookout, all against scripted models.

tests/run.py runs the suite's modules side by side, four at a time,
which takes it from about 14 minutes to under 5 locally. Running it that
way surfaced three test-side races, fixed here: SocketClient connected
the moment the socket path appeared, before the daemon listened; the
interrupt test read the PID file before the shell wrote it; and the
storage-failure test gave the daemon 0.2 s to queue work behind a held
lock.

Docs: the README no longer says a bot keeps its model and instructions
for life, now that configure changes them, and no longer mentions the
deleted app; CLI.md and SONNY.md likewise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGEyw9QfZ52tbKmqDk8
@lydakis lydakis self-assigned this Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T00:40:55.477669Z 54d5570 PR opened
🔒 Security Review ✅ Completed 2026-10-28T00:41:31.715374Z 54d5570 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lydakis
lydakis merged commit 962f005 into main Oct 28, 2026
3 checks passed
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.

2 participants