Repository navigation
Read a how-question as a lookup; retrieve lookups and suppressed clarifications in context - #3621
Conversation
Pragmatic Code Review: PR #3621 (issue #3560)Review Type: Initial Review (no prior reviews or comments on the PR) SummaryA net improvement. Three measured failures are fixed with small, well-explained changes; one eval assertion is corrected; one finding is recorded with its numbers. The code follows the surrounding patterns and CLAUDE.md (no lint suppression, no compatibility code, no issue numbers in comments, docs kept in nodespace-docs). No Critical findings. Three Important items need attention before merge: one acceptance criterion is not met while the PR closes the issue, the new question rule overrides Stage 1 for a wider set of messages than the ones measured, and one branch of that rule has no test. What I ran: 10 targeted unit tests in Requirements Check
Code Review Findings🟡 Important1. The question rule flips Stage 1's
A lookup turn retrieves on Recommendation: add the write-shaped and agent-without-"you" openers as controls (unit cases for the predicate, and live Stage-1 cases showing what the model generates and what the loop then does). Then either narrow the predicate (for example, exclude "how about / what about / what if / why not" and require a question mark or an auxiliary after the question word) or record the accepted cost in ADR-038 beside the equivalent one for 2. The PR closes the issue with an acceptance criterion unmet Finding 1 is honestly recorded, and the measurements justify not rewording a description to win one sentence. But the second criterion is not met, and the test's own comment says the miss "is recorded here and not accepted", while the commit closes the issue. Once it closes, nothing tracks the lead for type requests whose nouns belong to another skill, which is what decides the fields declared on the write tools. Recommendation: get the owner's decision before merge: either amend the criterion on the issue to the recorded outcome, or drop "closes" and leave the issue open for finding 1. Principle: requirements traceability; an open defect should not lose its tracker as a side effect of a merge. 3. The first-message branch of the rule has no test that fails without it The new Recommendation: add a test on a fresh session where Stage 1 returns 🟢 Suggestions4. The live harness and the loop differ on one path
5. Suppressed clarification: the blend includes the assistant's last reply
Nit: Nit: a converted lookup's topic is the whole message ("How do we onboard a new reviewer"), where a model-written topic drops the question frame ("how we onboard a new sponsor"). It is only the fallback search query, so this is cosmetic. What is good
RecommendationCOMMENT. No blocking defect in the code, and the change is a net improvement. Before merge: settle item 2 with the issue owner, and address item 1 (controls plus either a narrower predicate or a recorded cost) and item 3 (a first-message test). |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: COMMENT (no blocking defect; three Important items to settle before merge). Full findings in the review comment above.
Review addressed (commit a07b6e2)1. The question rule was wider than what was measured: addressed. 2. The PR closes the issue with a criterion unmet: left for the owner. The description now says "Refs #3560" so a merge does not close the issue by default. Whether to amend the criterion or keep the issue open for the type-request lead is the owner's call. 3. The first-message branch had no test: addressed. 4. Harness drift: addressed. 5. More follow-up controls for the suppressed clarification: skipped. The retrieval tier has no seeded-conversation harness, so a control there means building one; the eval scenario measures the path end to end (0 of 3 to 3 of 3), and the unit test pins the composed query. Worth revisiting if a second follow-up shape misbehaves. Nits. The retrieval test is renamed Tests: 989 agent unit tests pass, |
Pragmatic Code Review: PR #3621 (issue #3560)Review Type: Re-Review (changes since d7e589a: one commit, a07b6e2) Previous Review Summary
What I ran: 7 targeted Previous items1. The question rule was wider than what was measured: addressed.
2. The PR closed the issue with a criterion unmet: left for the owner, as it should be. 3. The first-message branch had no test: addressed.
4. Harness drift: addressed.
5. More follow-up controls for the suppressed clarification: not addressed, accepted. Nits. The retrieval test is renamed and both references in Code Review Findings (new)No Critical or Important findings. 🟢 SuggestionsA. "Why don't we …?" still passes the rule The suggestion test reads the second word against "about / if / not". "Why don't we close the Q4 cycle?" splits into B. The question mark is now required, so the unpunctuated form of the measured failure is not fixed "how do we decide which cycle a slipped spec moves into" is now a pinned negative case. Typed without a question mark, "how do we onboard a new reviewer" goes back to Stage 1's C. "skill", "tool" and "assistant" are also workspace nouns "Which tool do we use for deploys?", "What skills does the reviewer role need?" and "How do we onboard a new teaching assistant?" are questions about stored knowledge that the rule now leaves to Stage 1. NodeSpace's own domain has skills as stored things, so this is not far-fetched. It fails safe (Stage 1's own decision, as on main), so no change is needed now. Worth one sentence in the function's doc so the next reader knows the exclusion is by word, not by meaning. Nit: Nit: the PR description's "Notes for review" still says the rule is "a question word first, and no 'you' or 'your'". It predates the narrowing; update it so anyone reading the PR later gets the rule as merged. Checked and fine
RecommendationAPPROVE. The follow-up commit addresses the two code items properly, with tests that pin both application points of the rule, and introduces no new defect. The three suggestions are optional. One thing remains outside the code and outside this verdict: the issue owner's decision on the unmet second acceptance criterion (item 2), and making sure the squash commit message does not close the issue before that decision. |
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.
Re-review addressed (commit e7ee656)A. "Why don't we …?" passed the rule: addressed. It is left to Stage 1 beside "Why not …?", with a unit case. "Why doesn't the sync retry?" is a question and still passes. B. The unpunctuated form is given up: recorded. The function's doc and the architecture doc now say that a question typed without its question mark is left to Stage 1. The auxiliary-after-the-question-word test is the option to reach for if that form turns out to be common. C. "skill", "tool" and "assistant" are also workspace nouns: recorded. Same two places, with "Which tool do we use for deploys?" as a unit case on the left-out side. It is routed as Stage 1 routes it. Nits. The live harness labels a first message's pass "blended", as the loop logs it. The PR description states the rule as merged. Item 2, decided by the owner: close #3560 with the second criterion amended to the recorded outcome. The description says "Closes #3560" again. Tests: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: The re-review approved with optional suggestions only. This commit adds one word to an exclusion list (which fails safe: the message is routed as Stage 1 routed it), two unit cases, doc text and a test label. |
…ifications in context
809694d to
261412c
Compare
Closes #3560.
Works through the five misses the re-themed decision eval surfaced. Three are fixed, one had its assertion corrected, and one is recorded as a miss with the measurements, because no wording fixed it without a cost elsewhere.
What changed
A question about how something is done is a lookup (finding 4). Asked "How do we onboard a new reviewer?", Stage 1 answers with
route_query("onboard a new reviewer"), and did the same for the sponsor, contractor and "decide which cycle" questions, each on every rep. Five wordings of the Stage 1 prompt androute_lookup's description were measured; each fixed the questions and broke another control (questions about the agent, the compound split, or a find request). So the loop reads it off the message: on the pass that asks about the message alone, aroute_queryfor a message that opens with a question word and does not address the assistant is a lookup of that message (routing::decision_on_the_message_alone). Every other decision stands.A lookup's retrieval query opens with the search skill's verbs (finding 2).
search stored knowledge for {topic}is nowfind, look up, or search stored knowledge for {topic}. A topic that is a record's name and a field ("Kestrel Sync sign off date") lost to Node Deletion by 0.001, which offersdelete_nodeon a lookup; it now leads by 0.024. Rewording Research & Search's description was measured first and rejected: it lifted the skill on requests that are not lookups.A suppressed second clarification retrieves in context (finding 3). When Stage 1 asks to clarify twice in one intent, the turn fell through to retrieval on the bare message. "Say that again more simply." retrieved Play Authoring, Conflict Journal and Graph Editing, and the model replied that it had no tool for rephrasing. It now retrieves on the message blended with the turns before it, as schema retrieval does.
schema-shared-name-signedasserts the reply (finding 5). A correct turn answers throughsearch_semantic, which names no type, so theschemaassertion failed it 3 of 3. It now asserts the seeded date in the reply, the same correction once made toschema-field-disambiguates.Recorded, not fixed (finding 1). A request for a new kind of record leads with Schema Creation when its nouns are neutral (by 0.012 to 0.036) and with another skill when they are that skill's subject: "incident postmortems with severity" reads as Graph Editing, 0.889 to 0.868. About twenty variants of the two descriptions, Graph Editing's exclusion and the Stage 1 query were measured; the one that won "set up Postmortems…" lifted Schema Creation everywhere and broke two existing controls. The new retrieval test asserts the lead for the neutral nouns and the top 3 for the colliding ones, with the scores. The turn still calls
create_schemain every rep.Also folded in:
stage1_type_line_routes_requests_that_name_a_known_typefailed on main because it compared two queries byte for byte and the type line makes Stage 1 drop articles. It now compares content words.Measurements
gemma-4-e4b-q4km, isolated daemon, database purged between reps, before and after built from the same main.skill-type-request-directskill-type-request-indirectoutcome-record-field-is-answeredoutcome-follow-up-keeps-its-answeroutcome-follow-up-statement-keeps-its-answerschema-shared-name-signedOne round of the whole fixture, as a regression smoke test: 20 of 25 before, 21 of 25 after. No scenario that passed before fails after.
outcome-question-searches-firstmoved to a pass (routed as a lookup where it was a query). Still failing on both builds: the two type requests,entity-no-match-is-a-createanddeclarative-fact-report-resolved.Live tests:
live_skill_retrieval_stability28 of 28 (two new guards);live_stage1_golden_prompts13 of 13, from 10 of 13 on main, with "How do we onboard a new reviewer?" and two sibling questions added to both lookup lists.Notes for review
is_lookup_shaped: a question word first, a question mark last, not a suggestion ("How about …?", "Why don't we …?"), and nothing about the assistant (no "you" or "your", no skills, tools or assistant). A message it leaves out is routed as Stage 1 routed it.architecture/prompt-skill-system.md, ADR-038) are pushed to nodespace-docs with the merge.🤖 Generated with Claude Code