fix(studio): isolate concurrent experiment run ownership - #180
Merged
Merged
Conversation
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>
Windows and Linux desktop smoke spawn esbuild-wasm's worker from inside app.asar, where plain Node cannot read bin/esbuild, so AgentReact preview stops. Load the engine from app.asar.unpacked on the live linker, the artifact compiler, and trusted renderer compilation. The config contract test now expects appsHostEnabled, and plural parity accepts an i18next _one key beside _other. Studio tests passed 743 and typecheck passed. Co-authored-by: Grok (Grok 4.7) <grok@x.ai>
phodal
force-pushed
the
fix/experiment-run-ownership
branch
from
September 22, 2026 03:47
1ea5ef4 to
95d1f52
Compare
cordis-plugin-group 1.0.3, published 2026-09-22, peers on cordis ^4.0.3. The exact 4.0.2 pin failed npm install with ERESOLVE before either native smoke could run. Both pins now track that floor. DSH owners stay at 0.1.1-rc.2. A dry resolve at 4.0.2 still ERESOLVEs. At 4.0.3 the install selects cordis 4.0.3 and cordis-plugin-group 1.0.3. test:dsh-native reports discovery verified, and test:dsh-configured-assets-native reports both native-dsh and better-harness-comparison pass. Spec: docs/specs/2026-09-22-dsh-native-smoke-cordis-peer-floor.md Co-authored-by: Grok (Grok 4.7) <grok@x.ai>
Studio depends on private @qoder-ai/harness-studio-apps, which is not on the npm registry. Desktop staging only packed harness and harness-studio, so the production install 404ed before Electron packaging. Pack the apps host tarball into the same install. Local stage completed and the staged app resolves @qoder-ai/harness-studio-apps/server. Spec: docs/specs/2026-09-22-desktop-stage-studio-apps.md Co-authored-by: Grok (Grok 4.7) <grok@x.ai>
The file-viewer effect and its props memo ran only after the catalog arrived, so React saw a new hook on the second render and unmounted the page. Desktop smoke then never found the artifact row, and the browser artifact suite waited on a tab that never mounted. Both hooks now run on every render, and a disabled app is not mounted because its UI bundle is not served. Local desktop smoke passed, including the native AgentReact preview. Co-authored-by: Grok (Grok 4.7) <grok@x.ai>
The default last-30-day window no longer contains the August 2026 fixture sessions, so the artifact catalog dropped a row and the Inspector calendar had no days. Stamp those sessions relative to today. End in the sidebar now lands on Components, which is the last View. The four previously failing browser tests passed locally. Co-authored-by: Grok (Grok 4.7) <grok@x.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Test and Review Evidence
Windows Node 22.20.0 and npm 10.9.3.
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
Changelog unchanged under AGENTS.md scope rules.