Skip to content

feat(core): classify owner-referenced children as runtime, not orphans #1077

Closed

Description

@lex00

Part of #1073. Not covered by #1014.

Problem

The diff engine has one bucket for live-but-undeclared: orphan, which routes to adopt-or-delete. #1014 and #1015 model these as out-of-band children — a console-added SNS subscription, an API Gateway method. That framing is correct for AWS.

On Kubernetes it is wrong. Most live-but-undeclared objects are neither orphans nor drift; they are the runtime doing its job. You declare a Deployment and the cluster creates a ReplicaSet, Pods, and EndpointSlices. Classifying those as orphan makes the k8s diff unusable at any depth below the declared object, and would let lifecycle plan propose deletes for things the controller will simply recreate.

ownerReferences distinguishes the two, and no other chant substrate maintains that chain.

Proposed

A third classification for a live resource whose ownerReferences chain terminates at a declared, chant-owned resource. Core owns the category and the diff-engine wiring; the k8s lexicon supplies the chain. Lexicons that supply nothing behave exactly as they do today.

Acceptance criteria

  • A Pod owned by a declared Deployment is classified as runtime — never orphan, never delete.
  • A genuinely unowned Pod is still orphan.
  • Chain resolution is depth-limited and cycle-safe.
  • lifecycle plan never proposes a delete for a runtime child.
  • Lexicons with no owner chain are unaffected.

Notes

This is the precondition for behold descending below the declaration boundary — see INTENTIUS/behold#84.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions