Skip to content

[BUG] K8s, server, Helm, and Terraform verification still pass without observing the target #69

Closed

Description

@OkiriGabriel

Bug Description

#53 covers CI/CD, cloud, and ArgoCD always returning passed: true. The same fail-open remains for:

  • k8s when pod_name or namespace is missing (_verify_k8s_fix sets passed = True and never calls kubectl)
  • server / linux / windows / rhel when service_name is missing (_verify_server_fix sets passed = True and never queries the host)
  • helm and terraform (and any other type) which hit the generic branch: "Generic verification performed" + passed = True

Immediate verification and later stability monitoring reuse these results, so a Helm rollback or Terraform-adjacent incident can be reported as verified with no cluster or workspace check.

Steps to Reproduce

import asyncio
from tools.fix_verifier import FixVerifier

async def main():
    v = FixVerifier()
    print((await v._verify_k8s_fix({}))["passed"])
    print((await v._verify_server_fix({}))["passed"])
    print((await v._run_immediate_checks("helm", {}))["passed"])
    print((await v._run_immediate_checks("terraform", {}))["passed"])

asyncio.run(main())

Expected Behavior

Missing identifiers or unsupported types fail closed (passed: false) with a reason. Helm/Terraform either observe the release/workspace or explicitly report that verification is not implemented — they must not report success.

Actual Behavior

All four calls return True without kubectl, systemctl, helm, or terraform.

Additional Context

Follow-on to #53. _verification_expected_state in agent/core.py still returns {} for helm/terraform, which feeds the generic pass path.

            else:
                check_result["details"]["note"] = "Generic verification performed"
                check_result["passed"] = True

Possible Solution

Fail closed when required identifiers are absent. Add helm (helm status) and terraform (state/plan observation or explicit “not implemented”) paths. Cover empty expected state in tests/test_fix_verifier.py the same way #53 tests do for cicd/cloud/argocd.

Activity

  1. added
    bug
    on Sep 19, 2026
  2. OpeyemiAdeniji commented on Oct 14, 2026

    @OpeyemiAdeniji
    Contributor

    Hi @OkiriGabriel, I'd like to take this one. I confirmed on current main that _verify_k8s_fix({}), _verify_server_fix({}) and the generic branch of _run_immediate_checks (helm/terraform) still return passed: True without observing anything.

    Plan, following the #53 pattern for cicd/cloud/argocd:

    1. Fail closed (passed: False with a reason) when k8s lacks pod_name/namespace or server lacks service_name.
    2. Replace the generic pass with passed: False and a "verification not implemented for <type>" message.
    3. Add tests in tests/test_fix_verifier.py for empty expected state.

    For Helm and Terraform I'd do the explicit "not implemented" result in this PR and handle real observation (helm status, etc.) as a follow-up. Does that split work for you?

    This stays within tools/fix_verifier.py and its tests; _verification_expected_state in agent/core.py doesn't need to change once the verifier fails closed.

  3. OkiriGabriel commented on Oct 14, 2026

    @OkiriGabriel
    CollaboratorAuthor

    Thanks @OpeyemiAdeniji — assigning this to you. Your plan looks good: fail closed for missing k8s/server identifiers, and "verification not implemented" for Helm/Terraform in this PR (real observation as follow-up). PR #81 tracks the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions