Skip to content

Stabilize provider API-key capture test - #1053

Merged
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1052-provider-key-capture-sync
Jul 31, 2026
Merged

Stabilize provider API-key capture test#1053
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1052-provider-key-capture-sync

Conversation

@dennisonbertram

@dennisonbertram dennisonbertram commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Closes #1052

Related: #1000, #1047, #1051, #1062

Summary

  • synchronize the API-key capture test on direct provider-factory invocation instead of full HTTP readiness
  • preserve the exact captured-key assertion, interrupt delivery, and bounded graceful-shutdown proof
  • supersede the later 10-second HTTP readiness mitigation from [Bug]: Provider API key matrix health wait expires under race contention #1062 with synchronization on the contract this test actually owns
  • keep the change test/docs-only; production startup, provider, health, and shutdown semantics are unchanged

Why

TestMatrix_ProviderAPIKeyCapture verifies that OPENAI_API_KEY reaches the injected provider factory. Waiting for the entire HTTP server to become healthy made that unit contract depend on scheduler, watcher, persistence, listener, and HTTP startup timing. The injected factory now signals after it stores the captured key, so the assertion waits on the behavior under test.

This is an independently evidenced baseline repair. It is being promoted before retrying the cron/callback merge chain; it is not being claimed as the proven cause of a later production-gate failure whose exact test output was lost.

Verification on rebased head

Exact head: 3384616a8598a7fb73638220601a4a7d24c9eced

Rebased onto: 7a1d257ce79fb71866b2ef7beff1d7ea3387e64e

  • expected-red direct signal timeout before the provider factory emitted the signal
  • go test ./cmd/harnessd -run '^TestMatrix_ProviderAPIKeyCapture$' -count=100 — PASS
  • go test -race ./cmd/harnessd -run '^TestMatrix_ProviderAPIKeyCapture$' -count=100 — PASS
  • ./scripts/test-regression.sh — PASS
    • normal suite — PASS
    • race suite — PASS
    • coverage gate — PASS (85.6%, zero-functions=0)
  • git diff --check origin/main...HEAD — PASS

The old hosted race failure on the stale head was unrelated (TestExecuteLifecycle_WaitForUserFlowEventOrderAndStateRestoration). Hosted checks will rerun on this exact rebased head.

Rollout and rollback

This changes test synchronization only. Rollback is a normal revert; no runtime data, schema, or deployment migration is involved.

@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@dennisonbertram

Copy link
Copy Markdown
Owner Author

Exact tested head: ec1109d. @codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: ec1109dc19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dennisonbertram
dennisonbertram force-pushed the codex/issue-1052-provider-key-capture-sync branch from ec1109d to 3384616 Compare July 31, 2026 21:39
@dennisonbertram
dennisonbertram merged commit 3384616 into main Jul 31, 2026
2 checks passed
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.

[Bug]: Provider API-key capture test depends on unrelated 3-second server readiness

1 participant