You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .ai/spec/how/reconciler.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ Audience: AI agents. Behavioral rules and phase semantics live in **what/** spec
171
171
-**`SandboxProvider`:** Swappable claim/wait/release (tests can fake). Implementations: `SandboxManager` (sandbox-claim mode), `BarePodManager` (bare-pod mode). `SetStep` provides resolved step config before each `Claim` call.
172
172
-**`PodSpecBuilder`:** Shared pod-spec assembly. Produces typed `corev1.PodSpec` from image + resolved step config. Used directly by `BarePodManager`; shared helper functions also used by `EnsureAgentTemplate` (unstructured path).
173
173
-**`resolveProposal`:** Produces `resolvedWorkflow` with cached `Agent` + `LLMProvider` per name; applies per-stage agent overrides from `ProposalApproval` via `getStageOverrideAgent`; `Execution`/`Verification` steps nil when corresponding spec sections are zero.
174
-
-**`EnsureAgentTemplate`:** Deterministic derived `SandboxTemplate` name from hash of LLM spec, model, skills, MCP servers, required secrets, step, and **base template resourceVersion**. Patches pod template env/volumes for credentials, Vertex/Bedrock/Azure extras, skills image/paths, and MCP JSON env. GC older templates labeled for same agent+step.
174
+
-**`EnsureAgentTemplate`:** Deterministic derived `SandboxTemplate` name from hash of LLM spec, model, skills, MCP servers, required secrets, dataSource PVC, step, and **base template resourceVersion**. `dataSource` is extracted from `tools.DataSource` (set in `ToolsSpec`). Patches pod template env/volumes for credentials, Vertex/Bedrock/Azure extras, skills image/paths, MCP JSON env, `LIGHTSPEED_MODE`, and optional `/data/input` PVC mount. GC older templates labeled for same agent+step.
// DataSource references a pre-existing PersistentVolumeClaim containing
@@ -282,8 +294,12 @@ type DataSource struct {
282
294
// +required
283
295
// +kubebuilder:validation:MinLength=1
284
296
// +kubebuilder:validation:MaxLength=253
285
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="must be a valid DNS subdomain"
286
-
ClaimNamestring`json:"claimName"`
297
+
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="must be a valid DNS subdomain: lowercase alphanumeric characters, hyphens, and dots"
298
+
ClaimNamestring`json:"claimName,omitempty"`
299
+
}
300
+
301
+
func (dDataSource) IsZero() bool {
302
+
returnd.ClaimName==""
287
303
}
288
304
289
305
// ProposalSpec defines the desired state of Proposal.
@@ -297,10 +313,9 @@ type DataSource struct {
297
313
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.analysisOutput) || (has(self.analysisOutput) && self.analysisOutput == oldSelf.analysisOutput)",message="analysisOutput is immutable once set"
298
314
// +kubebuilder:validation:XValidation:rule="!has(self.analysisOutput) || self.analysisOutput.mode != 'Minimal' || (!has(self.execution) && !has(self.verification))",message="analysisOutput mode Minimal is only allowed for analysis-only proposals (no execution or verification steps)"
299
315
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.tools) || (has(self.tools) && self.tools == oldSelf.tools)",message="tools is immutable once set"
300
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.analysis) || (has(self.analysis) && self.analysis == oldSelf.analysis)",message="analysis is immutable once set"
301
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.execution) || (has(self.execution) && self.execution == oldSelf.execution)",message="execution is immutable once set"
302
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.verification) || (has(self.verification) && self.verification == oldSelf.verification)",message="verification is immutable once set"
303
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.dataSource) || (has(self.dataSource) && self.dataSource == oldSelf.dataSource)",message="dataSource is immutable once set"
316
+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.analysis) || (has(self.analysis) && (!has(self.analysis.agent) || !has(oldSelf.analysis.agent) || self.analysis.agent == oldSelf.analysis.agent) && (!has(self.analysis.tools) || !has(oldSelf.analysis.tools) || self.analysis.tools == oldSelf.analysis.tools))",message="analysis agent and tools are immutable once set"
317
+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.execution) || (has(self.execution) && (!has(self.execution.agent) || !has(oldSelf.execution.agent) || self.execution.agent == oldSelf.execution.agent) && (!has(self.execution.tools) || !has(oldSelf.execution.tools) || self.execution.tools == oldSelf.execution.tools))",message="execution agent and tools are immutable once set"
318
+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.verification) || (has(self.verification) && (!has(self.verification.agent) || !has(oldSelf.verification.agent) || self.verification.agent == oldSelf.verification.agent) && (!has(self.verification.tools) || !has(oldSelf.verification.tools) || self.verification.tools == oldSelf.verification.tools))",message="verification agent and tools are immutable once set"
304
319
typeProposalSpecstruct {
305
320
// request is the user's original request, alert description, or a
306
321
// description of what triggered this proposal. This text is passed to
0 commit comments