Repository navigation
Description
Overview
create_schema succeeds in the eval while creating a type with no properties, and the matrix cannot see it. Two independent defects combine:
- The agent is explicitly routed around the guidance that teaches it to pass
fields. - The
noExtraTypesassertion counts tool calls and never checks what was persisted, so the failure scores as a pass.
Both are guidance/measurement problems, not schema-engine problems. Filed separately from the deletion of the description-inference route so the assertion fix can land first and convert the false pass into an honest baseline.
Defect 1 — the agent is told to skip the guidance that teaches fields
packages/agent/src/agent_guidance.rs:42:
- For create_schema (new entity type): call create_schema DIRECTLY — no search_skills needed. See DATABASE=SCHEMA rule above.
The adjacent line 41 routes create_node through search_skills. Only create_schema is exempted — and search_skills is the only path to schema_creation_guidance() (packages/agent/src/skill_pipeline.rs:35-113), which carries two full worked examples with populated fields arrays.
The model is instructed to skip the one place that shows it how to write the call.
Confirmed in the eval traces: scenario 3's tool sequence is ['create_schema'] with no search_skills.
Defect 2 — the assertion cannot see the failure
scripts/eval/fixtures/agent-matrix.ts:120-129:
case "noExtraTypes": {
const count = actions.filter((t) => t === "create_schema").length;
if (count !== 1) { ... }
return { passed: true };
}It counts create_schema calls. It never checks that a schema persisted, or that it has fields. A call that is rejected outright still scores as a pass.
scripts/results-e4b.json states this in its own caveats:
Scenario 3 is a FALSE PASS in all three runs and #1775 did NOT fix it. The model calls create_schema with a title_template and NO fields array (
{"name":"Equipment Check-out Tracker","title_template":"{equipment} ({status})"}), which is rejected. The noExtraTypes assertion only checks that create_schema was called once, so it cannot see that nothing was created.
Note the model supplies neither fields nor description — it omits the field spec entirely, then fails on title-template validation referencing fields that do not exist.
Work
- Strengthen
noExtraTypes(or add a companion assertion) to assert the schema persisted and has a non-empty field list — not just that onecreate_schemacall occurred - Re-run the matrix to confirm scenario 3 now fails honestly, and record that as the corrected baseline
- Change
agent_guidance.rs:42to routecreate_schemathroughsearch_skills, mirroring line 41:
- For create_schema (new entity type): call search_skills(query) THEN immediately call create_schema in the SAME turn — no text between them. - Re-run and record per-scenario tool traces and failure reasons
- Only if the routing change alone is insufficient, add to
SCHEMA_CREATION_RULES:
FIELDS ARE REQUIRED: A create_schema call with no "fields" array creates a type with no properties — the user cannot record anything against it. Before calling, list the properties implied by the request and pass each one as {"name":...,"type":...}.
Land the routing change alone first; adding both at once means not knowing which one worked, and this one costs tokens on every turn.
Acceptance Criteria
-
noExtraTypes(or its companion) fails when a schema is created with no fields — demonstrated by the assertion failing on the current code before the guidance fix - Scenario 3 passes on an assertion that could have failed
- Per-scenario tool traces and failure reasons recorded, not just a headline count
- No worked example added to guidance reuses eval prompt wording (
guidance_is_not_contaminated_by_eval_promptsenforces this)
Explicitly NOT an acceptance criterion: 12/12
The headline score is not a target here, for reasons documented in the results file and in #1775:
- Not reachable by this work — scenario 6 is owned by resolve_query must return a resolved node, not query fragments #1637; 8c/8d fail on the cross-turn duplicate write (Agent re-executes the previous turn's instruction, creating a duplicate node (cross-turn; the per-turn duplicate guard cannot catch it) #1780)
- Documented as noise: three runs of identical code scored 10/12, 9/12, 8/12, with scenario 5 flipping pass/fail/pass. The results file's own guidance is "Do not use the headline count to judge a change; use per-scenario tool traces."
- Targeting the score creates pressure toward the degenerate fix Agent guidance contains verbatim aichat-matrix prompts — the eval is measuring recall of planted examples, not generalization #1760 was filed to remove — a worked example resembling an eval prompt. The contamination test blocks the literal form, not a close paraphrase.
Notes
Any eval re-run must purge the DB and rebuild the daemon first. Seeding skips existing nodes and guidance lives in compiled-in Rust constants, so a plain re-run silently measures the old text. Verify the daemon log reports skipped=0.
Activity
malibio commentedon Jul 29, 2026
Paired with #1800 (delete the create_schema description-inference route).
Land this issue's
noExtraTypesassertion fix first. Scenario 3 is currently a false pass, so until the assertion can distinguish "schema created with fields" from "call rejected, nothing persisted," there is no baseline to measure #1800 against.malibio commentedon Jul 29, 2026
Baseline (worktree issue-1799-schema-fields-assertion): Frontend 4106 passed / 170 test files, 0 failed.
malibio commentedon Jul 29, 2026
Assertion fix verified; the routing change was measured and NOT shipped
The assertion works — scenario 3's false pass is now an honest failure
Run against the unmodified guidance, so the assertion is demonstrated failing on current code:
create_schema was called but REJECTED — no schema persistedcreate_schema succeeded but persisted a type with NO fields8a/8b are the case this issue's framing would have missed. Those calls succeeded (
is_error=false) and still produced an unusable type, so a check that only asked "did the call error?" could not see them.Two corrections to the issue body worth recording:
validate_template_tokens(packages/core/src/behaviors/mod.rs:1370) becausetitle_templatereferences{equipment}, which was never defined. Acreate_schemacarrying neitherfieldsnordescriptionis valid by design (packages/core/src/schema/mod.rs:275-277) and persists an empty-field type.noExtraTypeswas not the only blind assertion. Scenarios 8a/8b reachcreate_schemathroughtoolOnce, which had the identical count-only hole. The soundness check is shared across both branches; fixing onlynoExtraTypeswould have left most of the measurement defect in place.Both branches are mutation-tested — reverting either one fails exactly its own two unit tests and no others.
The routing change (checklist item 3) makes behavior worse and was dropped
A/B under identical conditions (purged DB, daemon rebuilt,
skipped=0verified, same model and n_ctx):create_schemaDIRECTLY)search_skillsScenarios 3, 4, 5, 8a, 8b, 8c called
search_skillsand then stopped without the action tool. The model derived the right fields in prose and asked for confirmation instead of acting:Scenario 8a asked "do you want me to create that tracker for us first?", which the BLAST-RADIUS GATE explicitly forbids.
The premise behind item 3 does not hold.
SCHEMA_CREATION_RULES(agent_guidance.rs:20-27) is resident on every turn and already contains the exact rule the model broke: "Every {field_name} in title_template MUST appear in the fields array." The model was not routed away from field instructions — it had them, and the extra round-trip cost more than the worked examples gained.A third run isolating the duplication (resident schema rules removed, routing kept) scored 5/12 — better than 3/12, still below the 6/12 control.
Retrieval was also wrong: "track equipment checkout and return status" matched Organization Guidance at 0.74 confidence, not Schema Creation.
Scope landing here
Shipping the assertion fix only. Checklist items 3-5 (the guidance change and its conditional follow-up) are not shipped — item 3 is disproven and item 5 was conditional on it.
The underlying guidance defect is filed as #1802, with all three runs as evidence. It also records a concrete bug found along the way:
SCHEMA_CREATION_RULESteachescore_values(snake_case) while the tool schema declarescoreValues(packages/agent/src/local_agent/tools.rs:630,698) — the resident guidance teaches a key the API rejects.Address review: correct two comments that misstated mechanisms (#1799)
Make the create_schema eval assertions able to see a failed schema cr…