Skip to content

test: cover Code file scope forwarding and schema sync contracts#610

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-f39f
Draft

test: cover Code file scope forwarding and schema sync contracts#610
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-f39f

Conversation

@cursor

@cursor cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Description

Adds regression tests for recently merged production changes that lacked dedicated coverage:

Risky behavior now covered

  1. Code file scope forwarding (Forward Code scope for file content APIs #602)file_content get and blame must forward orgIdentifier/projectIdentifier query params. Without them, Harness Code silently resolves repos at account scope, returning wrong or empty content for org/project-scoped repositories.

  2. Schema sync bundle contracts (chore: auto-sync harness schemas #584, chore: auto-sync harness schemas #567) — Auto-synced upstream definitions must remain bundled and discoverable:

    • v0 DeployAwsAgentCoreRevision step node/info
    • v0 IdentitiesConfig / IdentitySpec (OIDC identity map with maxProperties guard)
    • v1 DynamicStageNodeV1 unified stage (dynamic child-pipeline execution)
  3. harness_schema nested path resolution — Agents rely on bare-name lookup (DeployAwsAgentCoreRevisionStepNode, IdentitiesConfig, DynamicStageNodeV1). Missing definitions break pipeline authoring workflows silently.

Test files added/updated

File Change
tests/registry/repositories-file-scope.test.ts New — dispatch contract for file_content get + blame scope params
tests/schemas/schema-bundle-contract.test.ts Bundle presence/shape assertions for synced definitions
tests/tools/harness-schema-tool.test.ts Path resolution regression for new schema nodes

Why these tests materially reduce regression risk

  • Forward Code scope for file content APIs #602 was a production-only fix with no accompanying test — a future refactor to queryParams mapping would re-break scoped file reads with no CI signal.
  • Schema auto-sync PRs are large generated diffs; contract tests catch accidental drops or namespace rewrites that break harness_schema discovery.
  • All tests are deterministic unit tests with mocked HTTP — no flakiness or environment dependencies.

Type of Change

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

Checklist

  • pnpm test passes (targeted: 43 tests in 3 files)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes
  • pnpm docs:check passes
Open in Web View Automation 

Add regression tests for recently merged production changes:

- file_content get/blame must forward orgIdentifier/projectIdentifier (#602)
- v0 DeployAwsAgentCoreRevision and IdentitiesConfig schema bundle (#584)
- v1 DynamicStageNodeV1 unified stage definitions (#567)
- harness_schema nested path resolution for the new 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 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