Skip to content

feat(tests): derive splits from Depot CI matrix#540

Merged
ischolten merged 1 commit into
mainfrom
dep-5367
Jul 14, 2026
Merged

feat(tests): derive splits from Depot CI matrix#540
ischolten merged 1 commit into
mainfrom
dep-5367

Conversation

@ischolten

@ischolten ischolten commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive omitted --index and --total values from Depot CI matrix context
  • preserve explicit flag precedence and explicit --total 1 passthrough behavior
  • validate matrix-derived values while retaining unsplit tests run behavior outside split mode

Verification

  • go test ./...
  • Depot CI matrix validation

Note

Medium Risk
Changes when test splitting runs and how CI matrix jobs pick shards; mistakes in env or flag interaction could run the wrong subset of tests, though behavior without matrix env is largely unchanged.

Overview
depot tests run and depot tests split now resolve --index and --total from DEPOT_MATRIX_JOB_INDEX and DEPOT_MATRIX_JOB_TOTAL when those flags are omitted, so matrix jobs can shard without repeating shard flags. Explicit flags still win; you can mix one flag with one env value. --total 1 alone forces shard 0/1, ignores matrix index, and keeps passthrough behavior (no SplitTests, candidates optional on run).

Split mode is only enabled when total > 1 (runSplitRequested), replacing the older rule that treated any shard-related flag as a split request. Matrix env values are validated (integer parsing, index/total must be set together, same validateShard rules as flags).

Reviewed by Cursor Bugbot for commit 88f8591. Bugbot is set up for automated code reviews on this repo. Configure here.

Use Depot CI matrix position defaults when shard flags are omitted, while preserving explicit overrides and unsplit runs.
@linear-code

linear-code Bot commented Jul 13, 2026

Copy link
Copy Markdown

DEP-5367

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: Cursor Bugbot and Cursor Security Agent both completed successfully with no findings requiring human review. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@ischolten
ischolten merged commit 0b6ec98 into main Jul 14, 2026
13 checks passed
@ischolten
ischolten deleted the dep-5367 branch July 14, 2026 00:02
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.

1 participant