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
- 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.
- All slices reach GO;
integrate GATE-PASS.
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).
Bug Description
The slicer planner sometimes pins a prefix (e.g.
rocm_smi_) as a shared identifier instead of a complete identifier. Reconcile'sPinnedCheckmatches whole tokens, so a prefix pin can never be satisfied: it produces a spuriouspinned-missingGATE-FAIL, and it silently skips the real cross-slice check the pin was supposed to enforce.Steps to Reproduce
rocm_smi_(trailing underscore) as a shared identifier defined by the daemonset slice and referenced by the dashboard slice.integrateGATE-PASS.reconcilerunsPinnedCheckforrocm_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
reconcilereturns GATE-FAIL:The dashboard file actually contains
rocm_smi_sensor_temperature,rocm_smi_sensor_power,rocm_smi_gpu_utilization— therocm_smi_prefix is present as a substring but never as a standalone whole token, sopresent()(whole-token,isIdentByteboundary 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 wroterocm_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
validateSlicePlanorPinnedCheck, 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 silentpinned-missingGATE-FAIL.Environment
pkg/cli/slice_planner.go) +pkg/foreman/slicer/reconcile.goAdditional 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).