Skip to content

feat(foreman): run_reconcile tool for sliced-workload drift check#1046

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

feat(foreman): run_reconcile tool for sliced-workload drift check#1046
Defilan merged 1 commit into
defilantech:mainfrom
Defilan:feat/slicer-run-reconcile

Conversation

@Defilan

@Defilan Defilan commented Jul 10, 2026

Copy link
Copy Markdown
Member

What

Task 4b of the Sliced Workloads epic (#1033): the deterministic run_reconcile tool that a sliced Workload's reconcile step dispatches.

It fetches + checks out the integration branch (pushed by run_integrate), then runs slicer.PinnedCheck against the pinned shared identifiers.

  • Verdict: clean → GATE-PASS; a pinned identifier missing from a slice that must define/reference it → GATE-FAIL (cross-slice interface drift the build is blind to); a fetch fault → GATE-ERROR.
  • The integration branch is validated with refSafe (shared with run_integrate) against argv injection.

Why

The union builds clean but is blind to semantic interface drift between slices (a dashboard querying a metric an exporter never emits). This is the in-cluster wiring of the authoritative check that caught the real drift on #700 and #1001, driving the AgenticTask verdict.

Scope: v1 is pinned_check only

Per the design decision, v1 runs the deterministic, authoritative pinned_check. The advisory llm_sweep (slicer.LLMSweep) needs a model endpoint the deterministic path does not resolve; wiring it is a small follow-up. pinned_check is what caught the drift in validation; llm_sweep was the corroborating backstop.

Testing

go test ./pkg/foreman/agent/tools/ -run TestRunReconcile — real-git: clean union → GATE-PASS, exporter/dashboard metric drift → GATE-FAIL, option-looking branch → GATE-ERROR. Full tools package, vet, golangci-lint, build clean.

Stacked PR

Stacked on #1045 (run_integrate), which is stacked on #1034 / #1036 / #1037. Until those merge this PR's diff includes their commits; the new commit here is 737424b (the run_reconcile tool + registration). I'll rebase to a clean diff as the stack lands.

Checklist

  • Real-git tests for pass/fail/error verdicts
  • go test / vet / golangci-lint / build clean
  • Integration branch validated against argv injection
  • 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 44.44444% with 40 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/foreman/agent/tools/run_reconcile.go 47.05% 31 Missing and 5 partials ⚠️
cmd/foreman-agent/main.go 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Defilan Defilan force-pushed the feat/slicer-run-reconcile branch from 737424b to 8518842 Compare July 10, 2026 05:14
Task 4b of the Sliced Workloads epic (defilantech#1033): the deterministic run_reconcile
tool that a sliced Workload's reconcile step dispatches. It fetches + checks out
the integration branch (pushed by run_integrate), then runs slicer.PinnedCheck
against the pinned shared identifiers.

Verdict: clean -> GATE-PASS; a pinned identifier missing from a slice that must
define or reference it -> GATE-FAIL (cross-slice interface drift the build is
blind to); a fetch fault -> GATE-ERROR. The integration branch is validated with
refSafe (shared with run_integrate) against argv injection.

v1 runs only the authoritative pinned_check; the advisory llm_sweep needs a
model endpoint the deterministic path does not resolve and is a follow-up.

Real-git tests: clean union -> GATE-PASS, exporter/dashboard metric drift ->
GATE-FAIL, option-looking branch -> GATE-ERROR.

Part of defilantech#1033

Signed-off-by: Christopher Maher <chris@mahercode.io>
@Defilan Defilan force-pushed the feat/slicer-run-reconcile branch from 8518842 to b9136c3 Compare July 10, 2026 06:01
@Defilan Defilan merged commit 6bde143 into defilantech:main Jul 10, 2026
23 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