Skip to content

Expose hyperlink and drawing reader safety facts - #61

Closed
pedroassumpcao wants to merge 3 commits into
tensorbee:mainfrom
Symbolic-ai:pedro/sym-5084_hyperlink_drawing_reader_facts
Closed

Expose hyperlink and drawing reader safety facts#61
pedroassumpcao wants to merge 3 commits into
tensorbee:mainfrom
Symbolic-ai:pedro/sym-5084_hyperlink_drawing_reader_facts

Conversation

@pedroassumpcao

@pedroassumpcao pedroassumpcao commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • retain hyperlink tooltip and document-location metadata as typed reader facts
  • report unmodeled hyperlink attributes without treating namespace declarations as semantic attributes
  • retain external drawing relationship IDs and distinguish linked from embedded images
  • classify reader drawings as images, anchored shapes, or other constructs
  • require the Office relationships namespace before accepting linked-image relationship attributes

Review follow-up

  • rebased onto current main
  • added coverage proving a foreign same-local-name link attribute is rejected
  • retained support for valid aliased Office relationship prefixes
  • ready for maintainer F-ID integration

Validation

  • cargo test -p rdocx-oxml --lib
  • focused rdocx hyperlink and drawing reader tests
  • cargo clippy -p rdocx-oxml -p rdocx --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • python3 scripts/hash_harness.py --check
  • CI Test and MSRV jobs pass

The local unfiltered rdocx run only reaches the existing environment-dependent word_and_powerpoint_chart_pixels_are_identical rasterizer oracle assertion. The failure does not exercise these reader changes.

@pedroassumpcao

Copy link
Copy Markdown
Contributor Author

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 mantissaman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mantissaman
mantissaman dismissed their stale review August 31, 2026 16:54

Superseded immediately because shell quoting stripped technical identifiers from the body.

@mantissaman mantissaman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pedroassumpcao
pedroassumpcao force-pushed the pedro/sym-5084_hyperlink_drawing_reader_facts branch from 14ceb43 to 7c40c2e Compare August 31, 2026 17:40
@pedroassumpcao
pedroassumpcao marked this pull request as ready for review August 31, 2026 18:12
@pedroassumpcao

Copy link
Copy Markdown
Contributor Author

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 mantissaman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mantissaman

Copy link
Copy Markdown
Contributor

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.

@mantissaman mantissaman closed this Sep 1, 2026
@mantissaman

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants