Skip to content

#19: let projects replace the simulated user - #64

Merged
deyna256 merged 2 commits into
mainfrom
19
Dec 1, 2026
Merged

deyna256 merged 2 commits into
mainfrom
19

Conversation

@deyna256

@deyna256 deyna256 commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Problem

Models.user accepted only a chat model, while convy fixed the simulated user's prompt, opening, history format and stop marker. Projects could not provide scripted users, replay real dialogues or replace the user policy and API. Fakes also had to know the internal ###STOP### marker.

Changes

  • Add the public User contract: a behavior-identifying name and async next(transcript, instructions) returning Message or UserFinished.
  • Keep SimulatedUser(model) as the built-in implementation with its existing prompt, opening, role mapping, stripping and substring stop rule.
  • Add FakeUser and make the executable Python guide finish through UserFinished, without the internal marker.
  • Let Scenario hide answer steps, validate custom user results and attribute user failures to NoVerdict / model_failure, not the agent. Existing Places provide user concurrency, pacing and Busy retries.
  • Validate user implementations while loading models.py, record their names in runs and cover scripted and transcript-driven replay through Scenario, Bench and CLI.
  • Remove the obsolete Contained, PatientModel and dialogue-level Finished paths.
  • Add ADR 0015, a user guide, updated templates/examples/docs and the issue's changelog fragment.

Validation

  • just format, just lint and just type pass.
  • just test: 630 passed, 1 skipped. Tests cover the User contract, built-in behavior, custom and concurrent replay users, malformed results, failure attribution, busy services, project validation and CLI recording. No real model or agent is called.
  • just changelog and just build pass.
  • Two independent read-only reviews covered architecture, correctness, clarity, simplicity and DRY. Their attribution, diagnostics, documentation and test findings were addressed, followed by the full check suite again.

Closes #19

@deyna256 deyna256 self-assigned this Dec 1, 2026
@deyna256
deyna256 merged commit adda5e8 into main Dec 1, 2026
6 checks passed
@deyna256
deyna256 deleted the 19 branch December 1, 2026 11:04
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.

The simulated user cannot be replaced

1 participant