Skip to content

MBTI-PDF-SNAPSHOT-SYNC-GUARD-H1: add PDF snapshot render-source cache guard#2579

Merged
fermatmind merged 1 commit into
mainfrom
codex/mbti-pdf-snapshot-sync-guard-h1
Jul 1, 2026
Merged

MBTI-PDF-SNAPSHOT-SYNC-GUARD-H1: add PDF snapshot render-source cache guard#2579
fermatmind merged 1 commit into
mainfrom
codex/mbti-pdf-snapshot-sync-guard-h1

Conversation

@fermatmind

Copy link
Copy Markdown
Owner

What changed

  • Added X-Pdf-Print-Asset-Hash to MBTI result-page PDF success/failure responses and CORS expose headers.
  • Included the print asset hash in the result-page PDF artifact manifest key.
  • Added config support for GOTENBERG_RESULT_PRINT_ASSET_HASH, while keeping MBTI_RESULT_PAGE_SNAPSHOT_RENDER_VERSION as the manual fallback escape hatch.
  • Extended scoped PDF parity tests to prove cache HIT carries the header and a changed hash misses old artifacts.

Why

When fap-web print-impact files change, backend PDF artifacts need a render-source dimension beyond content/surface/engine/renderVersion so old cached PDFs do not mask frontend snapshot changes.

Validation

  • php artisan test --filter=AttemptPublicReportPdfParityTest
  • ./vendor/bin/pint --dirty
  • ruby -e "require 'yaml'; YAML.load_file('docs/codex/pr-train.yaml')"\n- python3 -m json.tool docs/codex/pr-train-state.json >/dev/null\n- git diff --check\n\n## Deferred\n- No Gotenberg route/timeout changes.\n- No content injection, content asset, visual layout, CMS/DB, import, production cache clear, deploy, sitemap/llms/SEO runtime, or mPDF behavior change.\n- H2 will strengthen the operator rendered PDF smoke gate.\n\n## Repository Rule Impact\nNo content authority change. This is backend PDF artifact/cache observability and tests only.

@fermatmind fermatmind force-pushed the codex/mbti-pdf-snapshot-sync-guard-h1 branch from 358c47a to d00b590 Compare July 1, 2026 14:44
@fermatmind fermatmind merged commit b130ca5 into main Jul 1, 2026
15 checks passed
@fermatmind fermatmind deleted the codex/mbti-pdf-snapshot-sync-guard-h1 branch July 1, 2026 14: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