Repository navigation
feat(document): PPTX adapter with presentation projection and export - #51
Merged
Merged
Conversation
…receipt Import runs the shared OPC intake, then maps PresentationML into canonical content: slide order and ids, sections, layout names, shapes in reading order with groups, text, tables, notes, comments, alt text, links, and images as content-addressed assets, plus envelope-shaped citation anchors. Embedded packages, OLE objects, controls, and program, macro, or OLE click actions are refused. Unsupported transitions, animations, charts, SmartArt, and media are receipted, never dropped silently. The joined text runs through the shared DLP check, which catches canaries split across runs. Export projects the content into a new deck on a generic master, layouts, and theme with a fidelity receipt part. DLP and public-boundary checks run on everything the deck would contain before bytes are returned. The adapter registers with the conformance harness, so the corpus now runs every PPTX package row through it and the three PPTX adapter rows are executable. The corpus takes executable rows from each adapter's test module. Refs #22
The shared XML reader now keeps attribute prefixes as written, so the adapter no longer saw r:id, r:embed, or the relationship id of p:sldId and refused every deck. Relationship attributes are now keyed by namespace: any prefix bound to the Transitional or Strict relationship namespace reads as r:, and r bound to another namespace does not count. The old digit test that told a slide id from its relationship id is gone. Canonical content is unchanged: the recorded digest still holds. A new test covers a renamed prefix and a foreign r binding. Refs #22
Rescan binary parts with intake DLP, bound cumulative projection work, enforce export budgets and compression ratios, and reject unbound XML prefixes. Preserve and test the four exact reviewer inputs. Refs #22
# Conflicts: # crates/bran-document/src/conformance.rs # crates/bran-document/src/lib.rs # crates/bran-document/src/zip.rs # crates/bran-document/tests/conformance.rs # docs/enterprise-document-conformance.md # tools/ci/test-budget.json
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.
Summary
PPTX adapter for enterprise-document evidence (#22). It is the last of the four format adapters, registered alongside DOCX, XLSX and PDF in the #25 conformance harness.
Import: maps PresentationML to a presentation projection. It covers:
Relationship attributes resolve through in-scope namespace bindings; undeclared prefixes are refused. Transitions, animations, charts, SmartArt and media are listed in the fidelity receipt rather than dropped silently.
Safety: macros, actions, embedded objects, scripts and media are never executed. External relationships and remote media are never followed. Part-count, relationship, nesting, decompression and byte limits apply.
Export: a deterministic PPTX with a fidelity receipt, which the importer accepts back (compression included). DLP and public-boundary checks cover every emitted part, binary images included, before anything is written.
Closes #22
Verification
./tools/ci/check.sh --fastand--fullpass on the branch merged with currentmain: 246 conformance checks in the fast tier, none unavailable. No new dependencies.5d6cfbdwith tests that failed first:rattributes were treated as relationship attributes.mainaddedJson::get, which shadowed the adapter'sField::gettrait method. The trait method is renamed toField::field, and main's reviewed code is unchanged.Not covered: PowerPoint itself was not available to test. Query/packet selection of document evidence is tracked in #46.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GXsmZAgLAftTb8E5oswz82