Skip to content

cross-resource references become references, and the graph gets its edges - #115

Merged
lex00 merged 1 commit into
mainfrom
graph-edges
Aug 7, 2026
Merged

cross-resource references become references, and the graph gets its edges#115
lex00 merged 1 commit into
mainfrom
graph-edges

Conversation

@lex00

@lex00 lex00 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes #84 by its own prescription: reference the declaring resource's attribute instead of repeating its name.

The issue's open question — does an AttrRef serialize to the identical literal? — is answered in the safe direction and verified with diff, not asserted: the k8s serializer resolves a .name AttrRef to the declared metadata.name, and every build combination (k3d default, kubernetes, ingress=traefik, cnpg+barman) is byte-identical before and after.

The five string-matches that became references, and the edges they now put in the declared graph:

combo edge
k3d default pgDeployment → pgClaim (claimName)
kubernetes ingress → service (backend)
ingress=traefik route → service
cnpg + barman pgCluster → objectStore (barmanObjectName), pgScheduledBackup → pgCluster

Probed directly through discoverbuildGraphIr per combo: edges present with kind: "ref" where the issue measured zero everywhere. A side benefit the source itself notes: barmanObjectName can no longer typo into a silent no-archive — the reference either resolves or the build fails.

Left alone, per the issue: label selectors (not references), and names of resources chant does not declare (the operator's fountain-pg-app, the hand-minted platform Secret) — no node to point at.

Full just e2e green from nothing; just check green.

🤖 Generated with Claude Code

https://claude.ai/code/session_017BQGewVRzp9FS1jXn1H6A6

…dges

Five relationships were written as strings that happened to match: the
bundled Deployment's claimName, both ingress modes' service names, the
CNPG cluster's barmanObjectName, and the ScheduledBackup's cluster name.
chant emitted both nodes and no edge between them, because there was
nothing to emit — which is why every behold zoom except components drew
eleven nodes in one flat row (#84).

Each becomes a reference to the declaring resource's .name. The open
question the issue flagged is answered in the safe direction: the k8s
serializer resolves a .name AttrRef to the declared literal, and every
build combination is byte-identical before and after — verified with
diff, not asserted. The declared graph now carries the edges:

  k3d default      pgDeployment → pgClaim
  kubernetes       ingress → service
  ingress=traefik  route → service
  cnpg+barman      pgCluster → objectStore, pgScheduledBackup → pgCluster

A reference also cannot typo, which retires cnpg.ts's own warning that a
misspelled barmanObjectName archives into nowhere silently.

Not addressed, per the issue: label selectors (not references), and names
of resources chant does not declare (the operator's fountain-pg-app, the
hand-minted platform Secret) — there is no node to point at.

Full just e2e green from nothing. Closes #84.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BQGewVRzp9FS1jXn1H6A6
@lex00
lex00 merged commit 7c7b952 into main Aug 7, 2026
2 checks passed
@lex00
lex00 deleted the graph-edges branch August 7, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the resource graph has no edges, so every entity zoom renders as one flat row

1 participant