Skip to content

fix: make CDM instance discovery concurrency safe - #234

Open
k-rister wants to merge 1 commit into
masterfrom
codex/cdm-instance-discovery-concurrency
Open

k-rister wants to merge 1 commit into
masterfrom
codex/cdm-instance-discovery-concurrency

Conversation

@k-rister

Copy link
Copy Markdown
Contributor

Summary

Validation

  • npm test
  • npm run test:instance-discovery
  • node node_modules/prettier/bin/prettier.cjs --config .prettierrc.toml --check cdm.js test/get-instances-info.test.js
  • Restarted the local CDM server with the patch and completed 100 concurrent read-only /api/v1/runs requests successfully.

— AI-signed: Codex | model: gpt-6.1-sol | effort: not specified | contribution: diagnosed the failure, implemented the fix and regression test, and ran validation.

Scope the instance discovery loop variable so overlapping CDM requests cannot share loop state. Add a deterministic regression test that overlaps two discovery calls.

Fixes #233

AI-Tool: Codex

AI-Model: gpt-6.1-sol

AI-Effort: not specified
@k-rister k-rister self-assigned this Nov 19, 2026
@k-rister
k-rister requested a review from a team November 19, 2026 21:57
@project-crucible-tracking project-crucible-tracking Bot moved this to In Progress in Crucible Tracking Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

CDM instance discovery is not safe for overlapping requests

1 participant