Repository navigation
Recognize "I have created" phrasing in the anti-fabrication guard (#1865) - #1873
Conversation
…uard Investigation of #1865 traced the fabricated venue-creation claim to a cascade: an earlier create_schema call in the same chat is rejected by validation and never retried, leaving no valid schema for the model to target on the next turn. With no tool call available, the model fabricates a success claim instead — verbatim in the "I have created" phrasing this guard didn't yet recognize (it only matched "I created" and "I've created"). The upstream create_schema recovery gap is filed separately as #1872. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs
Code Review SummaryThis is a small, well-scoped fix: it adds This is a net positive and I recommend Approve. FindingsRequirements vs. #1865's acceptance criteria#1865 has three acceptance criteria:
Net: this PR fully satisfies the one criterion in its stated scope, and correctly does not attempt the other two, which belong to #1872 or to eval verification outside a code diff. Correctness
Testing
Maintainability / substance question: is the phrase-list approach sound, or whack-a-mole?Worth addressing directly since it's the most legitimate architectural question this PR raises.
That said, I don't think it's this PR's job to make that call:
🟢 Suggestion (non-blocking): if Security / PerformanceNo security surface here — pure string matching against model-generated text already destined for local display, no external input crosses a trust boundary that wasn't already crossed. Performance is a non-issue: DocumentationPR description and commit message both correctly scope the change and name #1872 as the deferred sibling issue — good practice for reviewers who might otherwise wonder why the routing-cause criterion isn't addressed. VerdictApprove. The change does exactly what it says, is minimal and additive, is well-tested against the issue's literal reproduction case, doesn't regress the guard's false-positive protections, and correctly declines to scope-creep into the upstream #1872 fix or a phrase-matching architecture rewrite — both of which are legitimately out of scope for a targeted gap-fill PR. |
malibio
left a comment
There was a problem hiding this comment.
Review posted above. Recommendation: APPROVE — minimal, additive, well-tested fix that correctly stays in scope (defers the create_schema cascade to #1872). Could not submit as a formal approval: GitHub blocks self-approval since the PR and reviewing account share the same identity (malibio).
Summary
Investigation of #1865 (agent claims it created a node while calling no tool — scenario 8d in the agent-matrix eval) traced the fabricated venue-creation claim to a cascade: an earlier
create_schemacall in the same chat (scenario 8b) is rejected by validation and never retried, leaving no valid schema for the model to target on the following turn (8d). With no valid tool call available, the model fabricates a success claim instead of surfacing the failure.The existing anti-fabrication guard (
contains_action_claim, from #1345) already catches and suppresses this class of fabricated claim — confirmed live against a fresh run of scenario 8d. The gap:ACTION_PHRASESonly matched"i created"/"i've created", not"i have created"— the exact wording quoted in #1865's first transcript. This PR closes that gap for all 8 tracked verbs (created/updated/found/added/deleted/removed/marked/set/made/completed).The upstream
create_schemacascade (8b's validation rejection never gets retried) is a distinct error-recovery bug, filed separately as #1872 — not addressed here.Changes
packages/agent/src/local_agent/agent_loop.rs: add"i have <verb>"variants toACTION_PHRASESaction_claim_detects_have_created_phrasing, using the exact wording from Agent claims it created a node while calling no tool: matrix 8d is a silent data-loss path #1865's transcriptTest plan
cargo test -p nodespace-agent --lib— 401/401 passedcargo fmt --check/cargo clippy -- -D warningscleanbun run test:all(frontend + skill + Rust, incl. Tauri-seam e2e) — passed through the pre-push gate🤖 Generated with Claude Code
https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs