Repository navigation
Gate pull requests on the Rust tests and the runtime suite - #246
Merged
Merged
Conversation
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
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 28, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Until now no workflow ran on pull requests, and the release workflow runs only
cargo testand 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 onubuntu-24.04:cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace(withfuse3installed, since Sonny's SandFS task-copy tests mount through FUSE on Linux), and the release script tests.cargo build --release --workspace --bins, then the whole Python suite against those binaries withAGENT_TEST_RUNTIME=1. Scripted models only: no provider key, nothing spent.tests/run.pyruns 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:
SocketClientconnected as soon as the socket path existed. The path appears atbind, a moment before the daemon listens, so it sometimes gotConnectionRefused. Now it retries until the deadline, as theagentCLI already does.test_shell_workspace_result_and_cancelled_descendantsreadchild.pidonce the file existed, before the shell had written the PID (int('')).test_a_fatal_storage_failure_still_answers_admissions_queued_before_itgave 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(orturn_waiting) can still briefly getbot_busyfromdelete, or a non-zeroactive_turnsfromstats, 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
configure(Sonny does when you switch a lead's model, or when skills or memory change). "the app" is now Sonny.--agentsis "what Sonny composes for its agents", not "the default in the app".schedule --modelisbot_existsbecause it only starts the cleanup agent, not because "an agent keeps its model for life".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.