Skip to content

Enforce that a legitimate multi-schema split ends up linked and populated, not silently half-empty #1905

Closed

Description

@malibio

Overview

Split out of #1896. PR #1904 fixed the routing/retrieval symptom in #1896 — the Schema Creation skill wasn't being surfaced by semantic retrieval for "keep a record of X" phrasing, so create_schema was unreachable and the model fell back to a bare create_node or split the request across two schemas trying to recover. That's now verified fixed via two independent purged-DB/rebuilt-daemon eval:agent matrix runs (scenario 3 passes cleanly with exactly one create_schema call; the matrix went 4/12 → 7/12 passing).

However, #1896's second acceptance criterion is untouched by that fix: "If a split is ever correct, the resulting types are actually linked and both are populated — no silently empty half."

Problem Statement

Now that routing correctly reaches the Schema Creation skill for these prompts, nothing stops the model from still creating two schemas within one skill invocation and only populating one:

Proposed Solution

Add a structural backstop for when the model doesn't follow ONE_SCHEMA_PER_REQUEST, following the pattern used in #1895 (PR #1902 added NodeServiceError::UnknownNodeType — a code-level guard that fails loudly instead of silently persisting a broken state) and #1866 (PR #1897 added persisted-value guidance backed by new tests).

One approach to evaluate (not prescriptive — the actual mechanism needs its own investigation before a fix is settled): if a skill invocation's trace shows 2+ create_schema calls without an intervening successful create_relationship, either surface a stronger warning in the next tool result, or reject the second create_schema call outright and require an explicit relationship step before allowing a second schema in the same request.

Acceptance Criteria

  • A second create_schema call within one skill invocation is either rejected with an actionable error, or requires the model to first successfully link the prior schema via create_relationship
  • If a create_relationship between two just-created schemas fails, the failure is surfaced to the user rather than silently reported as success
  • Regression test coverage for both cases
  • Code passes bun run quality:fix
  • Tests pass (bun run test:all)

Technical Specifications

Reference Files

Dependencies

Related Issues

PR #1904 fixes #1896's routing symptom (criteria 1 and 3); this issue covers criterion 2.

Activity

  1. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 171 test files passed, 4108 tests passed (49.10s).

  2. self-assigned this
    on Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions