Skip to content

feat: PLA-1058 bound independent test case concurrency - #37

Merged
jeffatgametime merged 1 commit into
masterfrom
hosted-case-concurrency
Sep 15, 2026
Merged

jeffatgametime merged 1 commit into
masterfrom
hosted-case-concurrency

Conversation

@jeffatgametime

Copy link
Copy Markdown
Contributor

The following code makes an impact.

Purpose of Change

Provide bounded opt-in concurrency for independent top-level hosted test cases without parallelizing ordered steps inside a case or losing cleanup ownership.

Ticket Link

PLA-1058

Change Overview

  • Add explicit ConcurrentTest registration and copied canonical ListCases identities.
  • Introduce one reusable CaseExecutor per hosted worker, shared across packages/runs. Ordinary cases and package hooks use exclusive admission.
  • Hold admission through BeforeTest, body, sequential children, cleanup and AfterTest; propagate caller cancellation and drain admitted work before returning.
  • Retain canonical results independent of completion order and expose separate QueueDur.
  • Make native AfterPackage teardown wait for parallel children and their cleanup; preserve package-hook error diagnostics.

Stack dependency: #36 provides explicit skip/lifecycle semantics. This PR targets report-skipped-tests only while #36 is open. Do not merge this branch into that feature branch; after #36 merges, retarget to master, verify the resulting diff and rerun required checks/review.

Affected Functionality

Generic testy hosted execution and native teardown. Nil executor preserves serial-in-package behavior; size one serializes cases sharing that executor. ConcurrentTest is an explicit independence declaration, not blanket activation of legacy nested Parallel calls.

No api-tests cases are opted in by this library PR. This is a process-local bound, not a fleet-wide admission service or an exactly-once side-effect guarantee. Non-cooperative callbacks cannot be preempted.

Testing

  • Primary and independent review: go test -race ./... -count=3 -timeout=90s pass.
  • go vet ./... and git diff --check pass.
  • Matching Go 1.21.13 + golangci-lint 1.54.2 run clean.
  • Contract coverage: shared cross-package bound, permit ownership through cleanup/hooks, live exclusive case ordering, canceled queued work, partial exclusive cancellation rollback, cancellation/drain, panic/fatal/skip isolation, ordered child steps, nil/cap-one fallback, native teardown, registry snapshots and package-hook error diagnostics.
  • Independent public-API diagnostic reproduction now retains BeforePackage Errorf in the failed package result.

Observability

TestResult.QueueDur measures admission delay separately from admitted lifecycle Dur. Canonical names/results and errors remain visible. Runtime peak load, queue/phase signals and exact consumer identity must be validated in the api-tests adoption workstream; no hosted speedup is claimed here.

Rollout

Merge #36 first, retarget and verify this PR on master, then normal required review/check gates. No tag or deployment from this PR-management task. api-tests must consume the approved immutable library identity separately. Root coordinates staged worker drain and maximum replica/surge/dependency budget before enabling overlap; retain serial rollback. Hosted consumer/load acceptance remains pending on PLA-1058.

Co-Authored-By: Codex <noreply@openai.com>
Base automatically changed from report-skipped-tests to master September 15, 2026 05:05
@jeffatgametime
jeffatgametime merged commit d40ac0c into master Sep 15, 2026
2 checks passed
jeffatgametime added a commit that referenced this pull request Sep 15, 2026
Admin merge explicitly authorized by Jeff. Exact-head CI, fresh race tests repeated three times, vet, deterministic ordering/fallback contracts and Temporal replay validation passed. Parent #37 is merged and this PR targets master.

Co-Authored-By: Codex <noreply@openai.com>
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