Skip to content

Pin the Harness at f87bfbf5 and use its TokioTimer - #31

Merged
vinniefalco merged 1 commit into
cppalliance:masterfrom
vinniefalco:master
Nov 21, 2026
Merged

vinniefalco merged 1 commit into
cppalliance:masterfrom
vinniefalco:master

Conversation

@vinniefalco

@vinniefalco vinniefalco commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Workshop stops defining its own tokio timer and uses the one the Harness now has, harness_gateway_client::TokioTimer. To get it, Workshop pins the Harness at f87bfbf5, a commit of cppalliance/runvil-harness#59. Two later commits of that pull request change text only, so the pin holds all of its code.

Merge order: this pull request merges after cppalliance/runvil-harness#59. Its pin names a commit that only that pull request holds until then. The Harness merge is a fast-forward, so the commit keeps its id.

The commit

  • Pin the Harness at f87bfbf5 and use its TokioTimer. The three rev values of runvil-harness in Cargo.toml move, workshop-agents loses its timer, and the four call sites take the stock one.

What changes

  • crates/workshop/agents/src/timer.rs is deleted, and workshop_agents exports one name fewer.
  • workshop-agents names harness-gateway-client as a dev-dependency, for the fixture Host of its tests. Its tokio dependency loses the time feature, which only the timer used, and the dev-dependency gains it for the deadlines of the tests.
  • workshop-server imports TokioTimer from harness_gateway_client, a crate that it depended on already.
  • Cargo.lock changes its 14 source lines of the Harness packages and gains one line, the new dependency of workshop-agents.
  • The new pin brings in seven Harness commits. Four change text only. One adds TokioTimer, and two use it in the Harness's own tests and example. So the type is the one change to the Harness API.

Call sites

Each function that changed its timer was also left in the shortest form that the API allows:

  • run_for in the tests of workshop-agents held an eleven-line closure that served one agent, and a setup in struct update syntax. It now uses FindTextPrompt and RunSetup::new(..).has_user(true).
  • AgentSessions::new builds its Host inside the Arc.
  • run_prompt_over and the test of execute in the server's tests changed their import alone. The first has a one-line finder that serves its source under every name, and the second uses agent_finder, the code under test.

One correction beside the timer

The module doc of crates/workshop/server/src/agents.rs still said that a run's setup takes the granted roots of the workspace. #29 removed the roots and left that sentence behind. It now names the menu's pick alone.

Tests

The two test groups run 706 and 353 tests on Windows, all passing, the same counts as before. No test is added or removed, and no assertion changes.

Checks

Every command in AGENTS.md passed on the new pin, with --locked: the format check, clippy in its two groups with CARGO_BUILD_WARNINGS=deny, nextest in its two groups, the docs build with RUSTDOCFLAGS="-D warnings", cargo dylint, the structural checks, and the wording scan. The pre-push hook passed on the push.

The checks ran on Windows.

Summary by CodeRabbit

  • Refactor
    • Agent timer handling now uses the timer provided by the Gateway client. Agent host state initialization and test setup were also updated. No end-user behavior changes are specified.
  • Chores
    • Workspace components were synchronized to a newer shared revision.

`workshop-agents` defined the timer that each Host of Workshop sleeps on, `TokioTimer`. The Harness at `f87bfbf5` has that type in `harness-gateway-client`, so `timer.rs` is deleted and the four call sites import the type from there. The three `rev` values of `runvil-harness` in `Cargo.toml` move to `f87bfbf5`.

- `workshop_agents` exports one name fewer, and `workshop-agents` names `harness-gateway-client` as a dev-dependency for the fixture Host of its tests.
- The `tokio` dependency of `workshop-agents` loses the feature `time`, which its comment in the manifest gave to the timer. The dev-dependency gains `time`, for the deadline that the tests set on each wait.
- `run_for` in `support.rs` takes its finder from `FindTextPrompt`, where it held a closure that served one agent. It builds its setup with `has_user(true)`, where it used struct update syntax.
- The closure failed a find for another name with the message `no agent named {name}`. The stock finder now answers such a find, and no assertion changes with it.
- The `new` of `AgentSessions` builds its `Host` inside the `Arc`, where it built the `Host` first and wrapped it as it filled `Inner`.
- The module doc of `agents.rs` said that the setup of a run takes the granted roots of the workspace beside the pick of the menu. It now names the pick alone. The diff changes only that sentence for it, and no code.
- `Cargo.lock` changes its 14 `source` lines of the Harness packages and gains one line, the new dependency of `workshop-agents`.
- No test is added or removed.
Copilot AI balanced review requested due to automatic review settings November 21, 2026 03:01

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The agents crate removes its TokioTimer type and public re-export. Agent tests and server code now import TokioTimer from harness-gateway-client. The changes also update dependency features, prompt setup, dependency pins, and Host storage in AgentSessions.

Changes: Gateway timer and agent integration

Layer / File(s) Summary
Move timer ownership to the Gateway client
Cargo.toml, crates/workshop/agents/Cargo.toml, crates/workshop/agents/src/*
The agents crate removes TokioTimer and its public re-export. Tokio’s runtime and development features are adjusted, and harness-gateway-client is added as a development dependency. The three workspace dependency pins change to revision f87bfbf5155dae6b8b6ed2752b29fb91ac29c182.
Update agent test fixtures
crates/workshop/agents/tests/it/support.rs
The fixture imports TokioTimer and FindTextPrompt from harness-gateway-client. run_for uses FindTextPrompt::new and RunSetup::has_user(true).
Update server agent wiring
crates/workshop/server/src/agents.rs, crates/workshop/server/src/agents/tests.rs
Server code and tests import TokioTimer from harness-gateway-client. AgentSessions::new constructs and stores Arc<Host> directly. Agent subsystem documentation is updated.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • cppalliance/runvil-workshop#30: PR #30 updates the same dependency pins and edits the same test fixture files. This PR changes the pin revision introduced by #30.
Merge Risk: Minimal · up to 4666b

This swaps an internal timer for the equivalent upstream type and updates dependency pins, with no intended behavior change. Merge it after the upstream Harness PR it depends on has landed.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two main changes: pinning the Harness dependency to commit f87bfbf5 and switching Workshop's timer to the Harness's TokioTimer. The raw summary confirms the revision bump in Cargo.…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the two main changes: pinning the Harness dependency to commit f87bfbf5 and switching Workshop's timer to the Harness's TokioTimer. The raw summary confirms the revision bump in Cargo.toml, the deletion of timer.rs, and the TokioTimer import change in the server and test files. The title matches the main change and does not describe anything absent from the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c5c3773e-c68f-441f-a96c-2a22ad238267
Commits

Reviewing files that changed from the base of the PR and between 9fb795e and 4666b17.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 7

  • Cargo.toml
  • crates/workshop/agents/Cargo.toml
  • crates/workshop/agents/src/lib.rs
  • crates/workshop/agents/src/timer.rs
  • crates/workshop/agents/tests/it/support.rs
  • crates/workshop/server/src/agents.rs
  • crates/workshop/server/src/agents/tests.rs
Files with no reviewable changes: 1

  • crates/workshop/agents/src/timer.rs

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The pinned upstream implementation is unavailable in this snapshot, so approval requires confirming that cppalliance/runvil-harness#59 has merged and verifying the replacement timer’s contract.

No open issues 🎉

What changed in this PR

Workshop replaces its local timer with the Harness-provided TokioTimer, pinning the Harness at f87bfbf5. This PR depends on cppalliance/runvil-harness#59 merging first.

Changes:

  • Update the three Harness dependency pins and corresponding lockfile entries.
  • Remove Workshop’s timer implementation and use harness_gateway_client::TokioTimer in production and tests.
  • Simplify Host and test setup, and correct stale documentation about workspace roots removed in #29.
File Description
crates/​workshop/​server/​src/​agents/​tests.rs Import the Harness timer for server tests.
crates/​workshop/​server/​src/​agents.rs Use the Harness timer, simplify Host construction, and update documentation.
crates/​workshop/​agents/​tests/​it/​support.rs Use the Harness timer and simplify fixture setup.
crates/​workshop/​agents/​src/​timer.rs Delete the local timer implementation.
crates/​workshop/​agents/​src/​lib.rs Remove the timer export and update crate documentation.
crates/​workshop/​agents/​Cargo.toml Add the test timer dependency and move Tokio’s time feature to dev-dependencies.
Cargo.toml Pin all three Harness dependencies to the same new commit.
Cargo.lock Record the updated Harness sources and agents test dependency.

Review effort: Balanced

@vinniefalco
vinniefalco merged commit 4666b17 into cppalliance:master Nov 21, 2026
17 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