chore: address the automated review left on #165 and #166 - #167
Merged
Merged
Conversation
Two findings from the Copilot review that went unaddressed when those PRs were merged -- the review requirement was bypassed with --admin, which skips the gate but does not make the review disappear. docs/schema_inference.rst: the BOOLEAN row advertised on/off in its detection pattern but omitted them from the examples column. Internally inconsistent, and it shipped that way in v2.9.1. src/include/xml_sax_reader.hpp: SAXComment and SAXProcessingInstruction were the only SAX callbacks not declared in the header. The review recommended giving them internal linkage instead. That would have made the callback set less consistent rather than more: the four siblings (SAXStartElementNs, SAXEndElementNs, SAXCharacters, SAXCdataBlock) are all non-static and declared at xml_sax_reader.hpp:106-115, while the file-local helpers cited as precedent (XmlEscapeText, ResolveElementName) are helpers, not libxml2 callbacks. Declaring these two alongside their siblings is the fix this file's own convention calls for. The reasoning is posted on the PR rather than the suggestion being silently ignored. The review's third point -- that the CDATA "]]>" splitting path shipped with no regression coverage -- was already fixed in 534127e, which added the cdataclose case and a round-trip assertion. No behaviour change. Build clean; full suite 4072 assertions in 106 test cases; check-docs unchanged at 105 examples, 0 broken. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XoHU19qnngy1CJnXyX1csz
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are small, consistent with existing conventions, and appear to be a straightforward docs/header alignment with no behavioral impact.
Pull request overview
This PR applies follow-up fixes that address previously missed automated review feedback from PRs #165 and #166, without changing runtime behavior. It aligns the SAX callback declarations with the project’s existing header/implementation structure and corrects a documentation table inconsistency in schema inference docs.
Changes:
- Add missing header declarations for
SAXCommentandSAXProcessingInstructionalongside the other libxml2 SAX callbacks. - Fix BOOLEAN examples in the schema inference documentation to include
on/offto match the stated detection pattern.
File summaries
| File | Description |
|---|---|
| src/include/xml_sax_reader.hpp | Declares the comment and processing-instruction SAX callbacks in the header to match their existing definitions/usage. |
| docs/schema_inference.rst | Updates the BOOLEAN examples list to include on/off, making the docs table internally consistent. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the automated review comments left on #165 and #166, which went unread when those PRs were merged. The review requirement was bypassed with
--admin; that skips the gate but does not make the review disappear, and two of the five PRs said "Changes recommended".No behaviour change. Both fixes land after the
v2.9.1tag (cdd866f), so the release and registry PR duckdb/community-extensions#2719 are unaffected — a docs-table inconsistency and a linkage nit do not justify moving a published tag.#166 — BOOLEAN table was internally inconsistent (accepted)
The row advertised
on/offin its detection pattern but omitted them from the examples column:Fair catch, and it was my edit — it shipped that way in v2.9.1. The examples now match the pattern.
#165 — internal linkage for the two new callbacks (declined, with a different fix)
The review recommended marking
SAXCommentandSAXProcessingInstructionstatic, to keep them "consistent with other file-local helpers".I don't think that's right here. The four sibling SAX callbacks are all non-static and declared in the header:
Giving internal linkage to only the two newest callbacks would make that set less consistent. The precedent cited —
XmlEscapeText,XmlEscapeAttr,ResolveElementName,MatchesRecordTag— are file-local helpers, which follow a different convention from libxml2 callbacks.The review did find a real inconsistency, just not the one it named: these two were the only SAX callbacks missing header declarations. That's what this PR fixes, which is the direction this file's own convention points.
The reasoning is posted on the #165 comment threads rather than the suggestion being quietly dropped.
#165 — CDATA
]]>coverage (already fixed)The third comment noted that the
]]>splitting path — the one genuinely new piece of logic in that PR — shipped with no test exercising it. Already fixed onmainin534127e, independently flagged by a second reviewer with the same reasoning: the fixture gained acdataclosecase carryingbefore]]>after, asserting DOM/SAX byte parity, unchanged scalar text, and that the reconstructed fragment re-parses to the original text.Noted, not changed
xml_sax_reader.hpp:106reads// SAX2 callback functions (static, matching libxml2 signatures). The word "static" is inaccurate for functions that aren't, and is plausibly what led the review to misread the convention. Left alone as pre-existing wording rather than widening a two-line follow-up.Verification
Built against the pinned duckdb submodule (v1.5.5,
d8cdaa33fd).hpp:121,123↔cpp:410,425).make check-docs: 105 examples, 0 BROKEN — unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01XoHU19qnngy1CJnXyX1csz