Expose hyperlink and drawing reader safety facts - #61
Conversation
|
CI note: the failing Package oxml-layout job is unrelated to this PR. The workflow inventory expects only Caladea, Carlito, and Liberation files, while current upstream main packages the existing Noto font and legal files as well. This branch does not modify oxml-layout, its fonts, or the CI workflow. The local package inventory reproduces the same mismatch from upstream main. |
mantissaman
left a comment
There was a problem hiding this comment.
Requesting changes for one reader-safety defect.\n\n- : the new linked-image fact accepts any attribute whose local name is . For example, bound to a foreign namespace is recorded as an external image relationship and then exposed as . This API is explicitly a safety classification, so it must require the Office relationships namespace, with a regression test for a foreign namespace alias.\n\nThis PR is also still a draft, is based on the S60 main SHA, and has not gone through the repository's F-ID sprint integration workflow. The package-inventory failure appears unrelated, but the namespace defect blocks integration independently.
Superseded immediately because shell quoting stripped technical identifiers from the body.
mantissaman
left a comment
There was a problem hiding this comment.
Requesting changes for one reader-safety defect.
- crates/rdocx-oxml/src/drawing.rs:526: the new linked-image fact accepts any attribute whose local name is "link". For example, "x:link" bound to a foreign namespace is recorded as an external image relationship and then exposed as "DrawingKind::Image". This API is explicitly a safety classification, so it must require the Office relationships namespace, with a regression test for a foreign namespace alias.
This PR is also still a draft, is based on the S60 main SHA, and has not gone through the repository's F-ID sprint integration workflow. The package-inventory failure appears unrelated, but the namespace defect blocks integration independently.
14ceb43 to
7c40c2e
Compare
|
Addressed the review feedback in commit 7c40c2e: linked-image relationship attributes are now accepted only in the Office relationships namespace. The regression coverage includes a foreign x:link attribute and a valid aliased relationship prefix. The branch is rebased on current main and ready for maintainer F-ID integration. Test, MSRV, Clippy, formatting, bindings, WASM, Word fidelity, and release-regression checks pass. Package oxml-layout remains red because the current main workflow inventory omits the four Noto fonts added by S61; this reproduces independently of this PR. |
mantissaman
left a comment
There was a problem hiding this comment.
Re-review complete. The requested namespace-safe linked-image parsing is implemented and covered by alias and foreign-namespace regressions. The branch is current with main, the substantive CI gate passes, and the remaining oxml-layout package-inventory failure is inherited unchanged from main and unrelated to this diff. Ready for maintainer integration.
|
Thank you, @pedroassumpcao. We reviewed the updated 7c40c2e head and adopted this contribution through F-X071. The namespace-safe linked-image classification, hyperlink facts, and their regressions were integrated and then exercised by the full sprint gate. The hardened result landed on main in merge commit 56bcdc1 and tag s62, with contributor credit recorded in the delivery ledger. We are closing this PR as integrated through the maintainer sprint workflow rather than merging its branch directly. |
|
Thank you @pedroassumpcao. v0.12.0 includes the relationship-safe hyperlink, external-image relationship, and drawing-safety reader outcome from this proposal through a reviewed hardened equivalent. It preserves namespace identity, raw XML, and bounded behavior. |
Summary
Review follow-up
mainlinkattribute is rejectedValidation
cargo test -p rdocx-oxml --librdocxhyperlink and drawing reader testscargo clippy -p rdocx-oxml -p rdocx --all-targets -- -D warningscargo fmt --all -- --checkpython3 scripts/hash_harness.py --checkThe local unfiltered
rdocxrun only reaches the existing environment-dependentword_and_powerpoint_chart_pixels_are_identicalrasterizer oracle assertion. The failure does not exercise these reader changes.