Repository navigation
Description
Overview
create_node persists a bare shell — content and type only — discarding every schema field value the user supplied in the same message. Split from #1839, where it was found while fixing that issue's 3→4→6 fixture chain.
Evidence
Reproduced directly, isolated daemon (NODESPACE_HOME=/tmp/ns-dump-test), gemma-4-e4b-q4km, n_ctx 32768, purged DB, freshly built daemon.
Schema created from "...equipment my team checks out, whether it's been returned, and what each item costs to replace":
schema get equipment_item
fields: [ is_returned (boolean), replacement_cost (number) ]
Then "Log a laser cutter checked out on the 12th, replacement cost 2400":
Tool executed tool=create_schema is_error=false result_field_count=2
Tool executed tool=create_node is_error=false result_field_count=0
args_preview={"content":"Laser Cutter Check Out Record","node_type":"equipment_item"}
The persisted node:
{ "node_type": "equipment_item",
"properties": { "equipment_item": { "_schema_version": 1 } } }No cost, no date, no status. The call succeeds and reports no error.
Mechanism — it is a prose/guidance problem, not tool schema or context
Ruled out by reading the verbatim prompt via NODESPACE_PROMPT_DUMP, rather than inferring:
1. The tool schema is correct. properties is offered, typed, and documented, with an example value:
"properties": { "description": "Schema field values (e.g. {\"status\": \"active\"}). ...", "type": "object" }
"required": ["node_type", "content"]2. The field names reached the model. The system prompt for that exact turn contained:
RELEVANT ENTITY TYPES:
- equipment_item: Equipment Item (is_returned, replacement_cost)
So replacement_cost was in the prompt, and "replacement cost 2400" was in the user message, in the same context window.
3. The guidance instructing it is present and emphatic. skill_pipeline.rs:300-325 ("Node Creation Guidance") says "Call create_node NOW with all values from the user message", "REQUIRED FIELDS: ... MUST be included in the properties map. Optional fields should be included if the user provided a value", and carries a worked example with a fully populated properties map. The [routed skills] marker added in #1839 confirms this skill routes on these turns (routed_skills=Organization, Research & Search, Node Creation).
So the model had the parameter, the field names, the values, and an explicit instruction with an example — and still omitted properties. Under ADR-064 that places this at rule 5 (prose), not rule 1 (tool schema): nothing about the call surface is missing or wrong. Two candidate directions, both prose-shaped:
propertiesis optional in the schema and hedged in the tool description ("Optionally pass 'properties' if the schema type has fields"), which reads as permission to skip it. The skill guidance's stronger instruction is competing with a weaker one on the tool itself.- The Node Creation skill's own instruction is dominated by its opening "IMMEDIATE ACTION REQUIRED ... do not output any planning text" framing, which optimizes for firing the call fast. Worth testing whether the urgency framing is crowding out the field-population instruction — cf. Reduce the resident prompt to identity and policy (measured 50% vs 73% for identity-only) #1827's finding that a long resident prompt measurably diluted its own rules.
Worth checking the two against each other before changing anything, same as the rest of this workstream.
Why this matters more than one scenario
Scenario 4 is not the only site. Scenario 8c does the same thing — "Put down Kind of Blue, it's by Miles Davis" creates an album_tracker node with no artist property.
8c/8d/8e may be one bug, not three. In the agent-matrix eval, scenarios 8d and 8e run after 8c in the same chat and both fail with zero tool calls. 6's failure is downstream of 4's property loss in exactly this way: the value 6 keys on was never stored, so no correct action exists. If 8d/8e are downstream of 8c the same way, fixing this single bug could clear three scenarios at once (6, 8d, 8e) — worth weighing in prioritization, and worth confirming before assuming the 8-series failures are independent.
What #1839 already did about it
#1839 added minProperties to the matrix fixture's toolOnce expectation and set it on scenario 4, so a zero-property create_node now fails loudly instead of scoring green. That is detection only — the eval drops 9/12 → 8/12, honestly reporting a break it was previously hiding. It also added property_count to create_node's tool result and folded it into result_field_count, so the persisted count is observable per call.
This issue is the fix.
Acceptance Criteria
- Determine which of the two prose candidates (or another cause) is responsible, measured rather than assumed
-
create_nodepopulatespropertieswith the schema field values present in the user's message, verified against the persisted node and not just the tool call - Confirm whether 8d/8e failures are downstream of 8c's property loss
- Re-run
bun run eval:agent; scenario 4 passes itsminPropertiesassertion, and report the resulting score
Architecture Impact
Likely ADR-064 rule 5 (prose) — tool description and/or seeded skill guidance. No tool-surface or storage change expected; exec_create_node already merges both nested properties and flat top-level extras correctly.
Activity
Fixture: agent-matrix scenarios 3->4->6 key on a value the chain neve…
malibio commentedon Jul 31, 2026
Baseline (fresh worktree, issue-1841-create-node-properties): Frontend: 171 test files passed, 4112 tests passed, 0 failed.
malibio commentedon Jul 31, 2026
Investigation note: the checked-in eval trace is stale evidence for this issue — do not use it
Before designing arms I checked
scripts/results-e4b.json/.trace.jsonlfor scenario 4. That trace does not show this bug, and would mislead anyone reproducing from it.In that run the model replied:
Scenario 3 in that same run created
Equipment Inventorywith fieldsstatus,checkout_date,due_date— and genuinely no cost field. So the model's statement was factually correct: there was noreplacement_costto populate. That is the fixture gap #1843 fixed, not a prose failure.Cause:
results-e4b.jsonwas last written by #1831 (905c5fc3), three commits before #1843 (756243a4) added the "and what each item costs to replace" clause to scenario 3. Scenario 3 builds its schema from natural language, so its field set is model-chosen per run, not fixed — which is exactly why a stale results file can look like a different bug entirely.This does not invalidate the issue. The repro in the description used the current schema (
is_returned,replacement_cost), hadreplacement_costin the prompt's RELEVANT ENTITY TYPES block, and still persisted zero properties. That remains the bug to fix.What it does change:
minProperties: 1can fail for two distinct reasons — the model dropping values it could have stored (this bug), or scenario 3 not creating a field to store them in (a fixture-variance artifact). A measurement that doesn't separate these will mis-attribute. I'll capture the scenario-3 field set alongside each scenario-4 result so the two are distinguishable.Both prose candidates from the description are confirmed present in source:
tools.rs:498("Optionally pass 'properties'") andskill_pipeline.rsNode Creation guidance. Proceeding to measure them against each other, unless redirected.malibio commentedon Jul 31, 2026
Root cause found — and it is not either prose candidate
Reproduced on the current build (freshly built daemon, purged DB,
NODESPACE_HOMEisolation verified viaserved_db_path, E4B, n_ctx 32768). Schema came out as the issue describes —equipment_item (is_returned: boolean, replacement_cost: number)— and the instance turn produced:Emitted call, verbatim from
NODESPACE_PROMPT_DUMP:{"content":"Laser Cutter Check Out Record","node_type":"equipment_item"}No
propertieskey at all — not an empty one.The guidance tells the model to read a structure that is not in its context
The Node Creation guidance refers to
schema_metadatasix times:I grepped the verbatim prompt for that turn. All six occurrences are the guidance mentioning the name. Not one is an actual payload. There is no
schema_metadataobject, nofieldsarray, norequiredflag anywhere in the model's context.What the model actually gets is one line:
Source —
packages/core/src/ops/context_ops.rs:246-247:Field names only. Type and required-ness are dropped on the floor.
So every field-population instruction in the skill is unsatisfiable as written: it directs the model to a
fieldsarray that does not exist, and conditions inclusion onrequired=true, which is never rendered. The model is not ignoring the instruction — it cannot follow it, and falls back to the two params it can ground (content,node_type), which are exactly the two it emitted.This reclassifies the issue
The description places this at ADR-064 rule 5 (prose), on the reasoning that "nothing about the call surface is missing or wrong." That holds for the tool schema —
propertiesis offered and correctly typed, and I confirmed the grammar from #1844 permits it (it is derived from the tool schemas and constrains syntax, not which optional fields are chosen). But it does not hold for the context surface: the guidance's named input is absent. That is rule 1, and it explains the failure without needing either prose candidate.Both prose candidates are real and still worth cleaning up, but on this evidence neither is the cause — rewording an instruction cannot fix an instruction whose referent does not exist.
Proposed fix
Render the field metadata the guidance already assumes: emit type and required-ness in the entity-types block, so
schema_metadata fields[].name/required=truehave a referent. Cheapest correct version is extendingcontext_ops.rsto render e.g.- equipment_item: Equipment Item (is_returned: boolean, replacement_cost: number), and aligning the guidance's wording to whatever that block is actually called.Measuring that against the current baseline next, plus a prose-only arm as a control so the attribution is tested rather than assumed. Proceeding unless redirected.
malibio commentedon Jul 31, 2026
Fix verified against the persisted node
Same isolated environment, purged DB, daemon rebuilt from the fix (
3902a742), same two prompts.Before — entity block
(is_returned, replacement_cost):After — entity block
(is_returned: boolean; replacement_cost: number):The value the user supplied now reaches storage, confirmed by reading the node back rather than trusting the tool call.
What changed (commit
3902a742)context_ops.rs— the real fix. Renders each field's name, type, and required-ness, so the guidance'sfields[].name/required=trueinstructions have a referent. Type and required-ness were already onSchemaField; the renderer was discarding both.skill_pipeline.rs— repointed the guidance's fiveschema_metadatareferences at RELEVANT ENTITY TYPES, the block that actually exists, and made the omission consequence explicit ("properties is the ONLY way any field value is stored").tools.rs— de-hedged the description (candidate 1 from the issue): "Optionally pass 'properties'" → "Always pass 'properties' with every schema field value the user supplied."Also corrected the stale module doc on
context_ops.rsthat claimed entity types are discovered viasearch_skillsreturningschema_metadata— the claim that made the guidance's phantom referent look correct.Attribution caveat, stated honestly
I shipped all three changes together and measured them together, so this single repro does not isolate which one carries the effect. I consider the rendering change primary on mechanism (it supplies a referent that was absent; rewording alone cannot fix an instruction whose target does not exist), but that is reasoning, not measurement, and n=1 on a nondeterministic model.
Scenario 4 stores one of the two values (cost, not the date/return-status), which satisfies
minProperties: 1and the fixture's stated intent — asserting "the particulars reached storage" rather than pinning which field.Next: full
bun run eval:agentfor the score, and checking whether 8d/8e are downstream of 8c.malibio commentedon Jul 31, 2026
Eval result: 9/12, and the 8d/8e question answered — they are not downstream of 8c
bun run eval:agent, commit3902a742, E4B, n_ctx 32768, purged DB, daemon rebuilt.Scenario 4 passes its
minPropertiesassertion — 8/12 → 9/12 against the honest post-#1839 baseline.AC3: are 8d/8e downstream of 8c's property loss? No — three separate causes.
The issue proposed that fixing this bug could clear 6, 8d and 8e at once. Measured, it does not, and each fails differently:
fieldCount=0, no artist). It passes only because its expectation is baretoolOncewith nominProperties; the assertion Fixture: agent-matrix scenarios 3->4->6 key on a value the chain never persists; trace doesn't record offered tools/routed skill #1839 added to scenario 4 was never added here. 8c is scoring green on the exact bug this issue is about.resolve_query. This is resolve_query must return a resolved node, not query fragments #1637's handoff gap, unrelated to property loss.Why 8c can't store the artist: a separate, pre-existing bug in schema creation
album_trackerandvenue_trackerwere both created with fieldsis_returnedandreplacement_cost— the equipment fields, copied verbatim. From the daemon log, all threecreate_schemacalls emitted byte-identicalfieldsarrays:So 8c had no artist field to populate — the same shape as the stale-trace artifact I flagged earlier, and unwinnable by construction.
I tested whether my change caused this, since rendering types could plausibly make the retrieved schema a more copyable template:
genre✅is_returned, replacement_cost❌bd29598f)is_returned, replacement_cost❌Identical pre- and post-fix — the contamination is pre-existing and my change is not responsible. It also reproduces across separate chat nodes, so it travels via semantic schema retrieval (the RELEVANT ENTITY TYPES block), not conversation history: a retrieved schema is being copied as a template for a new, unrelated type.
That is its own bug and out of scope here. I'll file it separately unless you'd rather it fold into this issue.
Recommendation
Add
minProperties: 1to 8c so it stops scoring green on this bug — but only once the schema-contamination bug is fixed, since 8c is currently unwinnable and the assertion would just convert a false pass into a blocked failure. Flagging rather than doing it here.malibio commentedon Jul 31, 2026
Filed the schema-contamination bug as #1846 — including the pre-/post-fix control showing it is not caused by this change, and the recommendation to add
minPropertiesto 8c once it is winnable.create_node discards user-supplied schema field values: the guidance …
Converge the RELEVANT ENTITY TYPES renderers on one shared function (#…