Skip to content

test: cover PullRequestReview trigger and v1 registry schema sync#681

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-41f4
Draft

test: cover PullRequestReview trigger and v1 registry schema sync#681
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-41f4

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Adds regression contract tests for upstream harness-schema changes synced in PR #680 (chore: auto-sync harness schemas).

Risky behavior now covered

  1. GitHub PullRequestReview webhook trigger — New trigger type enum value and conditional if/then branch routing to github_pr_review_spec. A regression would silently drop support for PR review webhooks in harness_schema / harness_create trigger payloads.
  2. github_pr_review_spec actions — Validates Submitted, Edited, and Dismissed action enums plus connectorRef/repoName fields. Prevents partial or incorrect spec sync.
  3. v1 Container registry field rename — Upstream renamed registryRefregistry for Harness Artifact Registry image references in v1 pipeline/template Container definitions. A stale field name would cause agents to generate invalid v1 pipeline YAML.

Test files added/updated

  • tests/schemas/schema-bundle-contract.test.ts — 3 new contract tests following the existing upstream-sync assertion pattern.

Why these tests materially reduce regression risk

Schema sync PRs are auto-generated and touch large data files with no runtime logic changes, making diffs hard to review. These contract tests pin the three user-facing behavioral changes from the latest sync so a future revert, partial merge, or stale bundle would fail CI immediately rather than shipping incorrect schema guidance to MCP clients.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other — test coverage

Checklist

  • pnpm test passes (focused: tests/schemas/schema-bundle-contract.test.ts — 19 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes
  • pnpm docs:check passes
Open in Web View Automation 

thisrohangupta and others added 2 commits July 22, 2026 00:36
Add contract tests for upstream harness-schema changes synced in PR #680:
- PullRequestReview GitHub webhook trigger type and github_pr_review_spec
- registry field rename (replacing registryRef) in v1 Container definitions

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ thisrohangupta
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants