feat(canvas): per-workspace provision_timeout_ms override (#2054 phase 1) - #2092
Merged
HongmingWang-Rabbit merged 2 commits intoApr 26, 2026
Merged
Conversation
Phase 1 of moving runtime UX knobs server-side. Builds the canvas
foundation: a workspace can carry its own provision_timeout_ms
(sourced server-side from a template manifest in a follow-up PR),
and ProvisioningTimeout's resolver respects it per-node.
Today the resolver had Props-level timeoutMs that applied to ALL
nodes — fine for tests but wrong for production where one batch
could mix runtimes (hermes 12-min cold boot alongside docker 2-min).
The runtime profile fallback already handles per-runtime defaults;
this PR adds the per-WORKSPACE override layer above that.
Resolution priority (most specific wins):
1. node.provisionTimeoutMs — server-declared per-workspace
override (this PR's new field)
2. timeoutMs prop — single-threshold test override
3. runtime profile in @/lib/runtimeProfiles
4. DEFAULT_RUNTIME_PROFILE
Changes:
- WorkspaceData (socket): add optional provision_timeout_ms
- WorkspaceNodeData: add optional provisionTimeoutMs
- canvas-topology hydrate: thread the field through to node.data
- ProvisioningTimeout: extend the serialized-string node iteration
to carry provisionTimeoutMs (4-field positional split); pass as
the second arg to provisionTimeoutForRuntime
- 3 new tests in ProvisioningTimeout.test.tsx covering hydrate
threading, null fall-through, and resolver priority
Phase 2 (separate PR, blocked on workspace-server template-config
loader): workspace-server reads provision_timeout_seconds from
template config.yaml at provision time, includes
provision_timeout_ms in the workspace API/socket response. Phase 3
(template-repo PR): template-hermes config.yaml declares
provision_timeout_seconds: 720; canvas RUNTIME_PROFILES.hermes
becomes redundant and can be removed.
19/19 tests pass (3 new + 16 existing).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…zed-node string simplify-review note: the |/,-delimited node string is brittle if a future string-typed field is added without sanitization. Document which fields are user-typed (name — already sanitized) vs primitive (id is UUID, runtime is a slug, provisionTimeoutMs is numeric) so the next field-add doesn't accidentally introduce an injection vector for the splitter. Skipped (false-positive review finding): the agent flagged the prop > runtime-profile order as inconsistent with the docstring, but the docstring explicitly lists the prop at #2 (between node and runtime-profile) — matches both the implementation AND the original behavior pre-#2054 (the prop was 'timeoutMs ?? runtime-profile'). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 26, 2026
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.
[Molecule-Platform-Evolvement-Manager]
Phase 1 of #2054 — build the canvas foundation that lets a workspace carry its own `provision_timeout_ms` from a server-side source (e.g. template manifest), so a slow runtime can declare its cold-boot expectation without a canvas release.
Today's gap
`ProvisioningTimeout.tsx:144` resolved the timeout via:
```ts
const base = timeoutMs ?? provisionTimeoutForRuntime(node.runtime);
```
`timeoutMs` was a single Props-level value that applied to all nodes — fine for tests but wrong for production where a batch can mix runtimes (hermes 12-min cold-boot alongside docker 2-min). The runtime profile fallback already handled per-runtime defaults; the missing layer was per-WORKSPACE override above that.
Fix (resolution priority, most specific wins)
Changes
Tests (3 new — 19 total)
19/19 pass locally.
Phases
Test plan