You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A linked-pair request can now end with both types created but unlinked #2839
Relaxing the second-create_schema guard (PR #2818) makes a new end state reachable: the user asks for a linked pair, both types get created, and the relationship is never declared — two types, no edge, no error.
Why it is reachable now
The old guard refused any second create_schema in a turn, so "two types created" could not happen at all. It has been narrowed to refuse only types the user never named, which is what lets a legitimately-requested pair be created as two sequential calls.
The dangling-reference half is still fully covered: validate_relationship_targets_exist (packages/core/src/schema/mod.rs:375) rejects a relationship whose targetType does not exist. But targetType: None is deliberately unvalidated (mod.rs:402) — a relationship-free schema is legitimate on its own — so nothing notices when both halves of a requested pair land without one.
Why this was not fixed in that PR
The old guard did not really prevent this state so much as convert it into a strictly worse one: against a two-type request it silently delivered one type. Trading that for two-unlinked-types is an improvement, not a regression, so the relaxation stands on its own.
Closing it properly means tracking relationship materialization across a turn — knowing that a request was for a linked pair, and checking at turn end that an edge exists between them. That is a feature with its own design, not a line in a prose-fix PR.
Possible direction
At turn end, if more than one schema was created in the turn and no relationship connects any of them, surface it — either as a warning back to the model so it can add the relationship with add_schema_relationship, or as a note in the user-facing summary. Needs its own investigation; the detection signal ("was a linked pair asked for?") is the hard part, since it lives in the user's phrasing rather than in the tool calls.
Activity
mstomar125 commentedon Sep 23, 2026
Frontend: 5264 passed