From 6ee28a591046052000ec6afbdb6e5d9f25ef8a3b Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 15 Sep 2026 22:33:34 +0200 Subject: [PATCH] feat: integrate generic PDF rendering --- AGENTS-TASKS.md | 11 +++++++++++ Jenkinsfile | 13 +++++-------- README.md | 7 ++++--- reportist | 2 +- scripts/check-components.sh | 25 ++++++++++++++++++++++++- 5 files changed, 45 insertions(+), 13 deletions(-) diff --git a/AGENTS-TASKS.md b/AGENTS-TASKS.md index 92d957a..e1ad2bf 100644 --- a/AGENTS-TASKS.md +++ b/AGENTS-TASKS.md @@ -150,6 +150,17 @@ reports remain understandable/recreatable and individual tools need no macro rep ## Pass handoff log +### 2026-09-15 — First generic PDF rendering slice + +- Completed Reportist RT1.5, RT2.1–RT2.4 and RT3.1–RT3.3 with a generic validated + YAML/JSON-to-PDF CLI, neutral defaults, replaceable branding and safe asset + staging. Root `make check` now renders the adapter's branded synthetic draft. +- Validation: eight Reportist contract and seven rendering tests pass with Typst + 0.15.1; the integration path produces a PDF signature after both schemas pass. + Diagnostic analysis is still absent, so P5.4/P5.5 remain open. +- Next: visual/pagination comparison, then implement offline diagnostic analysis + to connect raw capture input to this now-working adapter/renderer chain. + ### 2026-09-15 — Beffroi branding adapter slice - Migrated the two legacy Beffroi logos and three presentation palettes into the diff --git a/Jenkinsfile b/Jenkinsfile index e92922d..98a1593 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -85,7 +85,9 @@ pipeline { /* * TODO: Integration Test * - * Eventually validate the complete sanitized pipeline: + * The current synthetic check covers a validated diagnostic artifact, + * adapter generation and PDF rendering. Complete this with raw-capture + * analysis once win-diagnostics implements it: * * diagnostic fixture * ↓ @@ -102,12 +104,7 @@ pipeline { * report.pdf */ - /* - * TODO: Setup Typst - * - * Install through cargo-binstall as in the legacy reporting CI - * once integration rendering exists. - */ + /* Typst is an explicit agent dependency checked by make check. */ /* * TODO: Setup Packaging @@ -152,7 +149,7 @@ pipeline { conclusion: 'SUCCESS', name: 'Beffroi Reporting CI', summary: 'Beffroi Reporting workspace passed all currently implemented CI checks.', - text: 'Workspace and diagnostic/report contract checks passed. Analysis, adapter, and PDF integration checks remain pending.', + text: 'Contracts, adapter preservation, and synthetic PDF integration passed. Raw-capture analysis remains pending.', title: 'Reporting workspace healthy' ) diff --git a/README.md b/README.md index 8a3f811..c78029e 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,10 @@ synchronizes each component's pinned requirements. On first use, uv may download Python and dependencies, requiring network access. No system packages are changed. The runner prints tool versions and component revisions and stops on any failure. -Current coverage includes the diagnostic and report contract suites, adapter -preservation tests, and a synthetic diagnostic-to-report generation validated by -both component tools. It does not verify diagnostic analysis or PDF output. +Current coverage includes the diagnostic and report contract suites, Reportist +rendering tests, adapter preservation tests, and a branded synthetic +diagnostic-to-report-to-PDF path. It does not yet verify diagnostic analysis from +a raw capture. Submodules must already be initialized with the command above. ## Push component commits and the workspace together diff --git a/reportist b/reportist index e2ada62..091dfd7 160000 --- a/reportist +++ b/reportist @@ -1 +1 @@ -Subproject commit e2ada627d0e55f57a1dc4b47e2e06eabb1ad7246 +Subproject commit 091dfd7c5b6dd1dfe8db7c2c3497bb56e27f8c1d diff --git a/scripts/check-components.sh b/scripts/check-components.sh index 11589ca..df5fe3e 100644 --- a/scripts/check-components.sh +++ b/scripts/check-components.sh @@ -15,6 +15,12 @@ for component in win-diagnostics reportist; do fi done +command -v typst >/dev/null 2>&1 || { + echo 'Typst is required for Reportist rendering checks.' >&2 + exit 1 +} +typst --version + uv --version for component in win-diagnostics reportist; do echo "Checking $component ($(git -C "$component" rev-parse HEAD))" @@ -34,4 +40,21 @@ BRANDING_DIRECTORY="$(pwd)/beffroi-reports/config/branding" \ .venv/component-checks/reportist/bin/python -m unittest discover \ -s beffroi-reports/tests -p 'test_*.py' -v -echo 'Contract and adapter checks passed. Analysis and PDF checks remain pending.' +pipeline_check_root="$(mktemp -d "${TMPDIR:-/tmp}/beffroi-pipeline-check.XXXXXX")" +trap 'rm -rf -- "$pipeline_check_root"' EXIT +.venv/component-checks/reportist/bin/python beffroi-reports/tools/diagnostic-to-report.py \ + --diagnostic beffroi-reports/tests/fixtures/diagnostic.json \ + --evidence-root beffroi-reports/tests/fixtures \ + --output-dir "$pipeline_check_root/generation" \ + --title 'Synthetic diagnostic draft' --author 'CI Test' --date 2026-09-15 \ + --generator-version "$(git -C beffroi-reports rev-parse HEAD)" \ + --diagnostic-validator win-diagnostics/tools/validate.py \ + --report-validator reportist/tools/validate.py \ + --branding beffroi-reports/config/branding/default.json \ + --branding-root beffroi-reports +.venv/component-checks/reportist/bin/python reportist/tools/render.py \ + "$pipeline_check_root/generation/report.draft.json" \ + --output "$pipeline_check_root/report.pdf" +test "$(head -c 5 "$pipeline_check_root/report.pdf")" = '%PDF-' + +echo 'Contract, adapter, and PDF rendering checks passed. Diagnostic analysis remains pending.'