Skip to content

WIP: Rename ApprovalPolicy to AgenticConfig and consolidate configuration#3

Draft
harche wants to merge 2 commits into
openshift:mainfrom
harche:wt/e2e-testing
Draft

WIP: Rename ApprovalPolicy to AgenticConfig and consolidate configuration#3
harche wants to merge 2 commits into
openshift:mainfrom
harche:wt/e2e-testing

Conversation

@harche
Copy link
Copy Markdown
Contributor

@harche harche commented May 8, 2026

Summary

  • Rename ApprovalPolicy CRD → AgenticConfig — a cluster-scoped singleton consolidating approval policy, concurrency limits, console/sandbox images, and timeout config
  • Approval fields nested under spec.approval (stages, maxAttempts); maxConcurrentProposals stays top-level
  • New spec.console.image replaces --agentic-console-image CLI flag
  • New spec.sandbox.image and spec.sandbox.timeout (scaffolding for future wiring)
  • Base template name hardcoded as constant (lightspeed-agent), removes --template-name flag
  • Add Enabled callback on ProposalReconciler and console config for feature gate integration
  • Console reconciler reads image from AgenticConfig CR, with proper NotFound vs transient error handling

Companion PR

Test plan

  • go build ./... passes
  • go test ./controller/proposal/... -count=1 — all tests pass
  • go test ./controller/console/... -count=1 — all tests pass
  • Deploy to cluster and verify AgenticConfig CR works end-to-end

🤖 Generated with Claude Code

harche and others added 2 commits May 8, 2026 15:43
…uration

Replace the ApprovalPolicy CRD with AgenticConfig — a cluster-scoped
singleton that consolidates:
- Approval policy (stages, maxAttempts) under spec.approval
- Concurrency limits (maxConcurrentProposals) at top level
- Console plugin image under spec.console.image
- Sandbox pod config under spec.sandbox (image, timeout)

Remove --template-name CLI flag; base template name is now a package
constant (defaultBaseTemplateName = "lightspeed-agent").

Add Enabled callback to ProposalReconciler and AgenticConsoleConfig for
feature gate integration with lightspeed-operator.

Console reconciler now reads image from AgenticConfig CR instead of
receiving it as a constructor parameter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Make console and sandbox sections required on AgenticConfig — the
controller is useless without images configured. Add CEL validations:
- Image fields: MinLength=1, MaxLength=512, must contain '/' (registry path)
- Singleton name enforcement (metadata.name == 'cluster')
- Approval stages: MinItems=1, MaxItems=4 with listType=map
- maxAttempts: Minimum=1, Maximum=3
- maxConcurrentProposals: Minimum=1, Maximum=20

Also fix console reconciler error handling: distinguish NotFound from
transient errors, and use AgenticConfigName constant instead of
hardcoded "cluster" string.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
xrajesh pushed a commit to xrajesh/lightspeed-agentic-operator that referenced this pull request May 10, 2026
…1, #13-17, #19-22, #29, #32)

- openshift#1: Change status.attempts from *int32 to int32 with min=1/max=int32 validation
- openshift#2: Move maxAttempts from ProposalSpec to ApprovalPolicy (admin ceiling) and
  ExecutionApproval (user choice); fix semantics so N = N total attempts
- openshift#3: Remove spec.revision, use metadata.generation for revision signaling
- openshift#4: Make ProposalStep.tools non-pointer with omitzero, add MinProperties=1
- #8-11: Make outcome/result/conditionOutcome required; SandboxInfo fields required
- #13: Add CEL singleton rule (metadata.name == "cluster") on ApprovalPolicy
- #14: Use listType=map+listMapKey=name on ApprovalPolicy stages
- #15: Remove defaultOption from ApprovalPolicy (operator defaults to option 0)
- #16-17: Add omitempty to name/approval, document allowed values
- #19: Replace denied bool with decision enum (Approved|Denied) + CEL immutability
- #20: Make ProposalApproval spec required
- #21: Use listType=map+listMapKey=type on ProposalApproval stages
- #22: Make estimatedImpact required on RemediationOption
- #29: Remove components from ExecutionResult and VerificationResult (copy-paste error)
- #32: Add MinProperties=1 to ToolsSpec

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant