Release note · August 4, 2026

When hidden is just a stored DrawingML declaration

By SybilGambleyyu · DocFence 0.36.0

A document diff can show that a drawing changed, yet fail to state the narrow fact a reviewer actually needs: did a stored nonvisual declaration change from explicitly shown to hidden? That question is useful in controlled document handoffs. It is not the same as asking what Word, another Office client, or a rendering engine will put on screen.

DocFence 0.36 adds a privacy-safe inventory for direct stored DrawingML nonvisual hidden declarations in supported Word stories. It makes the marker review-visible locally, without uploading document material or turning a package parser into a visibility or layout engine.

One stored attribute, deliberately bounded

The Open XML SDK documents NonVisualDrawingProperties.Hidden as a state in which a DrawingML object can remain present but hidden; omission is shown by default. DocFence follows only direct, unqualified hidden attributes on a fixed set of standard DrawingML nonvisual-property elements: main, picture, and WordprocessingDrawing forms in Transitional and Strict packages, plus Word 2010 w14, wpg, and wps forms.

The scanner retains every recognized stored declaration, including duplicates and declarations inside Markup Compatibility branches. It treats XML Boolean true and 1 as the same hidden state, and false and 0 as the same explicitly shown state. Invalid values remain a separately counted review signal. Other elements coincidentally named cNvPr, inferred visibility, object identity, and arbitrary DrawingML markup stay outside this boundary.

Useful output without object metadata

Public JSON, Markdown, and SARIF reports contain only declaration and story counts plus hidden, explicitly shown, and invalid-value counts. Object names, descriptions, titles, IDs, exact attribute spellings, story paths, and fingerprints remain private. A same-count hidden-to-shown rewrite is still review-visible through the private inventory signature; a rewrite limited to object metadata does not create a visibility-inventory change.

A handoff that allows no stored hidden or malformed declaration can say so directly:

rules:
  require_no_hidden_drawing_objects: true

This candidate-state gate emits DFP084. A controlled template that intentionally contains approved visibility declarations can protect its private baseline instead:

rules:
  no_drawing_object_visibility_changes: true

DFP085 detects a material inventory change. Neither rule claims that a client will hide, show, select, or otherwise render an object.

Paired evidence instead of a visual claim

The release is paired with DCAB 0.26.0, an open 37-case WordprocessingML change-review corpus. Its new synthetic pair keeps one compact inline DrawingML carrier, package topology, and every stored Word text value stable while changing only wp:docPr/@hidden from false to true. The corpus verifies the package structure and an independent reader boundary; it does not make a visual or runtime assertion.

The DocFence suite covers standard Transitional and Strict forms, Word 2010 forms, duplicate markers, MCE-branch scanning, invalid values, Boolean canonicalization, same-count state swaps, metadata-only rewrites, policy results, and redaction across JSON, Markdown, and SARIF. Hosted CI passed for the tagged release. Freshly rebuilt release artifacts were metadata-checked, their public downloads matched the built hashes, and an isolated installation validated all 37 DCAB cases while reporting the new visibility-inventory change.

DocFence does not validate full DrawingML conformance, choose an MCE branch, resolve a drawing object, calculate effective visibility, apply layout, render a document, or predict Office client behavior. Use it as a bounded local review signal alongside any rendering, accessibility, security, and domain-specific checks your workflow requires.

python -m pip install https://github.com/SybilGambleyyu/docfence/releases/download/v0.36.0/docfence-0.36.0-py3-none-any.whl

docfence profile candidate.docx --format markdown
docfence check approved.docx candidate.docx --policy docfence.yml --format sarif --output docfence.sarif

The public release includes a wheel and source archive. The tagged policy reference, threat model, and validation notes define the exact behavior, privacy contract, and limits.