Skip to content

Wire disk self-heal into K8s-agent local-exec mode#440

Merged
ppXD merged 1 commit into
mainfrom
fix/sota-audit-followups
Jun 14, 2026
Merged

Wire disk self-heal into K8s-agent local-exec mode#440
ppXD merged 1 commit into
mainfrom
fix/sota-audit-followups

Conversation

@ppXD

@ppXD ppXD commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Wire disk self-heal into the KubernetesAgent local-exec path. The !UseScriptPods branch (the default — UseScriptPods is false) builds a LocalScriptService that creates the same {tempRoot}/squid-tentacle-{ticketId} workspaces the standalone Tentacle does, but scheduled no background task — so a disk-full agent never auto-reclaimed. Now schedules SelfHealBackgroundTask.ForLocalWorkspaces(backend), byte-identical to TentacleFlavor.cs:50. The flavor-runtime test flips from asserting BackgroundTasks empty to asserting the single SelfHeal task.
  • Cover the preview-path role-scoping that shipped untested. A new integration test drives the real IDeploymentService.PreviewDeploymentAsync and proves an unavailable target whose role no enabled step targets is not evaluated by the project's Transient-Deployment-Targets policy (so it neither shows in ExcludedTargets nor blocks). A control case (a step that targets all machines) proves the discriminator genuinely flips on step roles, not on whether the target was loaded.
  • Correct a cluster of stale doc comments: the removed SQUID_DEPLOYMENT_TRANSIENT_RESUMABLE escape hatch (transient pause is now unconditional — no opt-out); "open breaker" wrongly listed as a transient-pause cause in two pipeline catches and the TargetCatchClassifier XML doc (CircuitOpenException is excluded from the transient set — it fails fast); and a certificate at-rest customMessage that named AsNoTracking where the provider actually detaches.

No production behavior changes except the self-heal wiring (additive — a background task on the default K8s-agent mode). Everything else is a test addition or comment correction. No interface, signature, or schema changes.

Test plan

  • Solution build: 0 errors
  • KubernetesAgentFlavorRuntimeTests (4/4) — self-heal now scheduled in local-exec mode
  • New IntegrationDeploymentPreviewRoleScoping (2/2) against real Postgres
  • Red-green discrimination proof: temporarily dropping the role-scoping (ApplyProjectPolicy(selected, json) over all machines) makes the primary test fail on the exact db-not-excluded assertion ([1, 2] vs [1]) while the all-machines control stays green; restored to confirm green
  • DeploymentPipelineRunnerTransientPauseTests (7/7) — comment-only touch, still green

@ppXD ppXD added this to the 1.9.1 milestone Jun 14, 2026
The KubernetesAgent flavor's local-exec branch (the default — UseScriptPods
defaults false) builds a LocalScriptService that creates the same
{tempRoot}/squid-tentacle-{ticketId} workspaces the standalone Tentacle does,
but scheduled no background task, so a disk-full agent never auto-reclaimed.
Mirror TentacleFlavor: schedule SelfHealBackgroundTask.ForLocalWorkspaces over
the same backend (its own live-script veto reporter).

Also add the preview-path role-scoping coverage that shipped untested: an
integration test drives PreviewDeploymentAsync and proves an unavailable target
whose role no enabled step targets is not evaluated by the project's
transient-target policy, with an all-machines-step control proving the
discriminator flips on roles.

And correct stale doc comments: the removed SQUID_DEPLOYMENT_TRANSIENT_RESUMABLE
escape hatch (transient pause is now unconditional), "open breaker" wrongly
listed as a transient-pause cause (CircuitOpenException is excluded — fail-fast),
and a customMessage that named AsNoTracking where the certificate provider
detaches.
@ppXD
ppXD force-pushed the fix/sota-audit-followups branch from 2e1bd58 to b3254cb Compare June 14, 2026 00:41
@ppXD
ppXD merged commit b837599 into main Jun 14, 2026
16 of 18 checks passed
@ppXD
ppXD deleted the fix/sota-audit-followups branch June 14, 2026 00:57
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