Skip to content

MBTI-PDF-SNAPSHOT-PRINT-LAYOUT-POLISH-10: add snapshot PDF render version#2577

Merged
fermatmind merged 1 commit into
mainfrom
codex/mbti-pdf-snapshot-print-layout-polish-10
Jul 1, 2026
Merged

MBTI-PDF-SNAPSHOT-PRINT-LAYOUT-POLISH-10: add snapshot PDF render version#2577
fermatmind merged 1 commit into
mainfrom
codex/mbti-pdf-snapshot-print-layout-polish-10

Conversation

@fermatmind

Copy link
Copy Markdown
Owner

Summary

  • Adds a print render version for MBTI result-page snapshot PDFs while keeping surface v4 and Gotenberg routing unchanged.
  • Includes the render version in artifact hash input so PR-G print CSS/layout changes do not reuse old v4 cached artifacts.
  • Exposes X-Pdf-Render-Version on success and structured failure responses.

Why

PR-G changes only the rendered print layout in fap-web. Existing artifact keys include the snapshot surface and engine but not the print CSS/layout version, so a layout-only frontend fix could keep serving an old v4 PDF artifact. This PR adds minimal cache isolation without clearing production cache or bumping the surface.

Validation

  • php artisan test --filter=AttemptPublicReportPdfParityTest
  • php artisan test --filter=ApiErrorContractMiddlewareTest
  • ./vendor/bin/pint --dirty
  • git diff --check

Deferred

  • No Gotenberg route, timeout, endpoint, or surface-version change.
  • No deploy, env, DB/CMS/import, queue/search, artifact/cache clearing, mPDF fallback, or PDF visual work.

Companion fap-web PR will carry the print layout polish and PR-train metadata.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 506b5aeedc

ℹ️ 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".

return implode('-', [
$baseHash,
self::MBTI_RESULT_PAGE_SNAPSHOT_SURFACE_VERSION,
self::MBTI_RESULT_PAGE_SNAPSHOT_RENDER_VERSION,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep PDF artifact keys under the catalog limit

When the artifact-slot dual-write rollout is enabled and an attempt has a normal 64-character content manifest hash but no report_snapshots row to supply a shorter hash, adding this render version makes the value passed as manifest_hash 157 characters (64 + surface + render + engine + locale + entitlement + variant). That exceeds report_artifact_versions.manifest_hash (string(..., 128)), so the sidecar insert fails under the app's strict MySQL config and the surrounding recordReportPdfSidecars() catch also skips the unified-access pdf_state=ready refresh for newly generated PDFs.

Useful? React with 👍 / 👎.

@fermatmind fermatmind merged commit 767895b into main Jul 1, 2026
15 checks passed
@fermatmind fermatmind deleted the codex/mbti-pdf-snapshot-print-layout-polish-10 branch July 1, 2026 13:21
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