Skip to content

Keep every Draft 3 graph form edge inside the document - #1148

Merged
jviotti merged 1 commit into
sourcemeta:mainfrom
Vansh-kap-98:draft3-graph-form-edges
Oct 12, 2026
Merged

jviotti merged 1 commit into
sourcemeta:mainfrom
Vansh-kap-98:draft3-graph-form-edges

Conversation

@Vansh-kap-98

@Vansh-kap-98 Vansh-kap-98 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

An edge of the graph stood for any subschema that was nothing but a reference, including one whose target lived in another document. Such an edge could not reach an entry, so the reference it carried had to be written back into every body that reached it, and the form admitted edges that were not edges of the graph at all.

An edge is now only a reference that stays in the document. One that leaves it becomes an entry of its own, so every edge points at #/definitions/<integer> and the special case for carrying a foreign URI back into the bodies goes away.

The metaschema says so too: entry and edge had the same shape and are now one definition, and definitions must hold at least one entry, since the wrapper always points at one.

View guided diff

An edge of the graph stood for any subschema that was nothing but a
reference, including one whose target lived in another document. Such an
edge could not reach an entry, so the reference it carried had to be
written back into every body that reached it, and the form admitted edges
that were not edges of the graph at all.

An edge is now only a reference that stays in the document. One that leaves
it becomes an entry of its own, so every edge points at
`#/definitions/<integer>` and the special case for carrying a foreign URI
back into the bodies goes away.

The metaschema says so too: `entry` and `edge` had the same shape and are
now one definition, and `definitions` must hold at least one entry, since
the wrapper always points at one.

Signed-off-by: Vansh <officialbusiness9818@gmail.com>
@Vansh-kap-98
Vansh-kap-98 marked this pull request as ready for review October 12, 2026 15:56
@augmentcode

augmentcode Bot commented Oct 12, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Keep Draft 3 canonical graph edges inside the document.
Reference-only subschemas are edges only when their reference is document-local.
External references now become standalone entries in root definitions.
Parent bodies reference those entries through #/definitions/<integer>.
Local reference chains terminate at entries, including external-reference entries.
Destination resolution now returns only an optional entry index.
The separate external-destination representation is removed.
External URIs no longer need to be copied into every referring body.
The canonical metaschema merges wrapper-entry and graph-edge definitions.
Graph edges must use numeric definition references.
The metaschema requires at least one definition and adds an external-edge rejection test.
Updated fixtures cover absolute external URIs, reference chains, and distinct foreign targets.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

View guided diff | Re-trigger cubic

@Vansh-kap-98

Copy link
Copy Markdown
Collaborator Author

pre-requisite to #1140

@jviotti
jviotti merged commit d63a364 into sourcemeta:main Oct 12, 2026
14 checks passed
@jviotti

jviotti commented Oct 12, 2026

Copy link
Copy Markdown
Member

awesome!

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.

2 participants