26 lines
4.7 KiB
Markdown
26 lines
4.7 KiB
Markdown
# Demo refresh implementation and evidence
|
|||
|
|
|
||
|
|
This change prepares the existing Actions -> Jenkins -> PDF/tests -> versioned ZIP pipeline for the live missing-parenthesis demonstration. It does not execute that rehearsal or draft the final course report.
|
||
|
|
|
||
|
|
## What the job builds
|
||
|
|
|
||
|
|
`Jenkinsfile.final-project` now invokes `demo/build_demo_pdf.py` and `demo/demo_report.tex` instead of `documentation/ci/build_manual.py`. The existing full-manual builder remains available for separate use. The short LaTeX PDF is expected to be one page and visibly records the exact committed broken source, the raw response from the real SmolLM2 model, the accepted corrected source, and their one-character diff. It also prints the release version, full source SHA, model ID, Actions run/attempt, Jenkins build, measured tokens, elapsed time, Actions-job memory, and evidence hashes. The builder validates those values against the verified review bundle before copying `documentation/build/main.pdf` into the existing release pipeline. A saved real-review bundle from Actions run 43 produced an offline one-page preview; that preview's version 1.0.5 was a test label, not a release reservation.
|
||
|
|
|
||
|
|
## Version identity
|
||
|
|
|
||
|
|
Jenkins reserves a durable version before the metrics/PDF/test stages and passes `RELEASE_VERSION` to each. The short PDF text and build manifest carry it. `out/test-result.json` records it. The release archive name, `report-<version>.pdf`, `VERSION.txt`, README, `manifest.json` (`version` and `document_version`), `release.json`, and the separate downloadable PDF/checksum all carry the same version. The upstream Actions bundle and raw review are produced before Jenkins reserves a release number; they are bound to the exact source SHA, run ID, attempt, hashes, and model identity, so their original measured bytes remain intact. A retry of the same identity reuses the immutable ZIP bytes and reserved version.
|
||
|
|
|
||
|
|
## Grafana token behavior
|
||
|
|
|
||
|
|
`ci/publish_live_metrics.py` updates `/home/codex/ssw590-final-metrics/final-project.prom` only after Jenkins verifies a live Actions bundle. It retains the existing last-run gauges and adds `review_input_tokens_total` and `review_output_tokens_total`, cumulative counters since activation. A ledger keyed by source SHA/run ID/attempt makes a Jenkins retry idempotent. Null token counts add nothing; fixture counts are refused. The dashboard adds two top panels for those counters. Baseline was initialized to actual zero since activation, while prior last-run gauges remain 23/5 from earlier evidence. Grafana does not receive a token increment at inference start: the increase follows Jenkins verification and a Prometheus scrape. Cumulative counters are for demonstration of a new event; the exact run's token counts remain in `review.json`.
|
||
|
|
|
||
|
|
The provisioned dashboard copy is `/home/codex/myfileagent-gitea/assignment7-monitoring/monitoring/grafana/provisioning/dashboards/json/final-project.json`. The new source dashboard and provisioned copy had matching SHA-256 `36c06ab418db400b913f01d642b3e594dcc7faed9c13592727fea5a564e18554` at deployment. The textfile collector was checked at `node_textfile_scrape_error 0`; Prometheus returned a live input cumulative sample of 0 before the rehearsal. Grafana's authenticated API rejected programmatic access with HTTP 401, so final visual confirmation should be done in the user's signed-in dashboard. No fabricated live token counts were published.
|
||
|
|
|
||
|
|
## Rehearsal preparation
|
||
|
|
|
||
|
|
The integration branch is prepared with a valid `demo/demo.py` containing exactly `print("hello")` plus a final newline. Its preparation commit uses Gitea's built-in `[skip ci]` commit-message convention; no workflow bypass was added. Confirm no Actions review starts for this preparation push. During the audience session the user deletes only the final `)` and commits the resulting `print("hello"` plus newline. That new SHA triggers real inference, Actions tests and evidence, then Jenkins. Do not run the rehearsal on the preparation commit. The next release version is determined by Jenkins's durable state; 1.0.5 is plausible after prior 1.0.4 but must be read from the new build.
|
||
|
|
|
||
|
|
## Local verification and limits
|
||
|
|
|
||
|
|
In the pinned compiler/runtime image `sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1`, the updated CI suite passed 24 tests and the reviewer/application suite passed 19. The four affected metrics tests passed after the collector-readable file-mode fix. The new short PDF compiled from a saved real review bundle with `pdflatex -no-shell-escape` as a one-page offline preview. This change did not rerun the real model, reserve a new live version, execute the full Jenkins job, or prove the future rehearsal succeeds. Save the Actions/Jenkins/Grafana screenshots and new review bundle during that user-led run.
|