Repository navigation
Require the changed property on update_node state changes, and make the matrix gate detect its absence - #1931
Conversation
Scenario 6's residual gap: once resolve_query correctly resolved "the
2400 one", the follow-on call was update_node({"id": "..."}) with no
properties -- right node, right tool, but the requested state change
silently no-oped.
Ruled out the issue's second hypothesis first: exec_resolve_query
already returns the resolved node's properties on a unique match, and
its description already says to pass the id straight to update_node.
The model therefore already sees isReturned: false before the failing
call, so the gap is on the update_node side, not the handoff.
Per ADR-064 rule 1 (tool schemas own argument shape), the fix lives in
def_update_node only -- no resident prose, which the doctrine measures
as the weakest channel and which was already stripped of update_node
rules. The description now states that an id alone changes nothing and
carries a state-change example; the properties parameter now says to
copy the key character for character from the properties the resolving
tool returned, rather than inventing one from the user's wording, and
to send only the keys that change.
Adds packages/daemon/tests/scenario6_update_node_properties.rs, which
reproduces the actual failing step -- the call after resolve_query
returns -- with the real history pipeline, the real resolve_query
success payload, the real format_tool_result serializer, and the real
registered update_node definition, so a schema regression fails it.
Asserts the state change itself across 3 trials, not just the tool name
and id, since asserting those alone would pass on this very bug.
Live-model verification (locked native GGUF, 3/3):
update_node({"id":"nodespace://laser-cutter-node",
"properties":{"isReturned":true}})
nodespace-agent lib tests: 430 passed, 0 failed.
Refs #1927
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The scenario-6 assertion could not have caught this bug. `toolSequence`
matches tool NAMES only, so update_node({"id": "..."}) with no properties
scored as a pass on scenario 6 -- the exact failure #1927 describes.
Closing that needed three things, since fixing only the first would have
been silently inert:
1. `toolSequence` gains `minProperties`/`propertiesOn`, mirroring the
option `toolOnce` already carries for scenario 8c. It defaults to the
last tool in the sequence -- the acting call in a resolve-then-act
chain.
2. Scenario 6 sets `minProperties: 1`, so the requested state change must
actually reach update_node for the turn to score.
3. update_node's result now reports `property_count`, matching
create_node's existing convention. Without it `result_field_count` is
None, no [fields=N] marker is emitted, `fieldCount` is undefined, and
`callPersistedProperties` skips the check entirely -- so (2) alone
would assert nothing.
The count comes from what the CALL supplied, not the merged result: the
result carries every property the node has, so an id-only call would
report the node's full count and pass.
Adds unit coverage for the new path, including that it targets the last
tool rather than the first and that an unset `minProperties` still scores
sequence-only.
scripts tests: 82 passed (77 before). nodespace-agent lib: 435 passed.
quality:fix clean; reverted its unrelated cargo fmt churn across nine
files this change never touched.
Refs #1927
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The comment listed only create_schema and create_node as reporting a field count; update_node now does too. Records that its count is of what the CALL supplied, so an id-only call reports 0 rather than the node's existing property count. Refs #1927 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Pragmatic Code Review — PR #1931Review Type: Initial Review Requirements Check (issue #1927)#1927 is an investigation issue with prose scope rather than
Findings🟢
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above. Both high-risk items verified correct: the property_count derivation under flat_extras, and the five-link chain confirming the new eval assertion is genuinely live rather than silently inert. Two non-blocking follow-ups: extend guidance_corpus() to cover tool descriptions, and optionally neutralize the isReturned example key.
The worked examples used isReturned paired with "came back" -- scenario
6's own property name and phrasing. An instructional example drawn from
the benchmark that validates it makes a passing measurement ambiguous
between generalization and proximity to the test case.
Both sites now use isPaid, and the properties parameter's worked
inference is "the invoice cleared" rather than "it came back". The rule
itself is unchanged: pick the key whose current value the request would
change, copied from the resolving tool's returned properties.
Kept "came back" in the natural-language trigger list ("came back",
"it's paid", "mark it done") -- those are user phrasings, not property
keys, and dropping every trigger word the eval happens to use would
weaken the rule for real requests. Longest shared run with the scenario
prompt is 2 words, against the contamination guard's tolerance of 4.
Re-verified because a reworded description is an unmeasured arm:
scenario6_update_node_properties still passes 3/3 on the live model,
emitting properties {"isReturned": true} even though the description's
only example is now isPaid -- the model reads the key from
resolve_query's returned properties rather than copying the example,
which is the generalization the review asked about.
nodespace-agent lib: 435 passed, 0 failed. quality:fix clean (unrelated
cargo fmt churn across nine untouched files reverted).
Refs #1927
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Review addressed — 1 of 2 implemented, 1 filed separatelyBoth findings were 🟡 Important and explicitly non-blocking. ✅ Addressed: neutral example key (
|
- Exclude a quote before #NNNN only when the number is quoted on both
sides ('#333'), so a reference opening a string -- an it('#2088: ...')
test title -- counts. Baseline 142 -> 143.
- countReferences returns per-line `path:line: text` hits instead of file
sets; a shared baselineFailures() prints them from both the CLI and the
ratchet test, so a new reference can be found among the backlog.
Skipped nits: a CSS-scoped `(?<!:\s?)` lookbehind (tried; it drops the real
`stack: #1931` prose reference), generalizing the `Invoice ` exclusion
(one fixture noun today), and test.todo for CSS false positives (the hit
listing now names any such line directly).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Qyoth54znpxzJGcyxZFSnH
- Exclude a quote before #NNNN only when the number is quoted on both
sides ('#333'), so a reference opening a string -- an it('#2088: ...')
test title -- counts. Baseline 142 -> 143.
- countReferences returns per-line `path:line: text` hits instead of file
sets; a shared baselineFailures() prints them from both the CLI and the
ratchet test, so a new reference can be found among the backlog.
Skipped nits: a CSS-scoped `(?<!:\s?)` lookbehind (tried; it drops the real
`stack: #1931` prose reference), generalizing the `Invoice ` exclusion
(one fixture noun today), and test.todo for CSS false positives (the hit
listing now names any such line directly).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Qyoth54znpxzJGcyxZFSnH
…2997) (#3133) * Count bare #NNNN issue references in the code-reference check (closes #2997) The issue-number patterns missed the most common shape, a bare `#NNNN` in prose, so the check read 0 while 142 references sat in scanned code. Add a bare-#NNNN pattern (3-5 digits; lookarounds exclude hex colors, HTML entities, `r#` raw strings and `Invoice #1`-style fixture data), drop the two `see #990` citations in update-homebrew-cask.ts, and set the baseline to the real remaining count. Paydown tracked in #3132. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Qyoth54znpxzJGcyxZFSnH * Address review: count quoted-title refs, list matching lines on failure - Exclude a quote before #NNNN only when the number is quoted on both sides ('#333'), so a reference opening a string -- an it('#2088: ...') test title -- counts. Baseline 142 -> 143. - countReferences returns per-line `path:line: text` hits instead of file sets; a shared baselineFailures() prints them from both the CLI and the ratchet test, so a new reference can be found among the backlog. Skipped nits: a CSS-scoped `(?<!:\s?)` lookbehind (tried; it drops the real `stack: #1931` prose reference), generalizing the `Invoice ` exclusion (one fixture noun today), and test.todo for CSS false positives (the hit listing now names any such line directly). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Qyoth54znpxzJGcyxZFSnH --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Summary
Scenario 6's residual gap: once
resolve_querycorrectly resolved "the 2400 one", the follow-on call wasupdate_node({"id": "..."})with noproperties— right node, right tool, but the requested state change never applied.Two independent problems, both fixed here:
toolSequencematched tool names only, so an id-onlyupdate_nodescored scenario 6 as a pass.The fix (commit 1)
Per ADR-064 rule 1 — tool schemas own argument shape — this lives in
def_update_nodeonly. No resident prose: the doctrine measures it as the weakest channel, andupdate_node's prose rules were already stripped under it.propertiesnow says to copy the key character-for-character from whatresolve_query/get_node/search_nodesreturned for that node, rather than inventing one from the user's wording, and to send only the keys that change.Ruled out first:
exec_resolve_queryalready returns the resolved node'spropertieson a unique match, and already says to pass the id straight toupdate_node. The model therefore already sawisReturned: falsebefore the failing call — the issue's second hypothesis was already implemented, so the gap was on theupdate_nodeside.The harness gap (commits 2–3)
Closing it took three coordinated changes, because the first alone is silently inert:
toolSequencegainsminProperties/propertiesOn, mirroringtoolOnce's existing option (already used by 8c), defaulting to the last tool in the chain.minProperties: 1.update_node's result reportsproperty_count— without itresult_field_countis None, no[fields=N]marker is emitted,fieldCountis undefined, andcallPersistedPropertiesskips the check entirely.The count comes from what the call supplied, not the merged result — otherwise an id-only call reports the node's full property count and passes anyway.
Verification
Isolated logic test — 3/3, twice (pre- and post-rebase).
packages/daemon/tests/scenario6_update_node_properties.rsreproduces the real failing step: real history pipeline (completed_writes_from+node_history_from_messages), realexec_resolve_querypayload, realformat_tool_result, realChatMessageconstructors, and the real registeredupdate_nodedefinition — so a schema regression fails it.3-rep matrix gate — 10, 10, 10 (mean 10.0/12), identical to the post-#1926 baseline. Release daemon rebuilt from this worktree so
property_countwas actually in the binary; isolatedNODESPACE_HOME, purged DB per rep,served_db_pathconfirmed. No scenario was passing on a name-only match — the sharpened gate confirms the baseline rather than revising it.What this does NOT claim
Scenario 6 is not fixed. It fails upstream:
resolve_queryfired zero times across 3 reps (0/8 including earlier samples) — the accepted #1922 model-capability ceiling. The fix is latent and correct for whenever that is addressed, verified only by the isolated test above. Per direction on #1927, the resolve_query-avoidance question was not investigated further.Tests
nodespace-agentlib: 435 passed, 0 failedscripts: 82 passed, 0 failed (77 before — +5 covering the new path, including that it targets the last tool rather than the first, and that an unsetminPropertiesstill scores sequence-only)quality:fixclean; reverted its unrelatedcargo fmtchurn across nine untouched filesNotes
graph_editing_guidance()'sINDIRECT TARGETprose instead. It never landed (still uncommitted in theissue-1927-update-node-no-propertiesworktree), so the phrasing-regression risk flagged against it is not in this tree and the clean reps here neither confirm nor refute it. If that guidance change is ever revisited, re-test it against this scenario specifically before landing.Refs #1927, #1917
🤖 Generated with Claude Code