Skip to content

Promote supersedes from prompt caution to enforced edge on metric conflicts #57

Description

@RichardHightower

Summary

DEKC mentions supersedes only as a caution in a prompt: "Avoid conflicting metric names without supersedes/related_to notes" (scripts/dekc_brain.py). The edge type exists in dekc_common.py but nothing enforces it. This ticket turns the soft warning into a hard rule for the one case where it matters: conflicting metric names.

Why

Data platforms accumulate renamed or redefined metrics over time. Two metrics with the same business name but different grain or filters will both surface in retrieval unless one supersedes the other. The prompt-level caution is not enough; agents ignore soft guidance under time pressure.

Acceptance criteria

  • A validation step in the DEKC capture flow: if two Metric nodes share a metric_name (case-insensitive) and are not linked by supersedes or related_to, the capture emits a warning and blocks auto-materialize until resolved.
  • When a metric is redefined, the new node carries supersedes: <old-id> and the old node gets truth_state: superseded.
  • The prompt text in dekc_brain.py is updated to reference the enforced rule rather than the soft caution.
  • Tests: conflicting names without edge fail validation; with edge, both nodes coexist and point-in-time query returns the correct version.
  • Scope is narrow: only metric-name conflicts. Other DEKC entities (tables, jobs, streams) keep their existing lineage edges.

Out of scope

Full supersession for every DEKC noun. Lineage (measures, implements) already covers most relationships. Supersedes is for definitional replacement only.

References

  • scripts/dekc_brain.py (conflicting metric names caution)
  • scripts/dekc_common.py (edge list includes supersedes)
  • okf-plugin typed-edges vocabulary

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions