diff --git a/ci/contract.json b/ci/contract.json new file mode 100644 index 0000000..c587489 --- /dev/null +++ b/ci/contract.json @@ -0,0 +1,76 @@ +{ + "schema_version": 1, + "baseline_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7", + "reviewer_cli": [ + "--input", + "--source-commit", + "--out-dir" + ], + "source_policy": "Never overwrite input; output directory must be fresh", + "outputs": [ + "review.json", + "reviewed.py" + ], + "required_review_fields": [ + "source_commit", + "model_id", + "status", + "summary", + "diff", + "input_tokens", + "output_tokens" + ], + "exit_codes": { + "0": [ + "corrected", + "unchanged" + ], + "2": [ + "rejected" + ], + "3": [ + "error" + ] + }, + "ready_statuses": [ + "corrected", + "unchanged" + ], + "failure_policy": "No reviewed.py or ready bundle on rejected/error", + "tokens": "Measured nonnegative integers or null when unavailable; never estimated", + "modes": [ + "fixture", + "live" + ], + "fixture_model_id": "fixture-model", + "bundle_files": [ + "reviewed.py", + "review.json", + "bundle.json", + "SHA256SUMS" + ], + "bundle_identity": [ + "schema_version", + "source_commit", + "run_id", + "attempt", + "mode" + ], + "smoke_stdout": "hello\n", + "model_memory_target_bytes": 250000000, + "provisional_release_baseline": "1.0", + "owners": { + "member1": [ + "real model and runtime pinning", + "reviewer CLI", + "actual token and memory measurement" + ], + "member2": [ + "Actions and Jenkins", + "artifact verification", + "PDF build automation", + "testing and versioned ZIP", + "monitoring integration" + ] + } +} diff --git a/ci/fixtures/demo_fixed.txt b/ci/fixtures/demo_fixed.txt new file mode 100644 index 0000000..11b15b1 --- /dev/null +++ b/ci/fixtures/demo_fixed.txt @@ -0,0 +1 @@ +print("hello") diff --git a/documentation/ci/build_manual.py b/documentation/ci/build_manual.py index 3efa931..3945dc6 100644 --- a/documentation/ci/build_manual.py +++ b/documentation/ci/build_manual.py @@ -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.