Repository navigation
Seed the typed-question live harness with the app's pinned-nodes record - #4270
Merged
Merged
Conversation
3 tasks
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
force-pushed
the
issue-4245-harness-pins
branch
from
November 13, 2026 08:24
bc3ee55 to
0bf45ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #4245
Why the harness differed from the app
In the app, the daemon appends
chat_pins::pinned_nodes_message(aRole::Systemrecord:- nodespace://<id> "<title>" (<type>)) to every turn's history. That record grounds the chat's own node id for the fabricated-id guard inagent_loop.rs.live_typed_question_routingbuilt its session from the opening assistant message alone, and assistant text grounds nothing, so a correct reply linkingnodespace://software-projectwas 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_questionnow creates its session from it.the_chats_own_type_is_grounded: a session over the opening alone does not groundnodespace://software-project; one overchat_historydoes (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 andclippy -p nodespace-agent --all-targets -D warningsclean; pre-push lint gate passed. No live model run (to be run separately).Honest limits
pinned_nodes_messagelives 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.🤖 Generated with Claude Code