Skip to content

Seed the typed-question live harness with the app's pinned-nodes record - #4270

Merged
mstomar125 merged 1 commit into
mainfrom
issue-4245-harness-pins
Nov 13, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-4245-harness-pins

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Refs #4245

Why the harness differed from the app

In the app, the daemon appends chat_pins::pinned_nodes_message (a Role::System record: - nodespace://<id> "<title>" (<type>)) to every turn's history. That record grounds the chat's own node id for the fabricated-id guard in agent_loop.rs. live_typed_question_routing built its session from the opening assistant message alone, and assistant text grounds nothing, so a correct reply linking nodespace://software-project was replaced by "Could you confirm what you'd like me to do?" in the harness but not in the app. #4269 separately grounds the ids in the opening message; this one covers the pinned node.

What changed (test-only, one file)

  • chat_history(opening) returns the history the app seeds: the opening message plus the pinned-nodes record for the type (nodespace://software-project "Software Project" (schema)). typed_question now creates its session from it.
  • New stub-engine test the_chats_own_type_is_grounded: a session over the opening alone does not ground nodespace://software-project; one over chat_history does (and does not ground the opening's other link).

How verified

cargo test -p nodespace-agent --test it live_typed_question_routing:: : 3 passed, 1 ignored (the live test); the new test is listed and passes. fmt and clippy -p nodespace-agent --all-targets -D warnings clean; pre-push lint gate passed. No live model run (to be run separately).

Honest limits

  • The real pinned_nodes_message lives in the daemon crate, which depends on the agent crate, so the harness cannot call it without a dev-dependency cycle. The record is written in the same form instead, so it can drift from the daemon's function; the test pins only the property the harness relies on (the id is grounded), not the exact text.
  • Not run against a model; whether the 7B now gives the same reply as in the app is for the live run.

🤖 Generated with Claude Code

The app appends a system record naming the chat's pinned nodes to every
turn's history; it grounds the chat's own node id for the fabricated-id
guard. The live harness created its session from the opening message
alone, so a reply linking nodespace://software-project was replaced by the
canned confirmation. chat_history() now seeds the same record, and a
stub-engine test checks the session grounds the type's id.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@mstomar125
mstomar125 force-pushed the issue-4245-harness-pins branch from bc3ee55 to 0bf45ba Compare November 13, 2026 08:24
@mstomar125
mstomar125 merged commit 5ca60ff into main Nov 13, 2026
@mstomar125
mstomar125 deleted the issue-4245-harness-pins branch November 13, 2026 08:24
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.

1 participant