diff --git a/.devcontainer/arduino/devcontainer.json b/.devcontainer/arduino/devcontainer.json index c6d72d8..4ea4fe6 100644 --- a/.devcontainer/arduino/devcontainer.json +++ b/.devcontainer/arduino/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "pipx install platformio && node scripts/prepare-demo.mjs arduino && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/cargo/devcontainer.json b/.devcontainer/cargo/devcontainer.json index f5a8e9c..d013f3d 100644 --- a/.devcontainer/cargo/devcontainer.json +++ b/.devcontainer/cargo/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": ".devcontainer/cargo/setup.sh && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/cocoapods/devcontainer.json b/.devcontainer/cocoapods/devcontainer.json index 68121e6..46f3500 100644 --- a/.devcontainer/cocoapods/devcontainer.json +++ b/.devcontainer/cocoapods/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "gem install cocoapods --no-document && node scripts/prepare-demo.mjs cocoapods && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/conan/devcontainer.json b/.devcontainer/conan/devcontainer.json index 623b86e..1190772 100644 --- a/.devcontainer/conan/devcontainer.json +++ b/.devcontainer/conan/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "pipx install conan && node scripts/prepare-demo.mjs conan && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/go/devcontainer.json b/.devcontainer/go/devcontainer.json index 5058d2c..c3f0ad8 100644 --- a/.devcontainer/go/devcontainer.json +++ b/.devcontainer/go/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs go && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/hex/devcontainer.json b/.devcontainer/hex/devcontainer.json index 9f9969e..56b8d02 100644 --- a/.devcontainer/hex/devcontainer.json +++ b/.devcontainer/hex/devcontainer.json @@ -16,7 +16,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs hex && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/maven/devcontainer.json b/.devcontainer/maven/devcontainer.json index 0455ba1..fb36e0f 100644 --- a/.devcontainer/maven/devcontainer.json +++ b/.devcontainer/maven/devcontainer.json @@ -19,7 +19,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs maven && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/npm/devcontainer.json b/.devcontainer/npm/devcontainer.json index 42e3a65..27c83ee 100644 --- a/.devcontainer/npm/devcontainer.json +++ b/.devcontainer/npm/devcontainer.json @@ -10,7 +10,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs npm && npm --prefix demos/npm install --no-audit --no-fund && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/nuget/devcontainer.json b/.devcontainer/nuget/devcontainer.json index 114c495..b70bd9f 100644 --- a/.devcontainer/nuget/devcontainer.json +++ b/.devcontainer/nuget/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs nuget && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/opam/devcontainer.json b/.devcontainer/opam/devcontainer.json index c5b7c50..ccbe3b5 100644 --- a/.devcontainer/opam/devcontainer.json +++ b/.devcontainer/opam/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs opam && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/packagist/devcontainer.json b/.devcontainer/packagist/devcontainer.json index 0a4b884..275c81c 100644 --- a/.devcontainer/packagist/devcontainer.json +++ b/.devcontainer/packagist/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs packagist && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/pub/devcontainer.json b/.devcontainer/pub/devcontainer.json index b555801..c07e87d 100644 --- a/.devcontainer/pub/devcontainer.json +++ b/.devcontainer/pub/devcontainer.json @@ -16,7 +16,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs pub && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/pypi/devcontainer.json b/.devcontainer/pypi/devcontainer.json index ba2b3ca..8fc7e5f 100644 --- a/.devcontainer/pypi/devcontainer.json +++ b/.devcontainer/pypi/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs pypi && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/rubygems/devcontainer.json b/.devcontainer/rubygems/devcontainer.json index 9cac847..8bc1289 100644 --- a/.devcontainer/rubygems/devcontainer.json +++ b/.devcontainer/rubygems/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs rubygems && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/swift/devcontainer.json b/.devcontainer/swift/devcontainer.json index 28794b0..d12b52b 100644 --- a/.devcontainer/swift/devcontainer.json +++ b/.devcontainer/swift/devcontainer.json @@ -16,7 +16,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs swift && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/vcpkg/devcontainer.json b/.devcontainer/vcpkg/devcontainer.json index 4c82aec..514b7a0 100644 --- a/.devcontainer/vcpkg/devcontainer.json +++ b/.devcontainer/vcpkg/devcontainer.json @@ -15,7 +15,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs vcpkg && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "sleep 10 && drift analyze < /dev/null", + "postAttachCommand": "drift analyze < /dev/null", "customizations": { "vscode": { "extensions": [ diff --git a/scripts/lib/devcontainer-spec.mjs b/scripts/lib/devcontainer-spec.mjs index 1d0eb7c..5483ed8 100644 --- a/scripts/lib/devcontainer-spec.mjs +++ b/scripts/lib/devcontainer-spec.mjs @@ -132,24 +132,18 @@ export function buildDevcontainer(demo, allDemos) { // a GitHub issue or cut a branch for it, and here that parked the startup // terminal on a question, flagged it as needing attention, and left the // visitor one keypress from opening an issue on this repository. - // The sleep is about Workspace Trust, not about Drift. - // - // A Codespace can attach before trust has settled. Creating a terminal - // counts as executing code, so a terminal that starts in that window makes - // VS Code ask "Do you trust the authors of the files in this folder?" — and - // while that modal stands nothing else happens: the extension declares no - // untrusted-workspace support, so there is no panel, no analysis and no - // terminal until somebody answers it. Two of three Codespaces opened on - // 2026-09-11 hit exactly that; the one that did not had simply attached - // more slowly. - // - // There is no settings-based fix: `security.workspace.trust.*` is - // user-scope by design and is ignored from devcontainer, remote and - // workspace settings, which an earlier attempt here got wrong. So the - // terminal waits instead, which costs the demo ten seconds it was already - // spending on the first analysis, and DEMO.md says what to click if the - // question appears anyway. - postAttachCommand: 'sleep 10 && drift analyze < /dev/null', + // A fresh Codespace on this repository opens *untrusted*, and nothing here + // can change that. Creating a terminal counts as executing code, so this + // command is what makes VS Code ask "Do you trust the authors of the files + // in this folder?", and until the visitor answers there is no panel, no + // analysis and no terminal: the extension declares no untrusted-workspace + // support. Two attempts to configure the question away failed and were + // reverted — `security.workspace.trust.*` is user-scope by design and + // ignored from devcontainer settings, and delaying the terminal only moved + // the same modal later (four fresh Codespaces on 2026-09-11, all four + // prompted). So the terminal starts immediately, the question arrives at + // once rather than after a confusing pause, and DEMO.md says what to click. + postAttachCommand: 'drift analyze < /dev/null', customizations: { vscode: { extensions: ['drift.usedrift'],