Skip to content

🧾 fix: Preserve PDF Table Word Boundaries - #405

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/pdf-word-spacing
Nov 17, 2026
Merged

danny-avila merged 1 commit into
mainfrom
danny-avila/pdf-word-spacing

Conversation

@danny-avila

@danny-avila danny-avila commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

I fixed missing word boundaries in wrapped PDF table cells by upgrading pypdf to 7.1.0, which includes the upstream spacing correction.

  • Preserve Row Alpha Beta Gamma Delta where pypdf 6.21.4 returned Row AlphaBeta GammaDelta.
  • Add a synthetic, redistributable PDF fixture and its generator.
  • Verify separate words through the container extraction endpoint, exercising the real parser worker and its security hooks.
  • Retain the existing PDF/DOCX resource limits, malformed-input checks, and container isolation coverage.

Closes #403. Upstream fix: py-pdf/pypdf#4255. The 7.1.0 release contains that commit.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

  • Reproduce merged words with pypdf 6.21.4 using the committed fixture and real worker; verify five separate words with 7.1.0.
  • Pass 84 local worker qualification cases covering valid documents, malformed inputs, font encodings, structure limits, decompression limits, and output limits.
  • Audit all four pinned Python dependencies with no known vulnerabilities.
  • Pass formatting and strict TypeScript checks.
  • Pass all 19 extraction service unit tests.
  • Pass the full local container endpoint and isolation suite, including the wrapped-table regression, 75 adversarial endpoint fixtures, two-replica restart, scratch cleanup, seccomp/Landlock checks, and fail-closed isolation startup. GitHub extraction CI runs the same suite.

Reproduce with npm ci --ignore-scripts, npm run format:check, npm run typecheck, npm test, and npm run test:container in packages/extraction.

All 25 GitHub checks passed on head 015a53560d6c1dc06c5357198f9c51849778a6d9, including extraction container qualification and the ARM MicroVM runner image. Exact-head Codex review is clean with no inline findings. The repository requires an independent approving review before merge.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 015a535. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads. Verify parser-hook compatibility and the real-worker spacing regression coverage.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T01:43:50.778221Z 015a535 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 015a53560d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila
danny-avila merged commit 5ad973a into main Nov 17, 2026
25 checks passed
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.

bug: preserve word boundaries in wrapped PDF table cells

1 participant