Skip to content

fix(studio): isolate concurrent experiment run ownership - #180

Open
U1oSun wants to merge 1 commit into
QoderAI:mainfrom
U1oSun:fix/experiment-run-ownership
Open

U1oSun wants to merge 1 commit into
QoderAI:mainfrom
U1oSun:fix/experiment-run-ownership

Conversation

@U1oSun

@U1oSun U1oSun commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Reserve experiment IDs before asynchronous preflight. Concurrent same-ID requests now receive one 200 and one 409, with only one runner. Cleanup releases only its own controller. Cancelled or disconnected preflight requests cannot start a runner.

Why

Focused concurrency fix: duplicate requests previously shared output directories and overwrote cancellation ownership. No issue is being closed.

Traceability and Scope

Spec: docs/specs/2026-09-17-experiment-run-ownership.md (AC-1 through AC-4).
Owners: Studio experiment routing and server integration tests.
Non-goals: cross-process locks, queues, scheduling, schema changes, or serializing different IDs.

Change Type

  • Bug fix

Test and Review Evidence

Windows Node 22.20.0 and npm 10.9.3.

  • Real HTTP preflight race failed against old code (200/200).
  • Ownership regressions: 5 passed, independently rerun.
  • Server tests: 61 passed.
  • Studio build and tests: 736 passed, 1 skipped.
  • Typecheck passed; doc-link tests 8 passed.
  • Package verification passed: 735 npm entries, 996 runtime entries.
  • Root suite: 1767 passed, 1 unchanged local DSH baseline failure, 8 skipped.
  • Independent agent review: no unresolved P1/P2.
  • Core CI for this commit on the previously closed PR fix(studio): isolate concurrent experiment run ownership #179 passed all four jobs across Windows, macOS and Linux. Desktop checks were still running when last checked.
  • Local preview could not start because Canvas SDK was unavailable. No UI changed.

Risk and Recovery

Ownership is in-process and retained until preflight or the runner settles. No stored-data migration is required. Revert the commit to restore prior behavior.

AI Involvement

Level: Assisted. Implementation and independent review used GPT-5.6 agents.

Checklist

  • Focused source, tests and spec only.
  • Documentation and package boundaries checked.
  • Cross-platform behavior verified by core CI.
    Changelog unchanged under AGENTS.md scope rules.

Reserve experiment ids before asynchronous preflight and release only the
owning controller. Cancelled or disconnected preflight requests cannot start
a runner, and failed or settled requests leave the id available for retry.

Implements docs/specs/2026-09-17-experiment-run-ownership.md. A real HTTP
preflight barrier reproduced two successful requests before the fix. Server
tests passed 61, Studio tests passed 736 with one skip, and typecheck,
doc-link and package verification passed. The root suite retained one
unrelated local DSH baseline failure.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@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