Skip to content

Run 3: Print Diagnostics

Add debug, dry-run, and live-print diagnostic parameters to all print endpoints. Extend PdfRenderService for diagnostic passthrough. Update OpenAPI descriptions.

Specification: Phase 3 Specification Requirements: Phase 3 Requirements Verification: Phase 3 Verification

#CriterionVerification CommandExpected Output
1Run 2 exit gate passesbash .../run-2-multi-template/validate-exit.shALL CHECKS PASSED
2Run 2 changes committedgit -C .../operations log --oneline -1Contains Run 2 commit
3Operations builds cleanmake -C .../operations buildBUILD SUCCESSFUL
ArtifactPathFormatDescription
DiagnosticRenderResultoperations/src/.../pdfrender/business/RenderResult.ktKotlinOptional debugPayload field in GroupRenderResult
Extended PdfRenderServiceoperations/src/.../pdfrender/service/PdfRenderService.ktKotlindebug/dryRun parameters on render and renderGroups
Updated endpointsoperations/src/.../item/api/rest/ItemEndpoint.ktKotlindebug, dry-run query params with OpenAPI descriptions
Unit testsoperations/src/test/KotlinTests for debug, dry-run, parameter combinations
Updated PDF Render Module docdocumentation/src/.../shop-access/pdf-render-module.mdMarkdownDiagnostic parameters, dry-run sequence diagram
Updated Item Module docdocumentation/src/.../reference-data/item/index.mdMarkdownDiagnostic parameters on endpoint table
CHANGELOG entryoperations/CHANGELOG.mdMarkdownVersion entry for diagnostics
#TaskPersonaDepends OnStatusAcceptance Criteria
3.1Add debug/dry-run params to print endpoints with OpenAPI descriptionsback-end-engineerPendingParams parsed from query string. OpenAPI spec shows descriptions.
3.2Extend PdfRenderService for diagnostic modesback-end-engineer3.1Pendingrender/renderGroups accept debug/dryRun. Dry-run skips Documint. Debug includes payload. T-P3-004 through T-P3-008.
3.3Wire diagnostic params through ItemPrintingService and PrintLifecycleImplback-end-engineer3.2PendingDry-run skips print status updates for cards. T-P3-005.
3.4Add debugPayload to GroupRenderResultback-end-engineer3.2PendingField omitted when null (not serialized). T-P3-001 through T-P3-003, T-P3-006.
3.5Update design documentationback-end-engineer3.1-3.4PendingPDF Render Module + Item Module docs updated. T-P3-012, T-P3-013.
3.6Regression tests and CHANGELOGback-end-engineer3.1-3.5PendingAll builds pass. Default params (debug=false, dryRun=false) don’t change behavior. T-P3-010, T-P3-011. CHANGELOG entry.
3.1 (endpoint params) ──→ 3.2 (PdfRenderService) ──→ 3.3 (wire through) ──→ 3.5 (docs) ──→ 3.6 (regression)
└──→ 3.4 (debugPayload) ──┘

Sequential chain. Single back-end-engineer agent. No frontend changes in this run.

#CriterionVerification CommandExpected Output
1Operations builds with all tests passingmake -C .../operations buildBUILD SUCCESSFUL
2Documentation buildscd .../documentation && make buildComplete!
3CHANGELOG updatedhead -20 .../operations/CHANGELOG.mdContains jmpicnic version entry
4Operations worktree cleangit -C .../operations status --shortClean

PR creation and deployment to dev are gated on explicit user prompt.

You are implementing print diagnostic parameters in the operations repository at /Users/jmp/code/arda/projects/multi-pdf-print-and-bugs-worktrees/operations.

Read the specification at .../../phase-3-diagnostics/specification.md and implement Tasks 3.1 through 3.6. Use mode: "bypassPermissions".

Key decisions:

  • Diagnostic params available to all authenticated users (no role check)
  • debugPayload field omitted from JSON when null (@EncodeDefault(NEVER))
  • Endpoint route descriptions must include parameter behavior details for OpenAPI spec
  • CHANGELOG format: [X.Y.Z-jmpicnic-0408]
ArtifactSource RunPath
CompositeRenderResult / GroupRenderResultRun 2operations/src/.../pdfrender/business/RenderResult.kt
PdfRenderService.renderGroups()Run 2operations/src/.../pdfrender/service/PdfRenderService.kt
ArtifactConsumer RunPath
Diagnostic endpoints (debug, dry-run)Run 4operations/src/.../item/api/rest/ItemEndpoint.kt
debugPayload in GroupRenderResultRun 4operations/src/.../pdfrender/business/RenderResult.kt

Copyright: (c) Arda Systems 2025-2026, All rights reserved