Repository navigation
Route completion-state updates to Graph Editing; keep route_clarify on Stage 2 (closes #2912) - #3051
Conversation
…y on Stage 2 (closes #2912) "Mark it resolved" retrieved Conflict Resolution on the shared word "resolve" and left no write tool on Stage 2's surface. Graph Editing's description now names the completion states users say; it enters the top-3 for 7/7 such requests (was 2/7) while conflict-journal requests still route to Conflict Resolution first. Guarded by two new live retrieval tests. route_clarify now stays on every scoped Stage-2 surface (ADR-038's Stage-2 clarify branch), withheld once the intent already clarified. A matching candidate-block instruction was measured inert on E4B (0/15 clarified at every step) and is not shipped; the deterministic backstop is filed as #3047. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Pragmatic Code Review: PR #3051Review Type: Initial Review SummaryThis is a net-positive change that stays tightly scoped. The specific failure ("mark it resolved" → Conflict Resolution → no write tool) is fixed where it happens, in retrieval, and the fix is backed by measurement (Graph Editing reaches the top-3 in 7/7 cases, up from 2/7) and by a control in the other direction. ADR-038's Stage-2 clarify branch is now wired with a small, pure helper. The negative prompt-wording result is written down instead of shipped. I verified locally that Requirements Check
Code Review Findings🟡 Important1. No deletion control for the broadened Graph Editing vocabulary
🟢 Suggestions2. Once-per-intent applies only to the added clarify, but the comment says it matches Stage 1
3. The new
4. Every Stage-2 surface now carries
Nits
What's Done Well
|
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.
…ify wording - Narrow Graph Editing's description: the 'closed/paid' noun phrasing outranked Node Deletion on 'remove the closed tickets' and 'get rid of the paid invoices', silently withholding delete_node. 'Keep it / stay' holds both on Node Deletion while completion requests stay 7/7 top-3. - Add control_deletion_requests_are_not_outranked_by_graph_editing. - route_clarify description: 'none of the available tools' instead of naming a candidate block that is absent on fail-open/routing-disabled turns. - Correct the Stage-2 clarify comment: the once-per-intent skip covers only the added route_clarify, not skills that whitelist it. Skipped: measuring over-clarification on ordinary turns (belongs with the backstop issue's matrix run); printing rankings only on a miss (the file's other tests always print them). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review addressed (9662ba8)✅ 🟡 1: No test checked that deletion requests still go to Node Deletion. The finding was real. The first description ("the invoice is paid, the ticket is closed") put Graph Editing above Node Deletion on "remove the closed tickets" and "get rid of the paid invoices", which would have silently withheld
✅ 🟢 2: The comment claimed more than the code enforces. Reworded. The once-per-intent skip only governs the added ✅ 🟢 3: The ✅ Nit: the skill_pipeline comment now names all three guarding tests, and records why the wording is kept narrow. ⏭️ 🟢 4: Measure over-clarification on ordinary turns. Skipped here. It needs a matrix run, which fits with #3047's backstop work. ⏭️ Nit: print rankings only on a miss. Skipped. The file's other live tests always print their rankings, and the scores are the useful diagnostic. Tests: Re-review needed: the Graph Editing description changed again, and that affects which skills requests route to. |
Pragmatic Code Review: PR #3051 (Re-Review)Review Type: Re-Review (1a94d16 → 9662ba8) Previous Review Summary
Verification
New test's assertion logic: correct
Code Review Findings (new changes only)🟢 Suggestions1. The deletion control passes by a thin margin
2. A pre-existing destructive-routing gap is documented but not tracked
Nitpicks
Narrowed description: any new risks?"Keep it / stay" pulls Graph Editing away from deletion requests and keeps it in the top 3 on every completion request. Dropping "closed" and "complete" as listed states costs no measured coverage: "close out the support ticket" still has it at rank 2. The comment gives the reason for the narrow wording and names all three guards. I see no new problem. SummaryThe earlier blocker-grade concern (Graph Editing silently outranking Node Deletion) was real. It is now fixed and guarded by a correctly built live control. The comment and wording fixes are accurate, and both skips are justified. Approve. |
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
No code changes, so no re-review needed. |
Closes #2912.
Problem
"The incident Rowan was on call for — mark it resolved" retrieved Conflict Resolution first, on the shared word "resolve". None of the top-3 skills whitelisted
update_node, so Stage 2 had no write tool. The model found the incident and then gave up in prose.What changed
1. Retrieval (the fix). Graph Editing's description now names the completion states users actually say ("mark it resolved, done, closed, paid…", "the invoice is paid, the ticket is closed").
Measured with the locked nomic embedding model over the real seeded registry:
Top-3 is what matters here:
update_nodeisn't destructive, so Stage 2 offers it from any eligible candidate. Controls: conflict-journal requests still route to Conflict Resolution at rank 1, and all 6 existing retrieval tests in the file still pass.New live tests (
#[ignore]d, need the embedding GGUF) intests/live_skill_retrieval_stability.rs:completion_state_updates_route_graph_editingcontrol_conflict_requests_still_route_conflict_resolution2. Stage-2 clarify surface.
route_clarifynow stays on every scoped Stage-2 surface even when no matched skill whitelists it (ADR-038's Stage-2 "or clarify" branch, previously unwired). It is withheld once the intent has already clarified, the same once-per-intent rule Stage 1 follows. Its description now also covers "none of the offered procedures can do what was asked". Covered by two agent-loop tests.What was measured and not shipped
A candidate-block instruction ("judge each procedure by what it does; if none fits, call
route_clarify") was A/B tested on gemma-4-e4b against the old wording, using the real Conflict Resolution, Relationship Management and Node Merge candidates and the real tool definitions. 0/15 clarified on the new arm, identical to the old arm at every step: the first action, after a successfulget_related_nodes, after a successfulsearch_nodes, and after both. The model keeps reading and never notices it has no write tool. The wording was reverted, and a code comment records the result. The in-code backstop for this class of failure is filed as #3047.Notes
--no-verify(approved by the author): the gate failed onnodespace-core'srollover_moves_a_task_rather_than_leaving_it_in_both_cycles, a crate this branch doesn't touch. That test fails every time between local midnight and 02:00 CEST, when the local date differs from the UTC date. Agent crate tests, clippy andquality:fixall pass.🤖 Generated with Claude Code