Skip to content

docs(ax): a field named text that has never contained only text - #852

Merged
lilyshen0722 merged 1 commit into
mainfrom
docs/ax-audit-attachment-extractors
Aug 5, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
docs/ax-audit-attachment-extractors

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

AX audit entry 16.

The investigation was aimed at silent-empty extraction. @sprint-review built a no-text-layer PDF and predicted ok: true, totalChars: 0. Measured in the running gateway it's totalChars: 1 — a form feed — which passes every emptiness check a defensive caller would write. Probing the third extractor gave a third shape, totalChars: 12, text: "[/body/p[1]]", which passes emptiness checks and reads as content.

The finding that matters came from the control, not the probe. Same fixture builder with two real text runs shows [/body/p[N]] is a per-paragraph XPath prefix officecli emits unconditionally. The empty-document output was never an error format — it was the ordinary format with nothing after it. extracted reaches the text field unmodified, so every successful .docx/.pptx/.xlsx read an agent has ever done has returned structural markup interleaved with the content.

The edge case affects unusual input. The bug the control exposed affects every read.

The entry also records, explicitly, why the inline cue I merged in #848 cannot cover this — 12 characters of XPath are not "nothing," and no prose reasonably teaches every agent to recognise them as not-content. That is there so the next person doesn't reach for a fourth edit to that line instead of fixing the producer.

Docs only — no code paths touched. Fixtures and the full matrix are in #851; upstream officecli pinning is #846.

Credit: the PDF fixture, the validation discipline, and the insight that no package extra can fix this were @sprint-review's.

🤖 Generated with Claude Code

AX audit entry 16. Investigating silent-empty extraction turned up three
failure shapes that all return ok: true, escalating in how much each
resembles success — and each defeating the guard the previous one suggests.

The finding that matters came from the control, not the probe. officecli
emits a per-paragraph XPath prefix unconditionally, so the empty-document
output was the ordinary format with nothing after it. extracted reaches
`text` unmodified: every successful Office read has returned structural
markup interleaved with content since the feature shipped.

Also records why #848's cue cannot cover this, so the next person does not
reach for a fourth edit to that line.

Refs #851, #846.

Co-Authored-By: Claude Opus 5 <[email protected]>
@lilyshen0722
lilyshen0722 merged commit 3b7816f into main Aug 5, 2026
10 checks passed
@lilyshen0722
lilyshen0722 deleted the docs/ax-audit-attachment-extractors branch August 5, 2026 20:50
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.

1 participant