Repository navigation
Delete the create_schema description-inference route: an undocumented second meaning for the description parameter, with a 27% silent-wrong-type rate - #1833
Conversation
Removes the undocumented second meaning of create_schema's description parameter: omitting fields used to parse description into a field list via substring matching (contains_any), which mistyped 27% of realistic descriptions (e.g. "notes" -> boolean, "summary" -> number). fields is now required; the reserved-core-property shadowing warning moves to run over explicit fields instead of being lost with the inference path. Co-Authored-By: Claude <[email protected]>
Code Review SummaryClean, atomic deletion that does exactly what issue #1800 asked for and nothing else. Requirements Check (issue #1800 acceptance criteria)
One thing to double-check very closely: None vs Some(empty)Verified directly. Both required tests exist and pass:
The error message itself ( Code Review FindingsCritical IssuesNone found. Suggested Improvements
Nitpicks
Recommendation: APPROVEThis is a textbook example of the kind of change CLAUDE.md's "no backward compatibility, delete old patterns immediately" philosophy is written for: a clearly-scoped, fully-verified deletion of an undocumented, measurably-defective code path, with the replacement behavior's trickiest edge case ( |
malibio
left a comment
There was a problem hiding this comment.
Review complete — Recommendation: APPROVE (self-approval blocked by GitHub since PR author == reviewing account; see full report above for verified evidence on all 7 acceptance criteria, 46/46 tests passing, clean workspace build).
…ment - reject_reserved_property_names -> warn_reserved_property_names: it warns and passes fields through unchanged, it never rejects (ADR-063 leaves the final call with the caller). - Spell out the fields None-vs-Some(empty) distinction explicitly in the comment above the missing-fields check. Both are non-functional naming/clarity fixes from PR #1833 review; no re-review needed. Co-Authored-By: Claude <[email protected]>
Addressed review feedback
Both changes are non-functional (rename + comment only, no logic change). Verified: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: Both changes are a rename and a comment clarification — no logic, control flow, or test behavior changed. All 46 schema tests still pass with identical assertions. Ready for merge. |
…superseding the pre-#1800 e4b-1775-r3 figure Recorded against a purged, freshly-seeded isolated daemon (commit 57bf108) now that both remaining ADR-064 workstream gates have closed: #1811 (already resolved as a side effect of #1820) and #1800 (create_schema description-inference deletion, merged as #1833). Ran three full trials for variance characterization, as the issue requires, plus two routing-eval trials. Headline: 9/12 (median of 6/12, 9/12, 8/12 — mean 7.7/12), consistent with this suite's previously-documented 10/9/8 variance band. The committed file records run 2 with the other two summarized in other_runs_this_session and full detail in caveats, per the issue's "report enough repetitions to characterize variance, not a single number" requirement. Findings from reading the raw-output traces this issue's diagnostic harness now captures, not just the aggregate: - Scenario 6 (Update via indirect reference) failed in all three runs — the model asks the user for a node ID instead of calling resolve_query, despite resolve_query being confirmed present in the offered tool list every time. A genuine comprehension gap, not a routing or harness defect. Tracked by #1637. - create_schema JSON-truncation errors recurred across scenarios 3/8a/8b at 2/3 frequency each — the model emits genuinely malformed JSON on complex multi-field schemas ("EOF while parsing a value"), a real generation defect distinct from the #1800/coreValues class of prose-contradiction bug this suite previously found. - Zero "widget" placeholder leakage across all three runs' raw output and the full daemon log, per the issue's specific ask. Scenarios 4/8c/8d show no systematic INSTANCE-vs-TYPE regression. - Zero empty-generation exclusions and no uniformity-guard trips in any run — nothing here reads as a harness artifact. - Routing eval: 10/15 twice, with an IDENTICAL failure set both runs (not committed as a separate file here, but noted in caveats since the consistency across independent runs suggests systematic causes, and at least one failure looks like a scoring-heuristic gap rather than a model failure). scripts/results-e4b.trace.jsonl is the raw-output trace for the committed run, so any of the findings above can be re-verified from the actual model text without re-running the eval. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs
…DR-056's Scenario 5 claim (#1831) * Make the agent eval diagnostic: raw-output trace, uniformity guard, empty-generation exclusion, guidance provenance (closes #1764) The eval could not tell "the model failed" from "the harness failed" — both rendered as a low score, and the two known false results on record (a contaminated 11/12 baseline, and "no tools called" scenarios passing while every turn died on context overflow) were only caught by reading raw model output. This makes the harness diagnostic before any future baseline gets recorded against it: - Raw generation per ReAct iteration is now captured to a .trace.jsonl file alongside the results JSON (agent_loop.rs logs it at debug level so production's default info verbosity is unaffected). - A uniform 0%/100% pass rate across 4+ scored scenarios now aborts as an environment failure rather than writing a plausible results file. - The documented degenerate-empty-generation failure mode (model emits neither text nor a tool call) is now excluded from the pass/fail denominator instead of silently scoring as a model failure. - Provenance now records which seeded prompt/skill content a run actually measured (_seed.key/_seed.version read back via `node query`), since seeding only reseeds on daemon startup and a long-running daemon can silently serve stale guidance. - Stage 1's routing decision (query/clarify/clarify_suppressed/none/ unavailable/failed) and whether Stage 2's prompt actually carried a candidate block are now logged on every code path and surfaced per turn, closing the gap where a silently-skipped routing attempt looked identical to one that matched nothing. Verified the tool-call-parsing regression flagged during scoping (narrated JSON-array calls slipping past detection, per #1826) is already fixed in the production loop with its own unit coverage; no separate eval-side parsing gap exists since the eval only counts executed-tool log lines, never re-parses raw text itself. ADR-056's Scenario 5 claim and the honest 9/12 baseline were already addressed in earlier sessions on this issue; recording a fresh baseline remains gated on #1800 (create_schema description-inference deletion). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs * Fix multiline/embedded-marker corruption in raw-output log scraping (review fixes for #1764) Code review on PR #1831 caught two bugs in the raw-output-trace plumbing added for #1764, both stemming from the same root cause: treating a field that can contain arbitrary model text as if it were bounded by ordinary line/marker delimiters. 1. scripts/aichat.ts split the daemon log slice on "\n" before scanning for the raw-generation marker. tracing's %-Display formatter writes the field verbatim, embedded newlines included, so any multiline generation was silently truncated at its first newline. 2. scripts/eval/runner.ts's regex used "\n[tool]" as a lookahead terminator, which broke if the model's own raw text happened to contain that literal substring (e.g. narrating "I'll use [tool] create_node..."). Fixed at the source: agent_loop.rs now JSON-encodes response_text before logging it, so the field is guaranteed to be exactly one line regardless of content. aichat.ts and runner.ts parse it back with JSON.parse instead of fragile lookahead regexes. While fixing this, found and fixed a related bug the review didn't catch: the tool-call-counting regex in runner.ts wasn't anchored to line start, so a [raw] line's embedded model text mentioning "[tool] create_node" was miscounted as a real tool call. Same fix applied to every other marker regex in parseTurnOutput for consistency, since all of them now share stdout with arbitrary model text. Extracted parseTurnOutput (runner.ts) and formatTurnLogLines (aichat.ts) as pure, exported functions so this parsing logic — where the bugs actually lived — is directly unit-testable without a daemon. Added 21 regression tests across two new test files covering multiline output, embedded markers, and the marker/tool-call interaction. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs * Rename seed_prompt_nodes to seed_agent_guidance_nodes; fix eval's stale seeded-type list seed_prompt_nodes seeds nodes with root_node_type "agent-guidance", not "prompt" — the type was renamed under ADR-064/#1699's markdown-children refactor but the function name was never updated to match, which is exactly what caused a real bug: scripts/eval/preflight.ts's SEEDED_GUIDANCE_TYPES still listed "prompt" as a seeded type to verify guidance provenance against, so readGuidanceProvenance silently found zero prompt nodes on every run (the type genuinely doesn't exist anymore) while correctly finding the 8 seeded skills. Caught while running the actual Phase B baseline for #1764 against a fresh isolated daemon, where zero results for a type that should exist is exactly the "can't tell if this is the harness or reality" ambiguity #1764 exists to eliminate. Fixed both: the function now matches what it actually seeds, and the eval now checks "agent-guidance" (verified against a live daemon — 5 nodes: Core Identity, Workspace Context Template, Tool Strategy Guide, Response Formatting Rules, Tool Call Formatting) instead of a type that seeds nothing. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs * Record the honest post-ADR-064 baseline: 9/12 (6/9/8 across 3 runs), superseding the pre-#1800 e4b-1775-r3 figure Recorded against a purged, freshly-seeded isolated daemon (commit 57bf108) now that both remaining ADR-064 workstream gates have closed: #1811 (already resolved as a side effect of #1820) and #1800 (create_schema description-inference deletion, merged as #1833). Ran three full trials for variance characterization, as the issue requires, plus two routing-eval trials. Headline: 9/12 (median of 6/12, 9/12, 8/12 — mean 7.7/12), consistent with this suite's previously-documented 10/9/8 variance band. The committed file records run 2 with the other two summarized in other_runs_this_session and full detail in caveats, per the issue's "report enough repetitions to characterize variance, not a single number" requirement. Findings from reading the raw-output traces this issue's diagnostic harness now captures, not just the aggregate: - Scenario 6 (Update via indirect reference) failed in all three runs — the model asks the user for a node ID instead of calling resolve_query, despite resolve_query being confirmed present in the offered tool list every time. A genuine comprehension gap, not a routing or harness defect. Tracked by #1637. - create_schema JSON-truncation errors recurred across scenarios 3/8a/8b at 2/3 frequency each — the model emits genuinely malformed JSON on complex multi-field schemas ("EOF while parsing a value"), a real generation defect distinct from the #1800/coreValues class of prose-contradiction bug this suite previously found. - Zero "widget" placeholder leakage across all three runs' raw output and the full daemon log, per the issue's specific ask. Scenarios 4/8c/8d show no systematic INSTANCE-vs-TYPE regression. - Zero empty-generation exclusions and no uniformity-guard trips in any run — nothing here reads as a harness artifact. - Routing eval: 10/15 twice, with an IDENTICAL failure set both runs (not committed as a separate file here, but noted in caveats since the consistency across independent runs suggests systematic causes, and at least one failure looks like a scoring-heuristic gap rather than a model failure). scripts/results-e4b.trace.jsonl is the raw-output trace for the committed run, so any of the findings above can be re-verified from the actual model text without re-running the eval. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs * Correct #1637 misattribution in the baseline; fix a stale doc-comment reference results-e4b.json's scenario-6 caveat wrongly cited #1637 (closed) as already tracking the model-never-calls-resolve_query failure. #1637 was about resolve_query's return contract once called (fixed, confirmed working in this code — its own evidence cites 100% success on this exact phrasing when the tool IS called); the failure this baseline actually measured is the model not calling the tool at all, which #1637 did not observe under its own measurement conditions. Filed as its own issue, #1835, and corrected the caveat to explain the distinction plus separate run 1 (a cascade from scenario 4, a different failure) from runs 2-3 (the clean repro). Also fixes a doc comment in preflight.ts left referencing the old seed_prompt_nodes name after the prior commit renamed the function in prompt_assembler.rs but missed this comment — caught in re-review. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qFMbS5rEGLQL6CCkg6Xjs --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
Closes #1800