docs(spec): extend auto_discovery schema with parent_types and detection fields
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 25s
CI / build (pull_request) Successful in 28s
CI / push-validation (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 1m2s
CI / security (pull_request) Successful in 1m11s
CI / typecheck (pull_request) Successful in 1m32s
CI / e2e_tests (pull_request) Successful in 3m19s
CI / unit_tests (pull_request) Successful in 5m5s
CI / docker (pull_request) Successful in 10s
CI / integration_tests (pull_request) Successful in 6m28s
CI / coverage (pull_request) Successful in 11m58s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 58m13s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 25s
CI / build (pull_request) Successful in 28s
CI / push-validation (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 1m2s
CI / security (pull_request) Successful in 1m11s
CI / typecheck (pull_request) Successful in 1m32s
CI / e2e_tests (pull_request) Successful in 3m19s
CI / unit_tests (pull_request) Successful in 5m5s
CI / docker (pull_request) Successful in 10s
CI / integration_tests (pull_request) Successful in 6m28s
CI / coverage (pull_request) Successful in 11m58s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 58m13s
The formal JSON Schema for auto_discovery in the Resource Type schema (§34650-34676) was missing three fields used by the built-in devcontainer-instance type example (§35283-35294): - parent_types: list of resource types that trigger auto-discovery - detection.scan_paths: relative paths to check for child resource presence - detection.activation: eager|lazy activation mode (default: lazy) The devcontainer-instance built-in type uses all three fields to express that it should be auto-discovered when a git-checkout resource is registered and a .devcontainer/devcontainer.json file is found. Without these fields in the formal schema, implementers could not determine the correct auto_discovery schema from the spec alone, causing the auto_discover_children() helper to use an incompatible schema. Fixes: #6291 Refs: ADR-043 (Devcontainer Integration)
This commit is contained in:
@@ -34672,6 +34672,29 @@ The following is the formal [JSON Schema](https://json-schema.org/) definition f
|
||||
<span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"array"</span>,
|
||||
<span style="color: cyan; font-weight: 600;">"items"</span>: { <span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"string"</span> },
|
||||
<span style="color: cyan; font-weight: 600;">"description"</span>: <span style="color: #66cc66;">"Glob patterns for resources to skip during discovery."</span>
|
||||
},
|
||||
<span style="color: cyan; font-weight: 600;">"parent_types"</span>: {
|
||||
<span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"array"</span>,
|
||||
<span style="color: cyan; font-weight: 600;">"items"</span>: { <span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"string"</span> },
|
||||
<span style="color: cyan; font-weight: 600;">"description"</span>: <span style="color: #66cc66;">"Resource types that trigger auto-discovery of this child type. When a resource of one of these parent types is registered, the system scans for children of this type."</span>
|
||||
},
|
||||
<span style="color: cyan; font-weight: 600;">"detection"</span>: {
|
||||
<span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"object"</span>,
|
||||
<span style="color: cyan; font-weight: 600;">"description"</span>: <span style="color: #66cc66;">"Detection configuration for child resource discovery."</span>,
|
||||
<span style="color: cyan; font-weight: 600;">"properties"</span>: {
|
||||
<span style="color: cyan; font-weight: 600;">"scan_paths"</span>: {
|
||||
<span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"array"</span>,
|
||||
<span style="color: cyan; font-weight: 600;">"items"</span>: { <span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"string"</span> },
|
||||
<span style="color: cyan; font-weight: 600;">"description"</span>: <span style="color: #66cc66;">"Relative paths (from the parent resource root) to check for the presence of this child resource type. If any path exists, a child resource is created."</span>
|
||||
},
|
||||
<span style="color: cyan; font-weight: 600;">"activation"</span>: {
|
||||
<span style="color: cyan; font-weight: 600;">"type"</span>: <span style="color: #66cc66;">"string"</span>,
|
||||
<span style="color: cyan; font-weight: 600;">"enum"</span>: [<span style="color: #66cc66;">"eager"</span>, <span style="color: #66cc66;">"lazy"</span>],
|
||||
<span style="color: cyan; font-weight: 600;">"default"</span>: <span style="color: #66cc66;">"lazy"</span>,
|
||||
<span style="color: cyan; font-weight: 600;">"description"</span>: <span style="color: #66cc66;">"When to activate the discovered child resource. 'lazy' means the child is registered but not built/started until first needed. 'eager' means the child is activated immediately at discovery time."</span>
|
||||
}
|
||||
},
|
||||
<span style="color: cyan; font-weight: 600;">"additionalProperties"</span>: <span style="color: magenta; font-weight: 600;">false</span>
|
||||
}
|
||||
},
|
||||
<span style="color: cyan; font-weight: 600;">"additionalProperties"</span>: <span style="color: magenta; font-weight: 600;">false</span>
|
||||
@@ -34903,6 +34926,9 @@ The following annotated YAML provides an easier-to-read overview of the same sch
|
||||
| `scan_depth` | integer | No | Maximum recursion depth for scanning. Default: `3`. |
|
||||
| `include_patterns` | list | No | Glob patterns for resources to discover. |
|
||||
| `exclude_patterns` | list | No | Glob patterns for resources to skip during discovery. |
|
||||
| `parent_types` | list | No | Resource types that trigger auto-discovery of this child type. When a resource of one of these parent types is registered, the system scans for children of this type. Used by built-in types such as `devcontainer-instance` (triggered by `git-checkout`). |
|
||||
| `detection.scan_paths` | list | No | Relative paths (from the parent resource root) to check for the presence of this child resource type. If any path exists, a child resource is created. Example: `[".devcontainer/devcontainer.json", ".devcontainer.json"]`. |
|
||||
| `detection.activation` | string | No | When to activate the discovered child resource. `lazy` (default) means the child is registered but not built/started until first needed. `eager` means the child is activated immediately at discovery time. |
|
||||
|
||||
**Equivalence Fields (`equivalence`) — Virtual Types Only**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user