Skip to content

[BUG] Slicer planner pins prefixes (e.g. rocm_smi_); reconcile whole-token check false-fails and skips the real check #1058

Description

@Defilan

Bug Description

The slicer planner sometimes pins a prefix (e.g. rocm_smi_) as a shared identifier instead of a complete identifier. Reconcile's PinnedCheck matches whole tokens, so a prefix pin can never be satisfied: it produces a spurious pinned-missing GATE-FAIL, and it silently skips the real cross-slice check the pin was supposed to enforce.

Steps to Reproduce

  1. Run a sliced Workload where the planner pins a partial token. Observed on issue 700: the planner pinned rocm_smi_ (trailing underscore) as a shared identifier defined by the daemonset slice and referenced by the dashboard slice.
  2. All slices reach GO; integrate GATE-PASS.
  3. reconcile runs PinnedCheck for rocm_smi_ in the dashboard file.

Expected Behavior

Either the planner never pins a prefix (it pins complete identifiers: full metric names, config keys, CRD fields, signatures), or reconcile recognizes an unsatisfiable prefix pin instead of reporting a misleading pinned-missing.

Actual Behavior

reconcile returns GATE-FAIL:

interface drift: 1 pinned identifier(s) missing from the slices that must carry them
drift: {Identifier: "rocm_smi_", Kind: "pinned-missing", Slice: "amd-gpu-dashboard", File: config/grafana/llmkube-amd-gpu-dashboard.json}

The dashboard file actually contains rocm_smi_sensor_temperature, rocm_smi_sensor_power, rocm_smi_gpu_utilization — the rocm_smi_ prefix is present as a substring but never as a standalone whole token, so present() (whole-token, isIdentByte boundary scan) correctly does not match it. False positive.

Worse: the planner's contract named the metrics rocm_smi_temperature_edge / rocm_smi_power_socket / rocm_smi_utilization_gpu, but the coder wrote rocm_smi_sensor_* names. Had the planner pinned those full names, reconcile would have caught a real dashboard-vs-daemonset drift. The prefix pin both fails spuriously and skips the check that mattered.

Proposed Fix

Primary (planner): strengthen the planner prompt so it pins complete, whole-token identifiers only — never prefixes or partial tokens. Make explicit that the reconcile check matches whole tokens, so a prefix like foo_ will always be reported missing.

Defense in depth (check/CLI): in validateSlicePlan or PinnedCheck, detect a pinned identifier that is not a valid standalone token (e.g. ends on an identifier-continuation boundary such as a trailing _, or is a strict prefix of the tokens it is meant to match) and surface it as a plan/lint warning rather than a silent pinned-missing GATE-FAIL.

Environment

Additional Context

Surfaced on the first fully-green end-to-end lab run of the graduated slicer (all slices GO, integrate GATE-PASS, reconcile executed). Companion findings from the same run: #1054 (branch-name collisions), #1056 (integrate union commit git identity).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/foremanForeman: the agentic fleet orchestrator add-onbugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions