Repository navigation
Ground project lookups, refuse relationship names as field values, log per-request cost (refs #3706, #3704; closes #3705) - #3709
Conversation
Code Review SummaryNet positive. The relationship-key refusal is a sound, narrowly scoped fix (refuse rather than rewrite, because the edge needs an id a field value doesn't carry). The mentioned-entity grounding is small and correct. The main risks are in the routing widening, where the write-word exclusion is a closed list that fails open in the unsafe direction, and in test coverage for the false-refusal escape hatch. No Sync-boundary, issue-number or lint-suppression violations found in the diff. Verdict: APPROVE with improvements (no blockers). Findings🔴 CriticalNone. 🟡 Improvements
🟢 Nitpicks
Standards check
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE with improvements (posted as a comment — GitHub blocks self-approval).
Address review (4f4a21d)Addressed (7 of 9)
Skipped
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: Every change narrows behaviour (more cases stay on the old route, fewer keys refused) or moves code behind one helper, with tests; no new behaviour. The PR stays open and unmerged. |
|
Merge queue: #3709 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
|
Merge queue: #3709 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
|
Merge queue: #3709 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
… log per-request cost (refs #3706, closes #3705, refs #3704) - update_node and create_node refuse a key that names a relationship the type does not declare as a field (bare, custom: or type__ prefixed) and name the create_relationship call that sets it, from the declaring side. - Ids of entities the system resolved for the message count as grounded, so a correct answer that links the mentioned project is not replaced. - A question without a question mark ("tell me how many", "how many", a polite request to read) that Stage 1 routed as a query becomes a lookup, so it no longer carries the write skills and tools. - OpenAI-compatible and local requests log duration, first byte or chunk, prompt/completion/reasoning tokens and the sizes of system prompt, conversation and tool schemas. - Grounding eval gains a project count and an assign scenario; a core test covers the links from tasks for a resolved project. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
…-size code (refs #3706) - The write-word list grows to the verbs a read could be followed by, and "then" ends the lookup reading; tests for complete, reschedule, cancel and a stacked opening. - A built-in inbound relationship name is left to the store; a schema that cannot be read no longer refuses a write. - One RequestSizes for both inference paths, in bytes (the fields were named chars), and a failed local request is logged too. - Test for the create_node refusal and the built-in inbound name. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
4f4a21d to
7a8e7ce
Compare
What
Follow-up to the grounding work already merged. Measured on the local model (gemma-4-e4b-q4km), 3 reps per scenario.
update_node/create_noderefuse a key that names a relationship of the type (bare,custom:, ortype__prefixed) and name thecreate_relationshipcall, from the declaring side (a task'sassigneeis written from the person undertasks). A field the type declares always wins over a relationship of the same name.projectbrings thetask via projectlink; core test plus eval scenario.Measured (local model,
bun run eval:grounding, 3 reps)status-of-assigned0/3status-of-assignedfinds the right two tasks and the tool result carriesopen/in_progress; the model writes "which has started today" for the second. That is the 4B model paraphrasing a value, not a context gap, and it passed on the larger query-route prompt.Not done here
Remote-model measurements (reasoning and non-reasoning) need an OpenRouter key in the isolated daemon's database; the harness only drives a loaded local model.
Test plan
bun run test:changedpasses; new tests: relationship-as-field refusal and the create_relationship call it names, resolved-entity grounding, override cases both ways, project links, request-size/reasoning-token parsing.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj