Skip to content

test: cover pipeline v1 Git preflight edge cases - #863

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/regression-test-coverage-automation-efe4
Draft

test: cover pipeline v1 Git preflight edge cases#863
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/regression-test-coverage-automation-efe4

Conversation

@cursor

@cursor cursor Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Adds regression tests for remote pipeline_v1 Git Experience preflight/hydration logic merged in #856 (AIPLAT-1408). Recent merges (#856 pipeline git hydration, #835 deploy-ai-agent prompt, #859 schema sync) were inspected; the prompt and schema areas already had coverage, but several high-risk preflight branches in pipelines.ts were untested.

Risky behavior now covered

  • Incomplete git metadata: preflight finds REMOTE but cannot resolve branch/repo/path/SHAs → throws an actionable error instead of sending a doomed PUT.
  • connector_ref hydration: external Git pipelines get connector_ref stamped from the preflight GET into body.git_details.
  • camelCase GET responses: v1 preflight reads gitDetails / branchName / objectId shapes from the API.
  • base_branch mapping: create sends base_branch in body.git_details for new-branch flows.
  • Quoted booleans: is_harness_code_repo: "false" is parsed correctly (agents often quote JSON booleans).
  • Preflight GET params: caller-supplied connector_ref is forwarded into the hydration GET.

Test files added/updated

  • tests/registry/pipeline-v1-git.test.ts (+6 tests, 20 total in file)

Why these tests materially reduce regression risk

Remote pipeline updates are a core agent workflow. The preflight path silently hydrates Git lock SHAs and location fields; regressions here surface as cryptic GitX errors (No branch provided, __default__ SHA validation) that are hard to debug. These tests lock the hydration contract and the fail-fast error when hydration cannot complete.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (test coverage)

Checklist

  • pnpm test passes (3149 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes
  • pnpm docs:check passes (registry/tool counts unchanged)

Coding Standards (registry-driven MCP model)

N/A — test-only change.

Open in Web View Automation 

Add regression tests for remote pipeline_v1 update preflight: incomplete
git metadata error, connector_ref hydration, camelCase gitDetails mapping,
base_branch on create, quoted boolean parsing, and preflight GET param forwarding.

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 sign our Contributor License Agreement before we can accept your contribution.
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.

2 participants