e-volv

CI playbook

ContractTestGenerator

Generates a passing contract test for every new endpoint added in a PR and opens a follow-up PR with the tests.

When a pull request adds a new endpoint, generates a contract test for it covering request shape, success response shape and status, documented error responses, authentication requirement, and the validation boundaries implied by the DTO, then opens a follow-up PR with the test. Runs the generated test first and only proposes it if it passes.

Identifier
contract-test-generator
Version
1.0.0
Steps
4
Triggers
1
  • contract
  • tests
  • api
  • openapi
  • quality
  • automated

When it runs

Pull requestpull_request.opened
Settle delay
20s after the event

Only when all hold

  • pullRequest.isDraft not equals true
  • actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
  • actor.username not contains [bot]

The pipeline

The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.

  1. 01
    PR Openedtrigger

    The event that starts the run.

  2. 02
    Clone Repositorygit.clone

    Shallow-clones the repository at the right ref.

  3. 03
    Generate Contract Testsagent.run

    One agent works the task with its toolkit.

  4. 04
    Publish Contract Test Reportreport.publish

    Posts or updates a deduplicated report comment.

The agent

Contract Test Generator

Base type
Senior Developer
Temperature
0.2
Max iterations
50
Tools
9

Git provider · 4

  • get_pull_request_diffGet Pull Request Diff · read
  • create_branchCreate Branch · write
  • create_or_update_fileCreate or Update File · write
  • create_pull_requestCreate Pull Request · write

Filesystem · 2

  • read_fileRead File · read
  • write_fileWrite File · write

Code search · 1

  • code_searchCode Search · read

Terminal · 1

  • run_terminal_cmdRun Terminal Command · write

Status · 1

  • update_statusUpdate Status · write