Skip to content

feat(foreman): integrate + reconcile AgenticTask kinds + slice payload#1037

Merged
Defilan merged 1 commit into
defilantech:mainfrom
Defilan:feat/slicer-task-kinds
Jul 10, 2026
Merged

feat(foreman): integrate + reconcile AgenticTask kinds + slice payload#1037
Defilan merged 1 commit into
defilantech:mainfrom
Defilan:feat/slicer-task-kinds

Conversation

@Defilan

@Defilan Defilan commented Jul 10, 2026

Copy link
Copy Markdown
Member

What

Task 3 of the Sliced Workloads epic (#1033): the API surface for the two new task kinds.

  • Adds integrate and reconcile to the AgenticTaskKind enum (widened on both AgenticTask.spec.kind and Workload pipeline steps).
  • Adds the payload fields the sliced-workload pipeline needs:
    • Slices []SliceRef — each {name, branch, files}. integrate unions slices[].branch; reconcile checks pins against slices[].files.
    • Contract string — the plan's prose contract, handed to a reconcile task's LLM sweep. Reconcile only.
    • SharedIdentifiers []SharedIdentifier — each {id, definedBy, referencedBy}, the pins a reconcile task verifies. Reconcile only.
  • Base ref and integration branch reuse the existing baseBranch / branch fields.

Why

The slicer decomposes an issue into disjoint slices, unions them (integrate), and checks the union against a pinned contract (reconcile). This lands the CRD surface those two steps ride on, so a rendered sliced Workload validates against the apiserver. It's API-only: no executor handling yet (the follow-up wires the two kinds to the slicer libraries in #1034 / #1036).

How

New API types SliceRef and SharedIdentifier live in api/foreman/v1alpha1 (the API package stays independent of pkg/foreman/slicer; the executor converts between them). Regenerated deepcopy, CRD manifests, and chart CRDs. The AgenticTask validating webhook only checks that agentRef resolves, so no webhook change was needed.

Testing

go build ./..., go vet, gofmt, golangci-lint, go test ./api/foreman/... all clean. Re-running make manifests chart-crds foreman-chart-crds produces no further drift, so the CRD Sync Check passes.

Checklist

  • Regenerated deepcopy + CRD manifests + chart CRDs (no sync drift)
  • go build / go vet / gofmt / golangci-lint / go test ./api/... clean
  • Additive, optional fields only; no change to existing kinds
  • DCO sign-off

Part of #1033


Assisted-by: Claude Code (Opus 4.8); reviewed and verified by the author.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 34 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/foreman/v1alpha1/zz_generated.deepcopy.go 0.00% 32 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Add the integrate and reconcile AgenticTaskKind values (enum widened on both
AgenticTask.spec.kind and Workload pipeline steps) and the payload fields the
sliced-workload pipeline needs: Slices ([]SliceRef of name/branch/files),
Contract, and SharedIdentifiers ([]SharedIdentifier of id/definedBy/
referencedBy). integrate reads slices[].branch + baseBranch; reconcile reads
sharedIdentifiers + slices[].files + contract. Base and integration branch
reuse the existing baseBranch/branch fields.

API surface only: no executor handling yet (a follow-up wires the two kinds
to the slicer libraries). Regenerated deepcopy + CRD manifests + chart CRDs;
the AgenticTask webhook validates only agentRef, so no webhook change.

Part of defilantech#1033

Signed-off-by: Christopher Maher <chris@mahercode.io>
@Defilan Defilan force-pushed the feat/slicer-task-kinds branch from 762b51d to 3b6f311 Compare July 10, 2026 03:48
@Defilan Defilan merged commit 0899e9f into defilantech:main Jul 10, 2026
24 checks passed
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