Skip to content

Make the lookup and assign paths hold on remote models; run the grounding eval against a remote provider (refs #3706, #3704) - #3716

Merged
malibio merged 4 commits into
mainfrom
issue-3706-remote-measurements
Oct 11, 2026
Merged

malibio merged 4 commits into
mainfrom
issue-3706-remote-measurements

Conversation

@malibio

@malibio malibio commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What this does

Runs the grounding eval against remote models and fixes what it found. The first Haiku 5.5 run was 4 of 7 stable; every failure had a cause in the tools or the context, not in the model. It also removes the first of a lookup turn's sequential requests, and reads ids a small model writes with their labels.

Fixes

  • search_nodes read a query of quote marks alone ("" written as JSON text) as a search for those marks, so a correct relationship filter returned nothing and the reply said "no tasks". Quote-only queries now mean an empty query. A test fails without the fix.
  • create_relationship given a reverse name (a task's assignee) failed with a message that named neither working form. It now names the call: from the declaring end (the person), under the forward name (tasks). The hint applies only between the types the name relates, and the store's own answer stays beside it.
  • Graph Editing and Node Creation refuse a relationship written as a field and say to call create_relationship, but did not grant that tool. Both grant it now. The Stage-2 golden changes by that one tool definition.
  • "me", "my", "mine", "myself" bring the database's owner into the resolved entities with their id and the links from tasks, as a named person gets them, within the entity cap.
  • The current-user line names the owner by id even when name and email are blank. It used to drop out, which left the model asking the user for a node id.
  • Stage 1 is skipped for a settled lookup. A question about what the workspace holds is already read as a lookup of the message whatever Stage 1 answers (decision_on_the_message_alone), so the generation that precedes it is not made (routing::lookup_without_stage1). Clarification answers and every message that asks for a change still go to Stage 1. Routing time per lookup turn fell from 540-800ms to 24-64ms on the remote models; on the local model the removed request took ~2.5s.
  • node_id_arg reads an id written with its label (Plan the offsite task ID (<uuid>), which the 4B model writes) when the text holds exactly one UUID. Used by get_node, update_node, create_relationship, update_task_status; deletes keep the strict form.

Eval

  • NS_MODEL=openai-compat:<config-id>:<model> runs the suite against a provider configured on the served database. Preflight checks the provider exists and the model is loaded.
  • The assign scenario passes only on a successful create_relationship; an errored call used to pass (so earlier "assign 3/3" local results overstated it).
  • New count-for-me scenario; the fixture names the seeded owner.
  • The uniformity guard believes a full pass with at least two kinds of tool and four distinct replies; before it needed three tools, which this suite never calls.

Measured (final tree; 8 scenarios × 3 reps)

Haiku 5.5 (reasoning, adaptive) Gemma 4 31B (non-reasoning) Gemma 4 e4b (local, 4B)
Stable across 3 reps 8 of 8 8 of 8 7 of 8
Requests / all OK 59 / 59 57 / 57 n/a

The local model fails assign-to-person 0 of 3: it gets the update_node refusal and the create_relationship hint (both name relationship_type 'tasks') and sends an invented assigned_to anyway. status-of-assigned and count-for-me pass 3 of 3 on it.

Local request timings (the follow-up request, which re-sends the same tools, is 2.5s because of the prefix cache; the first request's 6.7K-token prefill is ~14s of the ~15s) show where the remaining cost is: the size of the first request.

Before the fixes Haiku was 4 of 7 stable (count-first-name and count-missing-preposition flipped on the quote-only query; assign-to-person failed 2 of 3 with no create_relationship in its tool surface).

Test plan

  • bun run test:changed
  • bun run quality:fix
  • Each regression test checked to fail without its fix (quote-only query, hint between other types)
  • Smoke tests on every model before each full run

closes #3706; refs #3704

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj

@malibio

malibio commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

Code Review Summary

Net positive. Each fix answers a failure the remote-model eval actually surfaced, and the Rust changes are small and mostly well tested. I found no blockers. There is one formatting defect that quality:fix will rewrite (scripts/aichat.ts), and a few correctness edges worth deciding before merge. No secrets are in the diff: assertRemoteProvider extracts only provider ids from the settings payload and prints only ids; the api_key in the test fixture is a dummy literal.

Against #3706, this PR is measurement and grounding work, not the issue's core ask.

Open or unmet:

  • Prompt-size reduction for read-only lookups (the schema-creation procedure and schema-write tools in a lookup turn).
  • The before/after request-size record on the issue.
  • The "one other core type with a derived relationship" assertion.
  • "At least two models, one of them Mistral Large" is not evidenced in the diff.

Advanced:

The PR should say "refs", not "closes", for both issues.

Findings

Critical Issues

None.

Important

  • packages/agent/src/local_agent/tools.rs:3924-3952 (reverse_name_hint): it can misdirect, and it replaces the store's real error.
    • It tests only that one node's type has a reverse-declared hop named name. It never checks that the other node is the declaring type.
    • Example: create_relationship(task, project, "assignee") is told to use a 'person' node with tasks, though neither node is a person.
    • Any failure with a reverse name becomes InvalidArguments: a missing node, a database error, an OCC conflict. The original e is dropped without a log.
    • Principle: don't mask the root cause (error fidelity).
    • Fix: emit the hint only when the other node's type is_a hop.source_type (via type_is_a, not a literal comparison). Log or append e on the hint path.
    • Test gap: add a mismatched-type case (task and project) that must keep the store's message. The unknown-name branch asserts only the absence of a substring; assert the store's actual text so a swallowed error is caught.
  • packages/core/src/ops/context_ops.rs:765-775 (include_current_user): it breaks the MAX_RESOLVED_ENTITIES (5) cap.
    • entities.insert(0, me) on a full list yields 6 entities, and not_shown is unchanged.
    • The synthetic score: 0.0 entity flows into mentioned_entities (local_agent_service.rs:3322), which mentioned_entity_duplicated_by (agent_loop.rs:1028) matches against. The fallback title "Current user" is not a real record title and becomes a duplicate-create target.
    • Fix: truncate after inserting and count the evicted entry in not_shown. Decide deliberately whether the owner belongs in mentioned_entities (probably yes for a real name, no for the placeholder), and pin it with a test.
  • Same function, NoMatch rendering. A message like "assign Foo Corp to me" with Foo Corp absent turns NoMatch into Resolved{[me]}. The "none found, anything named in this message does not exist yet" statement is lost for Foo Corp. That statement is the duplicate-create protection it exists for. Keep it for the named part, or pin the intended behaviour with a test. The new tests cover only pure "me" and the "meeting/mystery" case.
  • refers_to_current_user (context_ops.rs:718-726) is an English-only word match and also fires inside quoted or pasted text (titled "Tell me more"). The cost is low (one entity line), so this is acceptable. Say so in the doc comment.

Suggested Improvements

  • packages/core/src/ops/search_ops.rs:30-42 (normalize_enumerate_query):
    • Legitimate queries keep their meaning. Only the emptiness test uses the quote-trimmed form, and the function still returns the original trimmed. Rock 'n' Roll' stays a literal term.
    • The only non-test caller is search_semantic (search_ops.rs:616), which serves both the agent and the CLI/gRPC paths. A quote-only CLI query now enumerates instead of searching literally, which is the intent.
    • Add a regression test for Rock 'n' Roll' and 'quoted', so a later switch to returning unquoted fails.
  • Granting create_relationship (skill_pipeline.rs:216,379, golden diff) is consistent.
    • skill_is_mutating was already true for both skills, so score_bar_for is unchanged.
    • no_write_tool_is_reachable_from_only_one_skill only improves, since the tool already has other owners.
    • The golden adds exactly one ### create_relationship block, which is what the grant implies.
    • The pairing comments above both seeds do not mention the new tool. One line on why would help.
  • Current-user line (workspace-context-template.md:4, prompt_assembler.rs): Current user: (person node <id>). "me", "my" and "I" refer to this person. is readable and gives the model an id to filter by. Nothing else relied on the omission, since the two tests that did were updated. Nit: "Current user: person node ." would read better.
  • scripts/eval/runner.ts:758-764 (uniformity guard): the guard is modestly weaker, and the trade-off is documented.
    • A dead environment calls zero tools and is still flagged.
    • A partially dead run where one scenario calls a tool and the error replies vary (the text embeds an id or the prompt) would now pass.
    • Consider requiring 2 tools on the reply path.
    • The tests pin the reply threshold on both sides (3 versus 4), zero tools, one reply, and a uniform zero. They do not pin the tool boundary at exactly 1; add checkUniformity(7, 7, undefined, 1, 4) is null.
  • scripts/eval/preflight.ts:
    • There are now two "3." step labels; renumber.
    • assertRemoteProvider is untested end to end; only the parsers are tested. That is acceptable.
    • providerIdsIn takes the first providers array found recursively, which is fine for the documented hoisting.
    • Skipping the granted-window check for remote models is right. status.loaded is still required, so verify it is true for remote providers.
  • scripts/eval/fixtures/grounding.ts:
    • The extra task Book the venue must not change any unfiltered or open-task count in the other scenarios. Their expectations are unchanged (2, 2, 2, 0, 1, 2), so confirm.
    • The assigned assertion now requires a non-error create_relationship call. That is a good tightening.
    • Owner seeding fails loudly if no owner is found.

Nitpicks

  • Nit: scripts/aichat.ts:33 has const WORKTREE =resolve(, a missing space. bun run quality:fix will rewrite it.
  • Nit: the parameter name read_from in reverse_relationship_call is vague; target_type says more.

Test quality

  • The quote-query tests fail without the fix.
  • The include_current_user positive test fails without the fix. The "meeting/mystery" test only guards against over-matching and would pass if the function were deleted.
  • The reverse-name test fails without the fix, since the old message named neither call.
  • The prompt_assembler tests assert the exact line for a blank identity, including the cleared case.

Recommendation: COMMENT

No blocker. The hint-direction and entity-cap points are small and best fixed in this PR. Run bun run quality:fix for the formatting nit.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review: COMMENT (posted as a comment, GitHub blocks self-approval). Full findings in the review comment above.

@malibio

malibio commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

Address-review summary (f251740)

Review verdict was COMMENT with no blockers. Addressed 9 of 11 points; 2 skipped with reasons.

Addressed

  • Hint misdirection (Important). reverse_name_hint now applies only when the other node's type is the declaring type or extends it (query_ops::type_extends, which reads the extends chain for any type id). A project holds its own tasks, so a task and a project no longer get sent to a person. New test a_reverse_name_between_other_types_keeps_the_stores_message; I disabled the check and confirmed it fails with the exact misdirection.
  • Store error swallowed (Important). The hint now ends with The store's answer was: <store message>. The unknown-name branch asserts the store's text (not defined in schema), not just the absence of a substring.
  • Entity cap overflow (Important). The owner is inserted first, then the list is truncated to MAX_RESOLVED_ENTITIES and the displaced match is counted in not_shown. Test the_owner_joining_a_full_list_keeps_the_cap_and_counts_the_cut.
  • NoMatch becoming Resolved (Important). Kept deliberately, now documented and pinned (a_missing_name_beside_me_leaves_the_owner_alone_in_the_list): the guidance to check each name against the list covers a name that is absent, as it does whenever some other name matched.
  • English-only / quoted-text match. Documented on FIRST_PERSON_WORDS; the cost is one entity line.
  • normalize_enumerate_query regression test. Pins 'quoted' and Rock 'n' Roll' staying literal terms, so a later switch to returning the trimmed form fails.
  • Uniformity guard. Varied replies are believed only beside two kinds of tool; the boundary is tested at 1 and 2.
  • Nits. preflight steps renumbered; const WORKTREE =resolve( fixed; read_from renamed target_type; one comment on each of the two skills explaining why they grant create_relationship.

Skipped

  • "Current user: person node ." wording. The current line reads clearly and is pinned by the prompt-assembler tests; a rewording would only churn the golden for no measured gain.
  • Duplicate-guard treatment of the placeholder title "Current user". Decided deliberately to keep the owner a resolved entity like any other (documented in the doc comment); a record literally titled "Current user" is not a case worth a special path.

Also checked

bun run test:changed and bun run quality:fix pass on the pushed tree.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: Each change answers a point the reviewer raised and is covered by a test that fails without it. The logic changes are small and local (a type check added to a hint that only fires after the store has already refused, a truncate-and-count after an insert, one threshold constant); the rest is documentation, tests and a rename.

@malibio

malibio commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

Re-review summary (a8f8b30..af216c1)

Net positive; no blockers. The first-review fixes are present and match the address-review comment (type check in reverse_name_hint plus the store's text appended, cap truncation with not_shown, normalize_enumerate_query pin, refs kept in the comment). cargo fmt --check -p nodespace-agent is clean and no key or secret appears in the new diff. One factual premise in the new lookup_without_stage1 doc comment is wrong for marked questions that also ask for a change; I would fix or pin that before merge.

Important

  1. packages/agent/src/local_agent/routing.rs:491-519 (lookup_without_stage1) and the premise in its doc ("What it leaves alone is a clarification and a split, and those are for requests that ask for something to be done, which this one never is"). asks_what_the_workspace_holds (routing.rs:319, 345) returns marked || ...: any message that opens with a question word and ends in ? qualifies, and asks_for_a_write is consulted only for unmarked messages. So "What is the status of the offsite task, and can you mark it done?" or "Who owns Plan the offsite? Also, can you reassign it to me?" is now a settled Lookup with no Stage 1. Before, decision_on_the_message_alone overrode only a Stage-1 Query; a Multi split survived, and the existing doc comments say the split was a measured concern. The new unit test a_message_stage_one_must_still_be_asked_about_is_left_to_it covers only unmarked write messages, so this case is untested. The cost is bounded (a read-only turn, and the user re-asks), which is why this is not a blocker. Principle: a short-circuit must be exactly as narrow as the premise it relies on. Fix: either apply asks_for_a_write to marked messages inside lookup_without_stage1 (only the skip, leaving decision_on_the_message_alone as is) or add a test that pins the marked-compound case as intended and correct the doc sentence.

  2. routing.rs:491-519 / agent_loop.rs:5520-5531: a question-shaped follow-up with turns ahead ("How many of them are open?", "Who approved it?") used to get a Stage-1 pass on the message alone; if Stage 1 returned no routing tool, the turn fell through to the blended pass, which carried the conversation. Now it is always Lookup(<raw message>). The retrieval query becomes find, look up, or search stored knowledge for How many of them are open, and outcome.lookup_topic is the raw text, which the code comment at agent_loop.rs:5494 says is the system's fallback search when Stage 2 does not search. For a first message with a named subject (the measured cases) the raw question is a fine topic. For pronoun follow-ups it is a poor one, where the old no-tool path had context. Retrieval itself is low risk (the capability prefix dominates, and Lookup already ignored the cleaner-topic difference in the test's expectations). Suggestion-level unless the eval has a pronoun follow-up scenario; at least say in the doc that this regression is accepted, since the agent_loop comment above the block (5490-5500, "A follow-up that leans on its context ... can come back a lookup ...") still reads as if Stage 1 is always asked.

  3. packages/agent/src/local_agent/tools.rs:825-843 (node_id_arg) on mutating tools (update_node 5160, update_task_status 5665, create_relationship 5364-5366). Behaviour is sound for the cases I checked: exactly-one-distinct-UUID only; two UUIDs, no UUID, date/schema/settings-singleton ids are returned as written; found.dedup() collapses only adjacent repeats, so "A, B, A" stays unresolved (conservative, correct). delete_node (5465 area), delete_relationship (6098+), get_related_nodes, get_node_context, run_query keep strip_node_uri, so deletes are strict as claimed. Residual risks:

    • Prose that names one UUID but means another ("not , the one under ..." has two and is refused; "the duplicate of " has one and acts on A). Rare, and a model writing this is already wrong, but it is a silent write on a node the model did not unambiguously name. Mitigation that costs one line: when the id was rewritten, log it at debug/warn and have the tool result carry the resolved id (update_node and update_task_status results already return the node), so the model and the trace see that a correction happened. Right now a model that systematically decorates ids is invisible.
    • Inconsistency: the same decorated id works in get_node but fails in get_related_nodes/get_node_context, which the 4B model reaches from the same entity list. Either route the read tools through node_id_arg too (reads are safe) or note why not.
      Principle: tolerate input on reads freely, but make a repaired write visible.

Suggestions

  1. Tracing: routing.stage1_skipped is a span attribute only. The loop's own comment (agent_loop.rs ~5560) says the eval scrapes the text log, and the two tracing::info! lines carry routing_passes and routing_decided_on but not the skip. With the skip, routing_decided_on = "message" and routing_passes = 0 is coherent (usage is correctly untouched: InferenceUsage::default() and no addition to outcome.usage), but passes = 0 plus "message" is the only text-log trace of the skip. Add routing_stage1_skipped = true to the logged fields, or accept that passes=0 is the signal and say so.

  2. Interactions I checked and found sound: answering_a_clarification short-circuits to None, so the answer to a clarification still goes to Stage 1 (pinned in the routing unit test, not in the loop). session_already_clarified is only reached on a Clarify decision, which a skipped turn can never produce, so the at-most-one-clarify contract is not weakened; ambiguous question-shaped messages cannot now be clarified at Stage 1, but a lookup turn's surface already excludes route_clarify (agent_loop.rs ~3286), so the prior reach of that outcome was narrow. Pinned skills do not depend on Stage 1 (the failure path already builds them without it).

  3. Tests (item 3 of the request). The changes keep their intent: every edited message became a "Find ..."/"Find out ..." request that is lookup-shaped but not a question-word opener, so asks_what_the_workspace_holds is false and Stage 1 still runs; the assertions are unchanged. The cost is that the question-shaped inputs no longer reach Stage 1 at loop level, so these now pin only the non-question path:

    • a_question_with_history_is_routed_on_the_message_alone (asked[0] assertion) and a_query_decided_in_context_is_not_read_as_a_lookup (the blended-pass Query) no longer cover a question; the unit tests on decision_on_the_message_alone still cover the Query-to-Lookup override.
    • Not tested at loop level: the answer to a clarification (question-shaped) still produces a Stage-1 request. Add a short loop test with a prior Clarified turn and a question-shaped answer asserting two generations, since the whole premise of the skip rests on that guard.
    • Not tested: marked compound (item 1), and an outcome.usage/routing_passes assertion for the skip.
      a_settled_lookup_is_not_put_to_stage_one is a good test (asserts retrieved query and one generation, with and without history).
  4. PR body: the last line still reads closes #3706; refs #3704. The first review asked for refs for both, and the address-review comment says "The PR keeps refs for AI-Chat context is neither targeted nor grounded: too much that does not bear on the message, too little on what it is about #3706 and Profile AI-Chat turn latency on OpenAI-compatible endpoints and the local engine #3704". Fix the body, or the merge will auto-close AI-Chat context is neither targeted nor grounded: too much that does not bear on the message, too little on what it is about #3706 while the prompt-size and Mistral Large criteria are open.

  5. Eval claims. Supported by the diff: the scenario change (assign passes only on a successful create_relationship), the preflight check, the uniformity-guard threshold with its boundary tests, and the correction of the earlier "assign 3/3" local claim. Not verifiable from the diff or the PR text, so treat as the author's measurement: "59/59" and "57/57" requests, "8 of 8" stable on Haiku and Gemma 31B, "7 of 8" local, the "540-800ms to 24-64ms" routing times, "~2.5s removed request" and "6.7K-token prefill is ~14s of ~15s". Two points to tighten: (a) the table says "Stable across 3 reps"; the local 7 of 8 is consistent with the stated 0 of 3 for assign, good. (b) The routing-time numbers measure the removed request, not end-to-end turn time; the PR says "Routing time per lookup turn", which is accurate, but the headline claim about turns being faster should not be read as a total-turn figure. Also "Each regression test checked to fail without its fix" is shown for the quote-only and hint tests; I see no statement for node_id_arg or a_settled_lookup_is_not_put_to_stage_one. Do that check (revert the skip, the test should show two generations).

Nitpicks

  • Nit: routing.rs doc of decision_on_the_message_alone still says "Every other decision stands, a clarification and a split included"; add a pointer that lookup_without_stage1 now pre-empts it for settled lookups.
  • Nit: node_id_arg scans every char index and calls Uuid::parse_str; fine for tool arguments, but a len() < 36 early return is free.

Verdict

COMMENT. No blocker; I would address item 1 (narrow the skip for marked compound requests, or pin it) and item 7 (closes to refs) before the user merges, and treat items 2-4 and 6 as optional follow-through.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review (re-review): COMMENT (posted as a comment, GitHub blocks self-approval). Full findings in the review comment above.

@malibio

malibio commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

Address-review summary, second round

Re-review verdict was COMMENT with no blockers. Addressed 7 of the 9 points; 2 answered without a code change.

Addressed

  • Marked compound questions (Important). A question that ends in ? and also asks for a change ("What is the status of the offsite task, and should we mark it done?") was settled as a lookup and lost its Stage-1 pass and any split. lookup_without_stage1 now also requires that no word of the message asks for a change (asks_for_a_write); decision_on_the_message_alone is unchanged. The seven grounding-eval lookups are pinned as still settled (so "assigned" and "launch" do not trip the word list), and the compound cases are pinned as not settled, in the routing unit tests and at loop level (three generations: Stage 1, the search, the answer).
  • Pronoun follow-ups. Decided the same way Stage 1 decided them before ("a lookup of the message", whose search Stage 2 makes with the conversation in view, as the loop's comment already says). The comment now states that this holds for settled lookups too.
  • node_id_arg repair visible and consistent. Repaired ids are logged at debug with what was written and what was read; the function returns early for text shorter than a UUID; get_related_nodes and get_node_context use it, so the 4B model's decorated ids work on the reads it reaches from the same entity list. Deletes keep the strict form.
  • Skip visible in the log. routing_stage1_skipped is a field on the "two-stage routing overhead" line, not only a span attribute.
  • Tests. A question-shaped answer after a Clarified turn still makes the Stage-1 request (loop-level, asserts the Stage-1 topic is the one retrieved on). Both the loop test and the routing test for the skip were seen to fail with the skip disabled.
  • Doc nit. decision_on_the_message_alone points at lookup_without_stage1.

Answered without a code change

  • "a duplicate of " acts on A. The text names one node and the repair acts on it; that is what the argument holds. The cost of a wrong guess is bounded to the tools that use it (no deletes), and it is now logged.
  • closes #3706. Kept deliberately. The reviewer's open criteria were Mistral Large and the prompt-size record: the first was dropped by the issue's owner, and the second is recorded on the issue (local before/after on the earlier comment; remote and local request sizes on the final-tree comment). Profile AI-Chat turn latency on OpenAI-compatible endpoints and the local engine #3704 stays refs.

Eval claims

The routing-time figures measure the request that was removed, not total turn time: turn time swung 13-23s run to run locally, so only the request-level figure is claimed, and the PR body says so.

bun run test:changed and bun run quality:fix pass on the pushed tree.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: The one behavioral change is a narrowing of the skip (one more condition, with tests on both sides), the id change extends an already-reviewed helper to two read tools and adds a log line, and the rest is tests and comments.

malibio and others added 4 commits October 11, 2026 14:51
…ding eval against a remote provider (refs #3706, #3704)

Measured on a reasoning remote model (Haiku 5.5) and a non-reasoning one
(Gemma 4 31B): the first run of the Haiku suite was 4 of 7 stable. The failures
had tool causes, now fixed:

- search_nodes read a query of quote marks alone (what a model sends for an
  empty string written as JSON text) as a search for those marks, so a correct
  relationship filter returned nothing and the reply said no tasks.
- create_relationship given a reverse name (a task's assignee) failed with a
  message naming neither working form; it now names the call from the declaring
  end under the forward name.
- Graph Editing and Node Creation refuse a relationship written as a field and
  say to call create_relationship, but did not grant it; both do now.
- A message saying me, my, mine or myself brings the database's owner into the
  resolved entities with their id and links, as a named person gets them. The
  current-user line names the owner by id even when the name and email are
  blank, where it used to drop out and leave the model asking for an id.

Eval: NS_MODEL=openai-compat:<config-id>:<model> runs the suite against a
provider configured on the served database (preflight checks the provider and
that the model is loaded); an assign scenario passes only on a successful
create_relationship; a count-for-me scenario names the owner; a full pass with
few tools is believed when the replies vary.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
…y cap, tighten the eval guard (refs #3706)

- create_relationship's reverse-name hint applies only when the other node is
  of the type that declares the relationship (a project, which holds its own
  tasks, no longer sends a task to a person), and it keeps the store's answer
  beside it. query_ops::type_extends reads the extends chain for any type id.
- The owner joining the resolved entities respects MAX_RESOLVED_ENTITIES: the
  weakest match is cut and counted as not shown. The English-only match, the
  dropped none-found for other names and the owner in the duplicate guard are
  documented and pinned by tests.
- normalize_enumerate_query is pinned against returning the quote-trimmed form.
- The eval guard believes varied replies only beside two kinds of tool, with the
  boundary tested; preflight steps renumbered; a formatting slip fixed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
…rose around them (refs #3706, #3704)

- A question about what the workspace holds is already read as a lookup of the
  message whatever Stage 1 answers, so the Stage-1 generation, the first of the
  turn's sequential requests, is not made for it (routing::lookup_without_stage1).
  Clarification answers and every message that asks for a change still go to
  Stage 1. Measured: routing time per lookup turn fell from 540-800ms to
  24-64ms on remote models and a 2.5s request is removed on the local one.
- node_id_arg reads a node id written with its label (a small model copies
  'Plan the offsite task ID (<uuid>)' into the id argument) when the text holds
  exactly one UUID; get_node, update_node, create_relationship and
  update_task_status use it. Deletes keep the strict form.
- Agent-loop tests that scripted a Stage-1 reply for a settled lookup now use a
  request to find, which still reaches Stage 1; a new test pins the skip.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
…ir visible (refs #3706, #3704)

- The Stage-1 skip also requires that no word of the message asks for a change,
  so a question that ends in a question mark and also asks for one keeps its
  Stage-1 pass (and a possible split). The grounding eval's lookups are pinned
  as settled; the skip is logged as routing_stage1_skipped.
- node_id_arg returns early for text shorter than a UUID, logs a repaired id at
  debug, and is used by get_related_nodes and get_node_context as well.
- Loop-level tests: a clarification answer and a compound question both still
  make the Stage-1 request. Both skip tests were seen to fail without the skip.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
@malibio
malibio force-pushed the issue-3706-remote-measurements branch from c688f75 to 4ec684a Compare October 11, 2026 12:51
@malibio
malibio merged commit 02231b3 into main Oct 11, 2026
@malibio
malibio deleted the issue-3706-remote-measurements branch October 11, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI-Chat context is neither targeted nor grounded: too much that does not bear on the message, too little on what it is about

1 participant