Skip to content

Fix repeated default registry contract tests - #1043

Merged
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1042-default-registry-repeat
Jul 31, 2026
Merged

Fix repeated default registry contract tests#1043
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1042-default-registry-repeat

Conversation

@dennisonbertram

Copy link
Copy Markdown
Owner

Closes #1042

Related: #1000, #1039, #1040

What changed

  • give each TestDefaultRegistry_Functions invocation a process-local atomic identity
  • preserve the same-name duplicate-registration assertion inside each invocation
  • document the TDD evidence and cross-surface impact

Verification

  • focused normal test at -count=100
  • focused race test at -count=100
  • complete internal/workspace package normal and race at -count=5
  • ./scripts/test-regression.sh (normal, race, coverage 85.6%, zero uncovered functions)

@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

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6fe75f195e

ℹ️ 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".

const implName = "test-default-impl-unique-12345"
// The default registry intentionally persists for the process lifetime, so
// each `-count` invocation must own a distinct name.
implName := fmt.Sprintf("test-default-impl-%d", defaultRegistryTestSequence.Add(1))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate the repeated invocation regression

Add an automated repeat case to a required test path. I checked .github/workflows/test-fast.yml and .github/workflows/test-regression.yml; both ultimately run this package with go test without -count, so replacing this generated name with the original fixed name would still pass every checked-in gate and the defect would recur whenever a developer manually repeats the suite. Encode at least two invocations in a permanent regression test or make the repeat command part of the gate.

AGENTS.md reference: AGENTS.md:L55-L55

Useful? React with 👍 / 👎.

@dennisonbertram

Copy link
Copy Markdown
Owner Author

Reverification after rebase

  • Base: origin/main = b3afc7ec487c60762a91a1219ceb92c523ef0e78 (includes Fix AskUserQuestion status regression test race #1045).
  • Exact pushed head: 1d566877ab1978ed9178c10d7ee9bddf5394f5b9.
  • Production registry: internal/workspace/registry.go unchanged.
  • Focused normal: go test ./internal/workspace -run '^TestDefaultRegistry_Functions$' -count=100 — PASS.\n- Focused race: go test -race ./internal/workspace -run '^TestDefaultRegistry_Functions$' -count=100 — PASS.\n- Complete package: go test ./internal/workspace -count=5 and go test -race ./internal/workspace -count=5 — PASS.\n- Full gate: unchanged ./scripts/test-regression.sh in foreground non-TTY — PASS; normal, full race, coverage-instrumented tests, and coveragegate: PASS (total=85.6%, min=80.0%, zero-functions=0).\n- Contract retained: first registration, duplicate rejection, listing, and construction/provisioning assertions.\n\nNo merge was performed. One earlier full-gate invocation had a nonzero coverage-phase test exit; the exact unchanged gate was rerun to a clean pass, and no independent reproducible bug remained to map.

@dennisonbertram

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 1d566877ab

ℹ️ 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-1042-default-registry-repeat branch from 1d56687 to 4e5e462 Compare July 31, 2026 07:29
@dennisonbertram

Copy link
Copy Markdown
Owner Author

Reverification after rebase onto merged #1063/#1062

  • Base: origin/main = 8906149e29f5d1b93860ab7b88f860a668fd890d.
  • Exact pushed head: 4e5e462d0a35db705356041337d93c5e861be5bf.
  • Scope: unchanged six-file test-only PR diff; internal/workspace/registry.go remains unchanged.
  • Documentation preserved: [Bug]: Provider API key matrix health wait expires under race contention #1062 entries from current main and [Bug]: Default workspace registry test is not repeatable in one process #1042 plan/log entries are both present.
  • Focused normal: go test ./internal/workspace -run '^TestDefaultRegistry_Functions$' -count=100 — PASS.\n- Focused race: go test -race ./internal/workspace -run '^TestDefaultRegistry_Functions$' -count=100 — PASS.\n- Full gate: unchanged ./scripts/test-regression.sh in foreground non-TTY — PASS; normal, full race, coverage-instrumented tests, and coveragegate: PASS (total=85.6%, min=80.0%, zero-functions=0).\n\nNo merge was performed.

@dennisonbertram

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 4e5e462d0a

ℹ️ 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-1042-default-registry-repeat branch from 4e5e462 to d8bb245 Compare July 31, 2026 07:41
@dennisonbertram

Copy link
Copy Markdown
Owner Author

Rebuild and reverification after #1066 landed

@dennisonbertram

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: d8bb245168

ℹ️ 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-1042-default-registry-repeat branch from d8bb245 to f3fb4d8 Compare July 31, 2026 07:59
@dennisonbertram

Copy link
Copy Markdown
Owner Author

Rebuild and reverification after #1041 landed

@dennisonbertram

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: f3fb4d8e91

ℹ️ 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 merged commit f3fb4d8 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]: Default workspace registry test is not repeatable in one process

1 participant