feat: integrate generic PDF rendering

This commit is contained in:
Dandaedre 2026-09-15 22:33:34 +02:00
parent 0d2b291b05
commit 6ee28a5910
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
5 changed files with 45 additions and 13 deletions

View File

@ -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

13
Jenkinsfile vendored
View File

@ -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'
)

View File

@ -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

@ -1 +1 @@
Subproject commit e2ada627d0e55f57a1dc4b47e2e06eabb1ad7246
Subproject commit 091dfd7c5b6dd1dfe8db7c2c3497bb56e27f8c1d

View File

@ -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.'