What the agent does
The agent lists the public API in src/lib.rs and src/eval.rs and the existing test files, then writes tests/test_proptest.rs and adds proptest = "1" to Cargo.toml, in the cfg(not(miri)) dev-dependencies beside criterion.
The properties: display and parse round trips both ways for Version, Comparator, VersionReq, Prerelease and BuildMetadata; parsing never panics on arbitrary text and prints back what it accepts; ordering is total and cmp_precedence ignores build metadata; prerelease order matches a reference implementation of the SemVer 2.0.0 rules; and *, =, >, >=, <, <=, ~ and ^ match as documented, with several comparators acting as an AND.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Write property-based tests with proptest for the core parsing and transformation functions of this library: round trips, idempotence and invariants. Run them with a high example count. Open a pull request; if a property fails, include the shrunk counterexample and do not change the library.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
Tried on dtolnay/semver at 280ebcb: 2 files changed, 282 insertions(+), one line in Cargo.toml and the 281-line test file. PROPTEST_CASES=200000 cargo test --release --test test_proptest ended test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 27.31s, and cargo test exited 0 before and after. The sandbox had no C linker, so the agent installed build-essential with apt and Rust with rustup. No pull request was opened.
For the reviewer: accept proptest and its transitive dependencies, such as rand and regex-syntax. The default stays proptest's 256 cases, so the long run needs PROPTEST_CASES. cargo fmt failed because rustfmt was not installed, and clippy was not run.
Run it on every night at 2:00 a.m. Pacific
An automation with a schedule trigger, cron 0 2 * * * and timezone America/Los_Angeles, runs this request overnight in the Project's repository. The 200,000-case pass took 27 seconds in release mode, so a night run can afford a far higher PROPTEST_CASES than a pull request check would.
The use case this job follows, with its automation and trigger: Write the missing tests.
Why run it on Rush?
No property failed, so there is no counterexample to report, and the library is unchanged. The one failure in the run was the agent's own: a prop_assume! that rejected too many generated prereleases made the first draft exit 101, and it rewrote the generator to build a non-empty prerelease directly.
Frequently asked questions
Did the change touch the library or Cargo.lock?
No. Only Cargo.toml and the new test file changed. Cargo.lock is gitignored in this repository; the run reports resolving proptest 1.12.0.
Does Miri still run?
The run put proptest under [target.'cfg(not(miri))'.dev-dependencies], the same table as criterion, and says Miri runs are unaffected. It did not run Miri itself.