Repository navigation
Render schema relationships in EXISTING SCHEMAS and steer traversal to get_related_nodes (closes #2911) - #3049
Conversation
…o get_related_nodes (closes #2911) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Pragmatic Code Review: PR #3049Review Type: Initial review (no prior reviews). Scope is commit Requirements Check (#2911)
Code Review Findings🔴 Must fix before merge📁
🟡 Should address📁
Option A is enough for this PR. 📁 🟢 Nits / observations
Recommendation: REQUEST CHANGESThe design is sound and the evidence is strong. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: REQUEST CHANGES (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
…_related_nodes at the ~> name - from_schema drops type-system relationships (extends), which are not traversable from an instance and would send get_related_nodes to an error - get_related_nodes description names the forward name shown after '~>' as usable from either end, since the compact line never shows reverseName - render_line doc lists all three call sites - Skipped: in-direction render test (rendering is direction-independent) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review addressed (ce7ffe5)Addressed
Skipped
Tests: Re-review: needed. The 🔴 fix changes what |
Pragmatic Code Review: PR #3049Review Type: Re-Review. Scope is commit Previous Review Summary
Blast-radius check: filtering
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
An in-direction declaration's name is not resolvable from its target, so the get_related_nodes description now says 'usually' and points at the error that lists valid names. Also rewraps a render_line doc sentence. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Re-review addressed
Tests: agent all pass, entity_types_block 18/18, quality:fix clean. These are wording-only changes, so no re-review is needed. |
Closes #2911.
What changed
EntityTypeDescriptor::render_line(packages/core/src/ops/entity_types_block.rs): the compact EXISTING SCHEMAS line now lists a type's relationships after the field list:- incident_report -> resolved: boolean ~> on_call (person). Stage-2 routing pre-selects schema candidates without callingsearch_skills, so this line is often the only schema the model sees. Before this change, relationships appeared only inschema_metadata.()rather than ason_call->person, because the line's grammar reserves->for introducing the field list. A golden test pins->to a single occurrence per line.packages/agent/src/local_agent/tools.rs):search_nodessays names after~>are relationships and can't be used as filters.get_related_nodessays to use it for those names.stage2_tool_surfaceprompt golden was regenerated for the description change.Verification: live A/B
gemma-4-e4b-q4km on an isolated daemon, same seed in both arms, 5 trials each, prompt "The incident Rowan was on call for — mark it resolved":
get_related_nodes(Rowan, on_call)search_nodescalls per trial, inventedperson.namefilter)The task itself still doesn't complete: routing picks Conflict Resolution, which has no
update_node. That is gap 3, tracked in #2912. Full details and a seeding pitfall are in the issue comment.Pushed with
--no-verifyat the maintainer's request (machine contention). Ran locally:cargo test -p nodespace-agent(all pass),cargo test -p nodespace-core --libfiltered to schema/context/skill ops (395 pass),quality:fixclean.🤖 Generated with Claude Code