Repair LaTeX build and document verification (refs #12)
Automated Manual Build / manual (push) Successful in 29s

This commit is contained in:
2026-10-07 20:16:01 -04:00
parent 1d2822f8a3
commit b68425ba13
11 changed files with 239 additions and 40 deletions
+172 -28
View File
@@ -3,11 +3,14 @@
\index{Gitea!Actions}
\index{LaTeX!automated compilation}
\index{runner!local Docker runner}
\begingroup
\sloppy
This chapter records Assignment 5, \emph{LaTeX Auto-Compilation with
Gitea -- Group}. Evidence was collected on October 7, 2026. The first
Gitea workflow succeeded; the second source-change run and the controlled
workflow failure/repair exercise are still pending.
Gitea -- Group}. Evidence was collected on October 7, 2026. Two successive source pushes produced successful Gitea builds. Run 3 then
failed for the intended LaTeX error. This update removes that error and
prepares version 3.3; its passing repair run and final artifact review remain
pending.
\section{Source and Trigger}
The existing \href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway}{Group 1
@@ -26,8 +29,19 @@ checked-out SHA equals that revision. Results are available on the
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions}{repository
Actions page}.
The main file is
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/codex/assignment5-manual-build/manual/latex/devopsAssignment.tex}{\texttt{manual/latex/devopsAssignment.tex}};
the \href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/codex/assignment5-manual-build/.gitea/workflows/manual.yml}{push workflow}
and \href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/codex/assignment5-manual-build/ci/manual/build.sh}{build script}
are versioned alongside it. Vincent commits and pushes from the separate
Gitea checkout in VSCode. Its origin uses HTTPS: the client reaches Caddy on
public TCP port 443; Caddy terminates TLS and forwards the request to Gitea's
private Docker-network port 3000. Git pushes need no public Gitea SSH port.
The runner requests work from the same HTTPS service and has no public
submission listener.
\section{Runner Setup}
The repository-scoped runner \texttt{ssw590-vince-local}, version 2.3.0,
The repository-scoped \gls{build-runner} \texttt{ssw590-vince-local}, version 2.3.0,
runs as Docker container \texttt{ssw590-local-runner} on Vincent's Windows
laptop using Docker Desktop's Linux engine. Its \texttt{latex-local} label
selects the local compiler image \texttt{ssw590-manual-ci:20261007}.
@@ -35,6 +49,30 @@ Capacity is one job at a time. The runner uses outbound connections to Gitea
over HTTPS and to GitHub for the pinned Actions; it publishes no ports.
Compilation therefore runs on the laptop while Gitea remains on the droplet.
The runner is separate from the 512\,MiB, 10\,GB droplet to leave its
existing Gitea and Color Buttons services available. Docker execution
creates a temporary job container with TeX installed in its image; the
runner daemon container itself does not compile the document. The compiler
image was built once on this laptop's Docker engine and is reused locally.
Label and capacity settings follow Gitea's runner configuration model.\footnote{\url{https://docs.gitea.com/runner/2/configuration/}}
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth,height=0.48\textheight,keepaspectratio]{images/gitea-runnner-vince-running-idle.png}
\caption{October 7, 2026: the registered runner is online and idle, with
repository scope, version 2.3.0, and label \texttt{latex-local}.}
\label{Figure:ManualRunnerOnline}
\end{figure}
The local daemon declared this runner and accepted the repository's task 2
at 23:39:34 UTC (7:39:34 p.m. Eastern), matching the second workflow run.
Message-field excerpts from the actual daemon log are:
\begin{minted}{text}
runner: ssw590-vince-local, with version: v2.3.0, with labels: [latex-local], declare successfully
task 2 repo is ssw590-group1/vpn-dns-gateway https://github.com https://git.yebilly.me/
Running job with maxParallel=1 for 1 matrix combinations
\end{minted}
Registration has already been completed privately. With Docker Desktop
running, these commands from the repository root start, inspect, and stop the
registered runner without registering it again:
@@ -68,6 +106,21 @@ checksum deliverables are removed before compilation. A compiler error or
missing/empty PDF causes failure; the PDF upload also fails if its expected
file is absent. Diagnostics are uploaded even after a compilation failure.
Inside the disposable source directory, the build script runs:
\begin{minted}{sh}
latexmk -r "$repo_root/ci/manual/latexmkrc" -pdf -shell-escape \
-interaction=nonstopmode -halt-on-error -file-line-error \
devopsAssignment.tex
\end{minted}
The expected deliverable is
\texttt{build/manual/2026F-SSW-590-DevOps-Group-1.pdf}. The image contains the
manual's fonts and LaTeX packages plus the bibliography, glossary, acronym,
and index tools. The bibliography resources are retained; bibliography
processing is conditional because the active main file currently disables
its bibliography. The job checks out source from Gitea and uploads artifacts
over HTTPS. It shares no source directory or compiler installation with the
Gitea application container.
\section{PDF Version Traceability}
The human document version is maintained in source. Actions appends the run
number and triggering short commit, producing versions such as
@@ -88,13 +141,14 @@ Downloaded PDF & \texttt{2026F-SSW-590-DevOps-Group-1.pdf}, 100 pages\\
The first PDF still displays the Assignment 4 title because that title was in
the triggering source. Figure~\ref{Figure:ManualFirstPDF} preserves that
original result. The current source corrects the title to Assignment 5 and
sets human version 3.2; its next workflow run must supply its own new run
number and commit suffix.
original result. The second source change corrected the title to Assignment 5
and produced version \texttt{3.2+build.2.0ca3beb}. The current repair source
uses human version 3.3; its next workflow will inject its actual run and
commit values. The source does not predict those values.
\section{Downloadable Artifact}
Figure~\ref{Figure:ManualWorkflowRunOne} shows successful checkout,
compilation, and both artifact uploads. The workflow requests 14-day artifact
compilation, and both artifact uploads. The workflow requests 14-day \gls{build-artifact}
retention, subject to server policy. Vincent downloaded the PDF and
diagnostics ZIPs and saved them under \texttt{build/evidence/run-1/}.
The extracted PDF matches the PDF inside its artifact ZIP and the SHA-256
@@ -102,6 +156,20 @@ recorded in the diagnostics:
\begin{minted}{text}
9468fa2803611a09f8f832a5631489413e9ab29254d0ae77e53d43fecd9463f0
\end{minted}
For a matching download, open Actions, select the successful run, and click
its named PDF artifact. Extract the ZIP and open the PDF. For example,
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions/runs/2}{\texttt{manual-pdf-build-2} on run 2}
contains the opened PDF in Figure~\ref{Figure:ManualSecondPDF}. Its
106-page file matches its ZIP contents and the diagnostics checksum:
\begin{minted}{text}
b5db51d3b7a94d47f9cc96876d6c82dea7a65e9862970bf2926c69b0bffca109
\end{minted}
The two successful runs' original PDFs, ZIPs, and diagnostics are retained
under \texttt{build/evidence/run-1/} and \texttt{build/evidence/run-2/}.
Artifacts can expire or be deleted; the 14-day setting is not a permanent
backup. Gitea documents artifact upload and retention separately from Git
source history.\footnote{\url{https://docs.gitea.com/usage/actions/artifacts/}}
These original downloads are retained locally and ignored by Git. A final
submission PDF must be downloaded from a successful workflow after the
remaining assignment work is recorded.
@@ -125,22 +193,84 @@ preserved as historical run-1 evidence. Screenshot supplied by Vincent.}
\clearpage
\section{Change, Failure, and Repair Evidence}
\textbf{Verified:} the initial source push produced run 1 and the downloadable,
traceable PDF above. Local container checks also demonstrated that an
intentional LaTeX error fails, removes a stale deliverable, and compiles after
repair; a mismatched triggering SHA was rejected. These local checks do not
establish the required Gitea workflow failure/repair evidence.
\begin{tabularx}{\linewidth}{L{1.0cm}L{1.8cm}L{1.8cm}Y}
\caption{Actual source-change and failure results, October 7, 2026\label{Table:ManualBuildSequence}}\\
\toprule \textbf{Run} & \textbf{Commit} & \textbf{Result} & \textbf{Visible PDF / artifact}\\ \midrule
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions/runs/1}{1} &
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/commit/828f6c555b0d3a9bcf611a5097207e3942dfda11}{\texttt{828f6c5}} & Success &
\texttt{3.1+build.1.828f6c5}; \texttt{manual-pdf-build-1}\\
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions/runs/2}{2} &
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/commit/0ca3bebe3efbf5a9e433ec30abb22d9a901f66cb}{\texttt{0ca3beb}} & Success &
\texttt{3.2+build.2.0ca3beb}; \texttt{manual-pdf-build-2}\\
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions/runs/3}{3} &
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/commit/1d2822f8a32c56e946e51fce532c309dafb05867}{\texttt{1d2822f}} & Intended failure & No PDF artifact; \texttt{manual-diagnostics-build-3} retained\\
\bottomrule
\end{tabularx}
\textbf{Pending:} push the updated title and this chapter as a second source
change, then record its commit, successful run, artifact, and opened PDF.
On the covered assignment branch, introduce a temporary LaTeX error, capture
the failed workflow and compiler message, repair it, and capture the successful
workflow and PDF. Keep the application deployment unchanged during this test.
The first push added the automated build. The next source change updated the
assignment title and added first-run evidence. Both expected successful
builds passed, and their commit/run identifiers match the downloaded PDFs.
Figure~\ref{Figure:ManualWorkflowRunTwo} shows the second run and both
artifacts; Figure~\ref{Figure:ManualSecondPDF} shows its updated title and
version.
For a queued job, check that Docker Desktop and the runner are running and
that the workflow's label matches \texttt{latex-local}. For compilation
failure, inspect the failed step and \texttt{compile-console.txt} in the
diagnostics artifact, correct the reported source error, and push the repair.
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{images/gitea-actions-second-run-success.png}
\caption{October 7, 2026: run 2 passed after the second source change and
uploaded \texttt{manual-pdf-build-2} and its diagnostics.}
\label{Figure:ManualWorkflowRunTwo}
\end{figure}
\begin{figure}[p]
\centering
\includegraphics[width=0.72\linewidth,height=0.72\textheight,keepaspectratio]{images/gitea-runner-pdf-second-run.png}
\caption{October 7, 2026: downloaded run-2 PDF opens with the Assignment 5
title and visible version \texttt{3.2+build.2.0ca3beb}.}
\label{Figure:ManualSecondPDF}
\end{figure}
\clearpage
For the controlled test, Vincent committed and pushed a temporary error on
\texttt{codex/assignment5-manual-build}, immediately before the main
document begins:
\begin{minted}{latex}
\errmessage{Assignment 5 intentional compilation failure test}
\end{minted}
\textbf{Expected:} compilation fails, the job is red, no PDF is uploaded,
and diagnostics remain available. \textbf{Actual:} run 3 did exactly this
(Figure~\ref{Figure:ManualIntentionalFailure}). Its downloaded diagnostics
identify commit \texttt{1d2822f}, run 3, the deliberate error at source
line 117, and a compiler return code of 1. The diagnostic ZIP contains
build information, package versions, and compilation output; it contains no
PDF or PDF checksum. The retained compiler output includes:
\begin{minted}{text}
./devopsAssignment.tex:117: Assignment 5 intentional compilation failure test.
Latexmk: Errors, so I did not complete making targets
pdflatex: Command for 'pdflatex' gave return code 1
\end{minted}
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{images/gitea-actions-intentional-failure.png}
\caption{October 7, 2026: run 3 failed at compilation, skipped PDF upload,
and retained only the diagnostics artifact, as expected.}
\label{Figure:ManualIntentionalFailure}
\end{figure}
\textbf{Repair prepared:} this source update removes the temporary error
and updates the report to version 3.3. A passing repair run, its actual commit
and build identifier, and its downloaded PDF are still pending. Local
compilation checks do not substitute for that workflow evidence. The test
and repair change the manual source only; the deployed application files
were preserved.
For a queued job, check Docker Desktop, the runner's online status, and the
\texttt{latex-local} label. For a failed build, download the diagnostics ZIP
from that run and read \texttt{compile-console.txt}; identify the reported
file and line, correct the source, commit, and push the repair. Check that
the repaired run is green and download its new PDF. Do not reuse a PDF from
an earlier run as evidence that the repair passed.
\section{Runner and Secret Boundary}
\index{runner!secret boundary}
@@ -153,12 +283,26 @@ Registration state stays in the named Docker volume
\texttt{ssw590-local-runner-data}, outside Git. No registration token or runner
identity contents appear in this chapter or its screenshots. The workflow
requests read access to repository contents and needs no cloud account secret.
The repository is public, but access to edit and push workflow-covered code
is restricted to authorized group contributors; public visibility does not
make external workflow changes trusted. Non-secret
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/codex/assignment5-manual-build/gitea/local-runner/config.yaml}{runner configuration}
and its
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/codex/assignment5-manual-build/gitea/local-runner/compose.yaml}{Compose configuration}
are versioned. Runner 2.x does not filter all workflow container options, so
these settings do not make it suitable for untrusted workflows.
The Docker privilege boundary still depends on trusting workflow editors.
Registration token input was private; persistent runner identity remains in
\texttt{/data/.runner} inside the named volume, never in the repository.
\section{Manual Quality and Controls}
This draft records the corrected title, human version 3.2, first-run evidence,
This draft records human version 3.3, dated run-1/run-2 and failure evidence,
and assistance in Document History and \ChapterRef{AIPromptLog}. Earlier
assignment chapters retain their historical results. The existing Hosts and
Passwords tables in \ChapterRef{HostsPasswords} are unchanged in this update;
the local runner host and a hints-only registration-state record still need
to be added before final submission. Remaining workflow evidence and final
artifact review are pending, so this chapter does not claim full completion.
assignment chapters retain their historical results. Both controls in
\ChapterRef{HostsPasswords} are updated: the Hosts section adds the local
runner, and the Passwords table adds a hints-only runner identity record.
No credential values are included. Relevant runner and build-artifact terms
appear in the glossary and index. The passing repair evidence and final
workflow-generated submission PDF remain pending.
\endgroup