Files
myfileagent-pipeline/ops/manual-build/README.md
2026-10-07 01:33:23 +00:00

117 lines
7.0 KiB
Markdown

# Assignment 5 manual build infrastructure
Status on October 6, 2026 (America/New_York): source transfer resolved. The
complete manual now resides in documentation/. Push-triggered manual runs 3
and 4 passed; controlled LaTeX failure run 5 published no PDF; repaired run 6
passed. All three successful artifacts were downloaded and checksum-verified.
See manual-build-evidence.json and documentation/devopsAutomatedManualBuild.tex.
Assignment metadata remains 1.7.1, October 6, 2026. Final PDF publication uses
its generated Build Identity; final download verification is retained separately.
## Deployment
Existing host: /home/codex/myfileagent-gitea. Gitea 1.27.3 and Caddy 2.11.4
were left running. Public HTTPS remains https://myfileagent.tech, with the
Gitea backend bound to 127.0.0.1:3000 and its private Docker bridge. The existing
5050/8080 grading apps and SSH configuration were not changed.
Runner 0.6.1 is pinned by registry digest in runner-compose.yaml. The live
configuration is at /home/codex/myfileagent-gitea/runner. Registration is scoped to
myfileagent/myfileagent-pipeline; runner ID 1, name assignment5-manual,
label manual-latex, capacity one. Live runner state is outside Git in a
mode-700 directory; .runner is mode 600. No registration credential is in
Compose, source, or this record. The temporary implementation credential has
write:repository scope and is stored outside Git; revoke it when work ends.
The runner controls the host Docker socket and therefore has powerful host
access. Only trusted team workflows may run. Jobs have no socket, registration
state or permitted host-volume mounts. The runner exposes no ports, cache or
metrics listener. Jobs use the separate manual-build-jobs bridge, a 256 MiB
memory ceiling, no swap, 0.65 CPU and a PID limit of 256. The runner itself is
limited to 192 MiB (Go soft memory target 128 MiB) and 0.25 CPU. This does not protect the host against a malicious
trusted workflow or Docker administrator. Workflow triggers must remain push
only on main/manual-build-validation; do not enable untrusted PR jobs.
The repository is public, has no direct collaborators, and grants its Owners
team owner rights. No branch protections existed at preflight. Team review of
workflow changes remains a procedural control, not an enforced approval gate.
## Toolchain and evidence
Dockerfile pins Debian by digest and packages by the October 1, 2026 Debian
snapshot. It supplies TeX Live 2022, latexmk, minted/Pygments, Latin Modern,
recommended fonts, BibTeX, index/glossary tools, Node and pypdf. Full source compatibility was verified by precompilation and successful Actions runs.
runner-preflight.yml is an isolated infrastructure test on branch
manual-runner-preflight. It is not one of the required manual source builds.
It tests exact-commit checkout, HTTPS, backend isolation, dependency presence,
and the pinned upload-artifact v3.2.2 protocol. Its text artifact has 14-day
retention; the eventual PDF workflow must also record its actual retention.
Checkout is pinned to v4.2.2 commit 11bd71901bbe5b1630ceea73d27597364c9af683.
Upload is pinned to v3.2.2 commit c6a366c94c3e0affe28c06c8df20a878f24da3cf.
## Source and build
The user supplied Assignment5-source-prepared.zip, SHA-256
ad93f9f2e71bc66a2b882b57510cbb7f51827637047073d6a6f78c0170e6205e.
The original archive and instruction PDF remain outside the public repository.
All actual manual dependencies, including twelve hw4_images files, are versioned.
The active workflow is .gitea/workflows/manual-pdf.yml, triggered by pushes to
main and manual-build-validation. Its helper runs from documentation/ci and
creates uncommitted build metadata in a fresh temporary workspace. Compiler
errors, missing/empty PDFs and failed identity/reference checks stop publication.
The requested artifact retention is 14 days. No generated PDF is auto-committed.
## Ownership, cost, cleanup and recovery
The MyFileAgent team owns the runner and storage. Preflight measured one CPU,
961 MiB RAM, about 292 MiB available memory, no swap, and 18 GiB free disk.
No paid resize or additional machine was purchased. Existing account billing
and transfer charges were not inspected; do not claim the work is free.
Stop only the added service with docker compose -f runner/compose.yaml stop
from the deployment directory. This preserves Gitea and historical data.
Remove runner ID 1 through repository Settings / Actions / Runners if retiring
it, then remove only its identified state and temporary credentials. Preserve
required artifacts before their retention expires. Do not prune all Docker
images, networks, volumes, or containers on this shared host.
For queued jobs check scope, online state, label and branch. For build failures
inspect the first LaTeX error and pinned dependencies. For uploads inspect the
PDF path and action compatibility. Check memory/disk before retrying.
References: https://docs.gitea.com/1.26/usage/actions/act-runner/;
https://docs.gitea.com/1.27/usage/actions/comparison/;
https://docs.gitea.com/1.27/administration/config-cheat-sheet/.
Compiler image built successfully: local immutable image ID
sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1
(1.32 GB). The runner selects this exact local image ID with force_pull false.
Rebuilds on a replacement host must record their image ID before enabling jobs.
## Verified compatibility result
On October 6, 2026 (America/New_York), push commit
2fcbcbf6390273b8d3be14bfb656ec02ce050a97 completed successfully in
https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/2 .
The downloaded text artifact is
https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/2/artifacts/runner-preflight-2 .
Its ZIP SHA-256 is recorded in evidence-2026-10-06.json; the extracted payload
is preserved in preflight-result-2.txt. The actual checks passed: triggering
revision, HTTPS, blocked direct private backend/gateway port 3000, absent
Docker socket/runner state, and compiler dependencies. This does not imply
all outbound destinations or other host ports are blocked.
The pinned upload-artifact v3.2.2 action works with this server. Its legacy
artifact is downloadable from the run URL but absent from the newer REST
artifact listing. Use the run's named download link for this protocol. Retention
is requested as 14 days; expiry enforcement has not yet been observed.
The active manual workflow is .gitea/workflows/manual-pdf.yml; manual-pdf.yml.example is the original preparation template.
The first preflight hit the runner's 96 MiB cap during action download. Its
orphaned container was stopped; the cap is now 192 MiB with GOMEMLIMIT=128MiB.
Run 2 then passed without another runner restart. This infrastructure repair
is NOT the required controlled LaTeX error and repair exercise.
The original manual is now imported. Its complete automated-build chapter, history, prompt log, introduction, references and Hosts/Passwords hints have been updated while preserving earlier evidence. The glossary and index link the build concepts; the final artifact requires visual review after download.