Repository navigation
Follow-up to #1775: title_template regression tests do not fail on the defect they claim to guard - #1784
Conversation
Review of #1784 found the sweep incomplete: three MarkdownError sites in markdown/mod.rs still produced "invalid params: Invalid parameters: ...", and one of them is in handle_create_nodes_from_markdown — the very function this branch already touches from the tools.rs side. That is the same "one function away" argument this branch accepted for schema/mod.rs, so leaving them was inconsistent and the commit message read as if the sweep were complete. Deliberately NOT changed, having checked each: - node_batch.rs:64/114 return a plain String with no Display prefix, so their "Invalid parameters:" text is load-bearing rather than redundant. - ops/mod.rs:40 is a thiserror attribute on a different error type. - markdown/mod.rs:1194 says "Invalid collection path", a distinct message that happens to start with the same word — not a doubled preamble. No MarkdownError construction now doubles the preamble. core 1013 passed, agent 309 passed, clippy clean. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C2fwCrhS3Bfq4uDGM61iCr
Code review: APPROVE (with one finding, now addressed)Reviewed by Independently verifiedThe reviewer reconstructed the diverging pre-check from its original commit, re-inserted it at the original call site, and ran the suite: The ratchet fires, for exactly the claimed reason. The file was then restored; worktree confirmed clean. Three things it tried to break and could not
🟡 Finding — addressed in d3ca89bThe sweep was incomplete: three Fixed. Deliberately left, having checked each:
No Re-review decisionNO RE-REVIEW NEEDED. core 1013 passed · agent 309 passed · frontend 4104 passed · clippy clean · full push gate passed. |
…loses #1783) A post-hoc review of #1775 — commissioned because the fixes applied after that PR's review were never re-reviewed before merge — found that the two tests I claimed would catch a reintroduced pre-check pass with or without it. The claim in that commit message was false. The cause is my own fixture: the divergence table specified fields:[] for the empty-placeholder case, because an empty fields array is what makes the pre-check emit its confidently-wrong prescription. I wrote the test with fields:[{name:"status"}], which resolves the placeholder, empties the pre-check's `missing` list, silences it, and lets the authority run anyway. I documented the right fixture and then used the wrong one. - empty-placeholder test: fields corrected to [], assertion tightened to the authority's exact phrasing so a second validator speaking first is detected. Verified by reintroducing the diverging pre-check and confirming this test fails with "a different message here means a second validator spoke first", then removing it. It is a real ratchet now, demonstrated rather than assumed. - unclosed-placeholder test: this input is structurally un-pinnable by an outcome assertion — pre-check and authority AGREE on the outcome and differ only in who speaks. Dropped the guarantee it cannot provide; it now asserts the authority's exact wording, which catches a reintroduction that rewords the error, and the comment says exactly that. Also the two remaining review items: - agent_loop.rs tail-inference comment claimed "Reached only via the duplicate-call guard's break"; #1775's parse-failure guard made that a second entry point, so the comment was a trap for the next reader debugging it. - The Display/Debug sweep I skipped from #1775 as scope creep. The review judged that call wrong — the same change fixed this defect one function away and added a comment explaining why the doubled preamble harms the model, while leaving four sites producing "invalid params: Invalid parameters: ..." in the same file, one on the adjacent line. Fixed those four, plus the MarkdownError still Debug-formatted in create_nodes_from_markdown. The lesson worth keeping: verify a regression test by reintroducing the defect. A test that passes either way is worse than no test, because the claim beside it invites trust in a ratchet that is not there. core 1013 passed, agent 309 passed, clippy clean. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C2fwCrhS3Bfq4uDGM61iCr
Review of #1784 found the sweep incomplete: three MarkdownError sites in markdown/mod.rs still produced "invalid params: Invalid parameters: ...", and one of them is in handle_create_nodes_from_markdown — the very function this branch already touches from the tools.rs side. That is the same "one function away" argument this branch accepted for schema/mod.rs, so leaving them was inconsistent and the commit message read as if the sweep were complete. Deliberately NOT changed, having checked each: - node_batch.rs:64/114 return a plain String with no Display prefix, so their "Invalid parameters:" text is load-bearing rather than redundant. - ops/mod.rs:40 is a thiserror attribute on a different error type. - markdown/mod.rs:1194 says "Invalid collection path", a distinct message that happens to start with the same word — not a doubled preamble. No MarkdownError construction now doubles the preamble. core 1013 passed, agent 309 passed, clippy clean. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C2fwCrhS3Bfq4uDGM61iCr
Rebasing onto main brought in the namespace-prefix fix, which makes description-only create_schema succeed. This test was written while that path was broken: it asserted only that the field-locating pass stayed out of the way, guarded behind `if let Err`, deliberately not pinning success so it would not couple to that bug's fix. With the bug fixed the guard makes the test VACUOUS — the Err branch never runs, so it passes without asserting anything. That is precisely the failure mode this branch exists to correct, so leaving it would be self-defeating. Now asserts the call succeeds and returns schemaId "venue". The stale comment claiming the path is "separately broken on main" is gone. core 1019 passed (up from 1013, #1777's tests included), agent 309 passed, clippy clean. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C2fwCrhS3Bfq4uDGM61iCr
d3ca89b to
8660094
Compare
|
Rebased onto
#1777 fixes that path — which makes the guard vacuous: the Reviewed commit core 1019 passed (up from 1013 — #1777's tests now included) · agent 309 · clippy clean · full push gate passed. |
Closes #1783