cross-resource references become references, and the graph gets its edges - #115
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.nameAttrRef to the declaredmetadata.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:
pgDeployment → pgClaim(claimName)ingress → service(backend)route → servicepgCluster → objectStore(barmanObjectName),pgScheduledBackup → pgClusterProbed directly through
discover→buildGraphIrper combo: edges present withkind: "ref"where the issue measured zero everywhere. A side benefit the source itself notes:barmanObjectNamecan 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 e2egreen from nothing;just checkgreen.🤖 Generated with Claude Code
https://claude.ai/code/session_017BQGewVRzp9FS1jXn1H6A6