Define shared review contract and generate run data in automated PDF
This commit is contained in:
@@ -123,6 +123,23 @@ def main():
|
||||
generated += "\\newcommand{\\" + key + "}{" + tex(value) + "}\n"
|
||||
(workspace / "final-reviewed.txt").write_bytes(review_files["reviewed.py"])
|
||||
(workspace / "final-diff.txt").write_text(review["diff"] or "No changes (unchanged review).", encoding="utf-8")
|
||||
# Generated run data only; the authored report chapter is maintained separately.
|
||||
appendix = r"""\clearpage
|
||||
\chapter*{Automated Review Run}
|
||||
\noindent Release: \FinalVersion\\
|
||||
Mode: \FinalMode\\
|
||||
Status: \FinalStatus\\
|
||||
Model: \FinalModel\\
|
||||
Input tokens: \FinalInputTokens\\
|
||||
Output tokens: \FinalOutputTokens\\
|
||||
Jenkins build: \FinalJenkinsBuild
|
||||
\section*{Reviewed source}
|
||||
\lstinputlisting[basicstyle=\ttfamily\small,breaklines=true]{final-reviewed.txt}
|
||||
\section*{Change log}
|
||||
\lstinputlisting[basicstyle=\ttfamily\small,breaklines=true]{final-diff.txt}
|
||||
"""
|
||||
main_path = workspace / "main.tex"
|
||||
main_path.write_text(main_path.read_text().replace(r"\end{document}", appendix + r"\end{document}"))
|
||||
(workspace / "build-metadata.tex").write_text(generated, encoding="utf-8")
|
||||
# Shell escape is needed by the current minted source. Run only trusted
|
||||
# team source in the isolated job, with no host/Docker socket mounts.
|
||||
|
||||
Reference in New Issue
Block a user