Repository navigation
Description
Problem
"What schemas do we have here?" in the local AI chat (model gemma-4-E4B-it Q4_K_M, fresh DB with the Spec-driven playbook installed) replies:
⚠️ node search encountered an error. Please try again or check the details and retry.
Trace (daemon log, 20:03:26–20:04:01)
find_skills "list schemas available"→ Schema Creation 0.877, Spec-driven Workspace 0.786, Research & Search 0.781.- Call 1 — malformed arguments.
search_nodesreceived{"direction":false,"query=\"\",node_type=\"schema\",limit=50,sorting=[{\"field\"":null}→unknown field 'direction', expected one of query, node_type, filters, sorting, limit. The model emitted kwargs-style arguments (query="",node_type="schema",limit=50,sorting=[{field…,direction:false}]) and the tool-call capture collapsed them into one bogus key, apparently breaking on the nestedsortingarray-of-objects. - Call 2 — prose inside the arguments. The model put its answer text ("I found a few schemas in your workspace. The available ones are 'plan', and 'spec'…") inside the tool call's arguments → rejected again.
- Final prose was wrong anyway: "The available ones are 'plan' and 'spec'", but the DB has 21 schemas. The routing decision's schema candidates were
["plan","spec"], i.e. the workspace context apparently lists only non-core types, so the model thinks those are all there is. - The "tool failures not surfaced in model response" safety net replaced the ungrounded answer with the generic error. Blocking it was right, but the message gives the user nothing to act on.
Acceptance criteria
- Reproduce the arg capture for gemma-4-E4B with a nested array-of-objects argument (
sorting: [{field, direction}]); fix the tool-call parsing (nlp-engine chat / grammar path) so the arguments arrive intact, or constrain the grammar so the model can't emit that shape. Add a parser test with this exact output - A tool call whose "arguments" are prose is detected as a malformed call (re-prompted, not dispatched as field names)
- "What schemas/types do we have?" returns every schema: core types (task, person, project, skill, …) as well as user/playbook types. Either the workspace context names them or the agent is steered to
search_nodes node_type=schema(or a dedicated schema-listing tool) - When the safety net replaces a reply, the message says what failed in plain terms (e.g. "I couldn't run the search: the tool call was malformed") rather than a generic retry prompt
-
eval:decisions(or a golden) covering "what schemas do we have" on the default local model
Folded in: three eval failures left after #3500
Measured on main after #3504 (gemma-4-e4b-q4km, --runs 3, database purged and daemon restarted between reps). The decision fixture now seeds its workspace before every chat and has no setup turns, so each of these is the first turn of a clean chat.
1. outcome-list-types (eval:decisions), 0/3. "What schemas do we have here?" routes as a lookup, Research & Search leads, search_nodes succeeds, and the reply is replaced by the confirm-first stand-in ("I'd like to help with that. Could you confirm what you'd like me to do?…"), which the agent substitutes for a reply it suppresses when nothing was written. This scenario passed after #3482; it is the listing failure in a new shape.
2. indirect-schema-freelance (eval:routing), 0/3. "start tracking our planning cycles" retrieves Graph Editing / Relationship Management / Node Creation, not Schema Creation, and create_node fails twice. Same shape as #1912 (a "start tracking" request missing Schema Creation), which was closed as fixed. Also failed in the one-rep run before #3504.
3. skill-instance-request (eval:decisions), 0/3. "Add Contoso Ltd to the companies we sell to." leads with Bulk Import on a near-tie: Bulk Import 0.742, Organization 0.741, Node Creation 0.737. The turn still calls create_node and creates the record; the scenario fails on the skill decision. With the two setup turns the fixture used to put ahead of every scenario, the tie went to Organization and it passed 3/3, so the setup history was hiding it.
-
outcome-list-typespasses 3/3 in a fulleval:decisionsrun: a listing turn whose search succeeded is not replaced by the confirm-first stand-in -
indirect-schema-freelancepasses 3/3 in a fulleval:routingrun, or its expectation is changed with the reason recorded in the fixture -
skill-instance-requestpasses 3/3 in a fulleval:decisionsrun: a single-instance request on an existing type does not lead with Bulk Import, or the scenario's expectation is changed with the reason recorded (the turn's write is correct; only the skill decision misses)
Activity
malibio commentedon Oct 1, 2026
Frontend baseline: 298 test files passed, 5510 tests passed (90.57s)
malibio commentedon Oct 1, 2026
PR #3463 covers criteria 1, 2 and 4. Two stay open:
Criterion 3 — "returns every schema" is partly met.
search_nodeswithnode_type='schema'(3 of 3 on each of two test databases; 0 of 3 before), and the result holds every type, built-in and custom, each with a title.Criterion 5 — the eval scenario exists but has no score.
outcome-list-typesineval:decisionsscores the reply naming built-in and custom types off a successful search.setup-venueturn declined to re-create a type that already existed, and the runner drops every scenario after a setup turn that calls no tool. Four of twelve groups were excluded that way in the one clean rep.What would close them: a reading of
outcome-list-typeson the default model once its group runs (which needs the setup-turn exclusion looked at), and whatever that reading shows is needed for the reply to enumerate.Constrain Gemma 4 tool-call argument keys and report malformed calls (c…
malibio commentedon Oct 1, 2026
Two smaller follow-ups from PR #3463, recorded here so they are not only in the PR thread:
<tool_call|>wherever it appears on a Gemma 4 turn (ends_gemma4_tool_callinpackages/nlp-engine/src/chat/mod.rs). A prose reply that samples the marker with no call open is cut off there. Review suggested gating the stop on a call having started; it was not applied because the only test of that wiring is a live-model one (toolcall_json_shape,--run-ignored only) and the GPU was in use. It needs that run to verify.llama-cpp-2pin at the upgrade checklist. The comment on the pin inpackages/nlp-engine/Cargo.tomlnames the live tests but not the "When the binding is upgraded" section of ADR-056, which now holds the full procedure.malibio commentedon Oct 1, 2026
Resuming for criteria 3 and 5. Frontend baseline: 301 test files passed, 5560 tests passed (85.98s)
Complete a type listing in the reply, and score eval groups whose set…
Complete a type listing in the reply, and score eval groups whose set…
malibio commentedon Oct 1, 2026
PR #3482 is merged. Status of the two criteria it was for:
Criterion 5 — met.
outcome-list-typesnow gets scored: one rep ofeval:decisionson gemma-4-e4b-q4km scored all 12 scenarios (4 of 12 were excluded before) and the scenario passed. The exclusion came from setup turns that rightly created nothing because their type already existed; a group is now scored when such a turn did nothing and the type is present.Criterion 3 — met for "What schemas do we have?", not for "What types do we have?".
eval:routingwent from 18 of 19 to 16 of 19, so it is not seeded.What is left, if the "types" wording is to route without a question: a skill title and description tuned against multi-rep routing and decisions evals. The measurements are in ADR-064's 2026-10-02 amendment.
Also still open from the earlier comment: gating the close-marker stop on an open call, and pointing the
llama-cpp-2pin's comment at the ADR-056 upgrade section.[-]Chat 'what schemas do we have': Gemma 4 E4B tool-call arguments mangled, prose sent as arguments, and only playbook types listed[/-][+]Chat 'what schemas do we have' still fails, plus two skill-retrieval misses on plain requests (type listing, 'start tracking', single-instance add)[/+]malibio commentedon Oct 3, 2026
Folded in three eval failures that remained after #3504 (see the new section and its three acceptance criteria in the description):
outcome-list-typesnow fails 0/3 because a successful listing is replaced by the confirm-first stand-in;indirect-schema-freelance("start tracking our planning cycles") misses Schema Creation, the same shape as #1912; andskill-instance-requestleads with Bulk Import on a 0.742/0.741 retrieval tie that the old setup turns had been tipping. Full numbers: #3500 (comment)malibio commentedon Oct 3, 2026
Baseline for the remaining acceptance criteria (worktree issue-3268-listing-and-skill-misses, main at b1d0e28). Frontend: 309 test files passed, 5606 tests passed.
Address review: bound the id unescape, add a cost-side control for tr…
Address re-review: make the ordering test depend on the order, and re…
Narrow Schema Creation's opening to the tracking verb, and guard chan…
Revert Node Creation's single-record clause and assert what the scena…
Address review: the relaxed scenario also requires a skill that can c…
Address review: say what losing the lead costs the record tool, and g…
Keep a type listing whose links escape their ids, and route start-tra…