Commit 8343b8d
committed
M3.16: read substrate_actor_template from public-API annotations path
The driver's template_name_from_spec previously only checked
platform_config["substrate_actor_template"] at the top level. That key
is reachable from in-process callers (and tests/live.rs), but the
public OpenShell.v1.OpenShell.CreateSandbox path has no surface for
it: the gateway's build_platform_config (compute/mod.rs:1333) maps
SandboxTemplate.annotations into platform_config["annotations"] (a
nested Struct), runtime_class_name into a top-level key,
volume_claim_templates into another, etc. — none of which leave room
to inject a substrate-specific opaque value at the top.
This makes the driver's pre-provisioned-template path inaccessible to
gateway-shaped clients, which is exactly the path the helpdesk demo
needs (the synthesis path hardcodes a sleep loop as the child
workload, incompatible with running a Python helpdesk agent).
Extend template_name_from_spec to also look at
platform_config["annotations"]["substrate_actor_template"]
so public-API callers can request a pre-provisioned template via:
SandboxTemplate.annotations["substrate_actor_template"] = "helpdesk-agent"
The top-level key remains the primary path (driver-internal callers
preserve compatibility); the annotation fallback is checked only when
the top-level key is absent.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>1 parent 917e969 commit 8343b8d
1 file changed
Lines changed: 34 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
673 | 683 | | |
674 | 684 | | |
675 | 685 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
680 | 705 | | |
| 706 | + | |
681 | 707 | | |
682 | 708 | | |
683 | 709 | | |
| |||
0 commit comments