Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/pr-visual-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
env:
ARTIFACT_DIGEST: ${{ steps.upload.outputs.artifact-digest }}
ARTIFACT_URL: ${{ steps.upload.outputs.artifact-url }}
BASE_REPOSITORY: ${{ github.repository }}
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
shell: bash
run: |
set -euo pipefail
Expand All @@ -79,6 +82,12 @@ jobs:
echo "Artifact SHA-256: \`${ARTIFACT_DIGEST}\`"
echo
echo "After downloading and unzipping, open \`review.html\` for side-by-side inspection."
echo
if [[ "${HEAD_REPOSITORY}" == "${BASE_REPOSITORY}" ]]; then
echo "[Open this exact commit's rendered capability demo](https://rawcdn.githack.com/${HEAD_REPOSITORY}/${HEAD_SHA}/examples/review.html)"
else
echo "External HTML preview is intentionally omitted for fork pull requests; review the generated artifact instead."
fi
} >> "${GITHUB_STEP_SUMMARY}"

link:
Expand All @@ -98,6 +107,7 @@ jobs:
env:
ARTIFACT_DIGEST: ${{ needs.build.outputs.artifact_digest }}
ARTIFACT_URL: ${{ needs.build.outputs.artifact_url }}
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPOSITORY: ${{ github.repository }}
Expand Down Expand Up @@ -129,6 +139,8 @@ jobs:
echo
echo "No external content, OCR, AI, or ML is used; provenance and licensing are included in \`manifest.json\`."
echo
echo "[Open this exact commit's rendered capability demo](https://rawcdn.githack.com/${HEAD_REPOSITORY}/${HEAD_SHA}/examples/review.html)."
echo
echo "[Browse this revision's committed capability demo](https://github.com/${REPOSITORY}/tree/${HEAD_SHA}/examples); it is separate from this PR artifact."
echo "<!-- cocoapdf-pr-visual:end -->"
} > updated-body.md
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,18 @@ Every accepted semantic element can retain evidence linking it back to its sourc

## Capability demo

[Open the rendered, side-by-side capability demo](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/review.html)
or [browse its committed inputs and exact outputs](examples/README.md). The three
complex source PDFs, fixture prose, and assets are first-party project material
under the bundled MIT license; no downloaded content, OCR, AI, or ML is used.
[Browse this revision's committed inputs and exact outputs](examples/README.md).
On `main`, [open the rendered, side-by-side capability demo](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/review.html).
Same-repository pull requests receive a commit-pinned rendered-demo link in
their description, so reviewing a child branch never silently opens `main`.
For security, fork pull requests expose the generated review artifact but not
a one-click third-party rendering of contributor-controlled HTML.

The three complex source PDFs, fixture prose, and assets are first-party project
material under the bundled MIT license; no downloaded content, OCR, AI, or ML
is used. They remain separate because Tagged-PDF structure trees, AcroForm
fields, and outlines are document-catalog semantics: concatenating their pages
would change the evidence being tested rather than merely combine examples.

The committed `examples/` tree is distinct from temporary pull-request review
artifacts. CI regenerates it from the same case definitions and fails if any
Expand Down
12 changes: 7 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
All inputs and fixture prose are first-party project material under the bundled MIT license.
No network content, OCR, AI, or ML was used.

The three PDFs are intentionally isolated: Tagged-PDF structure trees, AcroForm fields, and outlines are document-catalog semantics. Concatenating their pages would alter the evidence being tested and make failures less diagnostic.

This directory is the committed, reproducible capability demo. Pull-request review artifacts are generated separately and are never written here.

[Open the rendered side-by-side demo](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/review.html). GitHub displays committed HTML files as source code; this third-party browser preview renders the same files from `main` without a project website.
[Open the rendered main-branch side-by-side demo](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/review.html). GitHub displays committed HTML files as source code; this third-party browser preview renders the same files from `main` without a project website. Same-repository pull requests receive a separate commit-pinned rendered link in their description.

Each row links the source PDF to the exact output committed from the same CocoaPDF revision.
Relative row links resolve against the revision being viewed. External rendered-HTML links are explicitly labeled as `main`; a same-repository PR description supplies the exact commit-pinned rendered demo.

Full semantic JSON is committed. Report summaries omit only duplicate semantic graphs and glyph-heavy internals; the temporary PR artifact retains every full report.

| Case | Coverage | Input | Outputs |
| --- | --- | --- | --- |
| `strategic_corner_cases` | Broad V1-V4 formatting, Unicode, lists, tables, figures, forms, columns, security, and fallback coverage. | [PDF](cases/strategic_corner_cases/input.pdf) | [full Markdown](cases/strategic_corner_cases/full/output.md), [full rendered HTML](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/strategic_corner_cases/full/output.html), [full semantic JSON](cases/strategic_corner_cases/full/output.json), [full report](cases/strategic_corner_cases/full/output.report.summary.json) |
| `tagged_semantics` | Tagged heading, sibling ordered-list isolation, MCID provenance, and tagged table structure. | [PDF](cases/tagged_semantics/input.pdf) | [full Markdown](cases/tagged_semantics/full/output.md), [full rendered HTML](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/tagged_semantics/full/output.html), [full semantic JSON](cases/tagged_semantics/full/output.json), [full report](cases/tagged_semantics/full/output.report.summary.json) |
| `scope_and_adversarial` | Page-range outline/AcroForm scope, dot-leader finance recovery, and diagram-versus-form false-positive resistance. | [PDF](cases/scope_and_adversarial/input.pdf) | [full Markdown](cases/scope_and_adversarial/full/output.md), [full rendered HTML](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/scope_and_adversarial/full/output.html), [full semantic JSON](cases/scope_and_adversarial/full/output.json), [full report](cases/scope_and_adversarial/full/output.report.summary.json)<br>[page-2 Markdown](cases/scope_and_adversarial/page-2/output.md), [page-2 rendered HTML](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/scope_and_adversarial/page-2/output.html), [page-2 semantic JSON](cases/scope_and_adversarial/page-2/output.json), [page-2 report](cases/scope_and_adversarial/page-2/output.report.summary.json) |
| `strategic_corner_cases` | Broad V1-V4 formatting, Unicode, lists, tables, figures, forms, columns, security, and fallback coverage. | [PDF](cases/strategic_corner_cases/input.pdf) | [full Markdown](cases/strategic_corner_cases/full/output.md), [full rendered HTML on main](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/strategic_corner_cases/full/output.html), [full semantic JSON](cases/strategic_corner_cases/full/output.json), [full report](cases/strategic_corner_cases/full/output.report.summary.json) |
| `tagged_semantics` | Tagged heading, sibling ordered-list isolation, MCID provenance, and tagged table structure. | [PDF](cases/tagged_semantics/input.pdf) | [full Markdown](cases/tagged_semantics/full/output.md), [full rendered HTML on main](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/tagged_semantics/full/output.html), [full semantic JSON](cases/tagged_semantics/full/output.json), [full report](cases/tagged_semantics/full/output.report.summary.json) |
| `scope_and_adversarial` | Page-range outline/AcroForm scope, valid heading anchors, dot-leader finance recovery, and two-sided diagram-versus-form/table fidelity. | [PDF](cases/scope_and_adversarial/input.pdf) | [full Markdown](cases/scope_and_adversarial/full/output.md), [full rendered HTML on main](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/scope_and_adversarial/full/output.html), [full semantic JSON](cases/scope_and_adversarial/full/output.json), [full report](cases/scope_and_adversarial/full/output.report.summary.json)<br>[page-2 Markdown](cases/scope_and_adversarial/page-2/output.md), [page-2 rendered HTML on main](https://raw.githack.com/sayantandey/CocoaPDF/main/examples/cases/scope_and_adversarial/page-2/output.html), [page-2 semantic JSON](cases/scope_and_adversarial/page-2/output.json), [page-2 report](cases/scope_and_adversarial/page-2/output.report.summary.json) |
96 changes: 96 additions & 0 deletions examples/cases/scope_and_adversarial/full/assertions.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions examples/cases/scope_and_adversarial/full/output.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading