Repository navigation
docs(spec): define gRPC and CLI apply surface for ADLC Kinds - #468
hypershell-builder[bot] wants to merge 1 commit into
Conversation
Refs #467. Specification-only change. Amends control-plane.spec.md to correct the stale Watcher/watch-stream enumeration (drops the removed GatewayReleases/GatewayNetworks, adds RoleBindings) and adds "Requirement: gRPC Contract and Watch Coverage for ADLC Kinds" so the control plane learns of AgentRuntime events over a gRPC watch stream (consistent with the Gateway contract) rather than polling the REST /ext/ API. Amends data-model.spec.md so the hsctl apply "Supported Kinds" table covers all six ADLC extension Kinds and adds "Requirement: hsctl apply Supports ADLC Extension Kinds" (both -f and -k, dispatched to /api/hypershell/ext/). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Amber reviewStatus: Complete |
There was a problem hiding this comment.
Verdict
This is a clean, specification-only change: it corrects the stale Watcher Kind enumeration in control-plane.spec.md, adds a well-scoped gRPC watch/contract requirement for the control-plane-reconciled ADLC Kinds, and documents the already-implemented hsctl apply support for the six ADLC extension Kinds. I verified the doc claims against the code (apply dispatch, /ext/ prefix, watcher enumeration) and found them accurate; the only substantive issue is cross-PR coordination the maintainers should resolve before reconcile implements the new gRPC surface.
What I checked
hsctl applyclaims are accurate. The data-model table now marks the six ADLC Kinds✅ implementedfor apply;components/cli/cmd/hsctl/apply/cmd.go(isSupportedKind+ the dispatchswitch, lines ~287-335) handles all six and routes them tourls.*PathunderExtAPIPrefix = "/api/hypershell/ext"(components/cli/pkg/urls/urls.go), matching the spec's/api/hypershell/ext/agent_runtimesexamples. The unknown-kind-skip and create-or-update (POST vs PATCH) behavior in the new scenarios also matches the code.- Watcher enumeration correction is accurate. The control plane watches Gateways, ManagedClusters, and RoleBindings today (
WatchRoleBindingsincmd/hypershell-controller/main.go); GatewayReleases/GatewayNetworks are gone. The corrected prose and the admin-credential-files scenario now reflect that. - gRPC/ADLC requirement is desired-state and appropriately gated. No AgentRuntime reconciler or gRPC contract exists in the control plane yet; the new requirement correctly frames this as future work and the embedded
DECISION NEEDEDblock defers the per-Kind watch surface to a maintainer. Good practice. - No
panic, no code, no secret handling, no em dashes.
Cross-PR coordination
One material coordination issue needs a maintainer decision.
This PR makes AgentRuntime a new control-plane-reconciled Kind driven by a gRPC List seed + Watch stream + status write-back, and corrects the canonical set of watched Kinds to Gateways, ManagedClusters, RoleBindings plus the ADLC Kinds. The open world-synchronization spec PR defines an authoritative "complete API inventory" contract for every control-plane-reconciled Kind, but its Kind list still enumerates Fleet/GatewayRelease/GatewayNetwork and omits any ADLC Kind, and it mandates per-Kind primitives (a control-plane-only paginated List, a resource_revision on every list/watch/delete payload, and an inventory watermark) that this PR's ADLC gRPC contract does not yet specify. Maintainers must decide (a) whether AgentRuntime participates in periodic world synchronization, and (b) if so, ensure the ADLC List/Watch contract this PR introduces is designed to satisfy that spec's resource_revision/watermark/deterministic-pagination inventory requirements, and reconcile the two conflicting enumerations of the control-plane-reconciled Kind set. This is best settled before either spec's reconcile implementation starts, so the ADLC gRPC surface is defined once rather than twice.
Relatedly, the open reconciliation-contract PR introduces a shared behavior contract that "all reconcilers SHALL follow" (durable queues, resync, revision-based versioning). If it lands, the AgentRuntime reconcile loop and gRPC status write-back specified here must conform to it; the maintainer confirming this PR's DECISION NEEDED block should align the ADLC contract with that shared contract rather than specify a divergent one.
Previous concerns
No prior Amber review findings are on record for this pull request (the allowed review history is empty), so there are no earlier concerns to re-verify.
Findings Summary (ordered by severity, highest first)
- [Coordination] ADLC Kinds become control-plane-reconciled with a new gRPC
List/Watchcontract; this must be reconciled with the open world-synchronization inventory contract (Kind set +resource_revision/watermark/pagination) and the shared reconciliation contract - Cross-PR (see Cross-PR coordination). - [Minor] The
hsctl apply"Supported Kinds" table marks the six ADLC Kinds✅ implementedwithout noting that the/ext/surface is labeled "experimental, unsupported, subject to change" in the CLI help - Doc Consistency (data-model.spec.md L849-L854).
Convention Checklist
| Convention | Result |
|---|---|
No panic() in production code |
N/A (spec-only) |
Spec claims match implementation (apply dispatch, /ext/ prefix, watcher set) |
Pass |
| Internal cross-reference consistency (requirement anchors, Kind names) | Pass |
| No em dashes | Pass |
| Conventional commit message | Pass |
| | `ProviderSpec` | `name`, `category`, `capability`, `profile` | ✅ implemented | | ||
| | `ProviderBinding` | all fields in the ProviderBinding data model (see "Requirement: ProviderBinding") | ✅ implemented | | ||
| | `InferenceRoute` | all fields in the InferenceRoute data model (see "Requirement: InferenceRoute") | ✅ implemented | | ||
| | `SecretSource` | all fields in the SecretSource data model (see "Requirement: SecretSource") | ✅ implemented | |
There was a problem hiding this comment.
[Minor] Doc consistency. These six ADLC Kinds are marked ✅ implemented here, which is accurate for hsctl apply support (isSupportedKind + the dispatch switch in components/cli/cmd/hsctl/apply/cmd.go route all six under ExtAPIPrefix = "/api/hypershell/ext"). However, the CLI help groups the same /ext/ commands as "Extensions (hypershell/ext/) - experimental, unsupported, subject to change". Consider adding a short note here (or reusing that wording) so ✅ implemented is not read as a stability/GA guarantee for the extension surface. Confidence: High.

Specification change only
This PR changes specification only (
specs/**). No implementation code,protobuf, or CLI code is touched here. After a human merges it, the
reconcileskill will see the new spec-vs-code gap and implement the gRPC stubs and any
remaining CLI wiring to match on a later run.
Refs #467.
Desired behavior
PR #452 introduced the ADLC extension Kinds (
AgentRuntime,SandboxTemplate,ProviderSpec,ProviderBinding,InferenceRoute,SecretSource) with a RESTsurface at
/api/hypershell/ext/, but did not give them the full-stack-pipelinetreatment for the gRPC and CLI stages. This PR captures the desired state:
(
protomessage +List/Watch+ status write RPC) generated the same way asthe existing Kinds, and the control plane SHALL be driven by
AgentRuntimewatch-stream events (filtered by
cluster_id, with status written back overgRPC) rather than polling the REST
/ext/API. This matches theinformer-reconciler pattern used for Gateway.
hsctl apply(both-fand-k) SHALL support allsix ADLC extension Kinds, dispatched to
/api/hypershell/ext/. The applycommand code already supports these Kinds; this change brings the spec's
"Supported Kinds" table (previously marking three as planned and omitting
three) up to the desired state.
Spec files changed
specs/platform/control-plane.spec.mdGatewayReleases/GatewayNetworks, addedRoleBindingsand the ADLC Kinds.three scenarios (per-cluster watch, reconcile-over-gRPC, status write-back).
specs/platform/data-model.spec.mdhsctl applySupported Kinds table to all six ADLC Kinds.hsctl applySupports ADLC Extension Kinds with threescenarios (apply from file, apply all Kinds from a Kustomize directory,
unknown-kind is skipped not fatal).
Grounding done
gateways,managed_clusters,role_bindings,common(components/api-server/proto/hypershell/v1/); no proto for any ADLCKind. feat(adlc): add Agent Declarative Lifecycle Configuration spec #452 deleted the
gateway_networks/gateway_releasesproto and plugins.hsctl apply(components/cli/cmd/hsctl/apply/cmd.go) already listsall six ADLC Kinds in
isSupportedKind/applyResourceand maps them to the/ext/paths incomponents/cli/pkg/urls/urls.go; CLI create/get/deletecommands for the ADLC Kinds also already exist (feat(cli): add ADLC extension kinds to hsctl with grouped help #466).
data-model.spec.md(the separatespecs/adlc/agents.spec.mdfrom feat(adlc): add Agent Declarative Lifecycle Configuration spec #452 no longer exists), so these areamendments to existing specs rather than a new spec/registry row.
Open question (why
needs-decision)The CLI part is a straightforward spec-catches-up-to-code change. The gRPC
surface is an architecture decision a maintainer should confirm before
reconcileimplements it (captured inline in the new control-plane requirement):AgentRuntimewatched;
SandboxTemplate/ProviderSpec/SecretSourceread on demand viaGet/List. Must a change to a shared config Kind re-reconcile dependentAgentRuntimes (which would require watching them)?AgentWorkspace,WorkspaceMembership,ProviderBinding,InferenceRouteare provisioned viathe gateway gRPC API during reconcile. Confirm
ProviderBindingandInferenceRoutedo not also need a hub watch stream.The drafted scenarios assume (1)
AgentRuntimewatched and (2) gateway-sideKinds provisioned via the gateway gRPC API; adjust if the maintainer decides
otherwise.
🤖 Generated with Claude Code