Compare commits

..
Author SHA1 Message Date
Codex 1449a8bf68 Record combined real-model local integration evidence
myfileagent-python-ci/pipeline/head This commit looks good
2026-11-27 03:13:15 +00:00
Codex edd87d6b7f Add measured SmolLM2 syntax reviewer and Member 1 evidence
myfileagent-python-ci/pipeline/head This commit looks good
2026-11-27 03:03:39 +00:00
109 changed files with 1611 additions and 1688 deletions
-39
View File
@@ -1,39 +0,0 @@
name: Final project review (fixture)
on:
push:
branches: [feature/final-ci-demo, final-project-demo]
jobs:
review:
runs-on: manual-latex
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.sha }}
persist-credentials: false
- name: Verify source and run fixture contract tests
env:
SOURCE_SHA: ${{ github.sha }}
run: |
set -eu
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
python3 -m unittest discover -s ci/tests -v
- name: Produce explicitly simulated review bundle
env:
SOURCE_SHA: ${{ github.sha }}
ACTIONS_RUN_ID: ${{ github.run_id }}
ACTIONS_ATTEMPT: ${{ github.run_attempt }}
run: |
set -eu
echo 'Mode: fixture. No live model or live token evidence.'
python3 ci/fixtures/reviewer_stub.py --input ci/fixtures/demo_broken.txt --source-commit "$SOURCE_SHA" --out-dir out/review
python3 ci/final_project.py bundle --review-dir out/review --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode fixture --output out/review-bundle.zip
- name: Publish ready bundle for this exact run and attempt
uses: https://github.com/actions/upload-artifact@c6a366c94c3e0affe28c06c8df20a878f24da3cf
with:
name: review-${{ github.run_id }}-attempt-${{ github.run_attempt }}-${{ github.sha }}
path: out/review-bundle.zip
if-no-files-found: error
retention-days: 14
-4
View File
@@ -1,4 +0,0 @@
__pycache__/
*.py[cod]
out/
documentation/build/
+95
View File
@@ -0,0 +1,95 @@
SSW590 Group 7 — Member 1 handoff (2026-11-26 America/New_York)
Owner: Member 1; branch: feature/final-ai-review
BASE_SHA / demonstrated source_commit: 5373351a7e7ac2bc0f34bae19c25383de3843ca7
Current implementation SHA: resolve `git rev-parse feature/final-ai-review` after fetching this branch; it is printed in the delivery message.
Scope and changed paths:
reviewer/__init__.py, __main__.py, llama_adapter.py, model-lock.json, prepare_runtime.py
demo/demo.py
tests/fixtures/demo_broken.py, tests/smoke_demo.py, tests/test_reviewer.py
handoff/member1/canonical-fixture.json, canonical-reviewed.py, runtime.md,
metrics-proposal.md, report-contribution.md, integration-check.md, evidence/**
HANDOFF.txt
No workflow, Jenkins, version/packaging, shared LaTeX, or deployed monitoring file was edited.
Canonical fixture contract for Member 2:
Input: tests/fixtures/demo_broken.py, exact bytes `print("hello"\n`.
Accepted output: handoff/member1/canonical-reviewed.py, exact bytes `print("hello")\n`.
Sample fixture JSON: handoff/member1/canonical-fixture.json. Its 24/8 counts are FAKE and mode=fixture.
CLI: python3 -m reviewer --input FILE --source-commit FULL_SHA --out-dir FRESH_DIR
corrected/unchanged => exit 0 and reviewed.py; rejected => exit 2, no reviewed.py;
operational error => exit 3, no reviewed.py and review.json where possible.
Required seven JSON fields remain stable. Extras include mode, revision, UTC times,
elapsed_seconds, input hash and raw-response references. Valid input bypasses model,
preserves exact bytes, has empty diff and mode=bypass. A fixture override uses
REVIEWER_BACKEND_COMMAND and mode=fixture. Real mode uses the pinned local adapter.
Model response cleanup removes surrounding whitespace only, preserves raw stdout,
restores source newline policy, and still requires exact one-character repair.
Prerequisites and reproduction:
Python 3.12+ standard library, Linux amd64, Docker for cgroup measurement,
outbound HTTPS for first-time model/runtime download, and compatible libgomp1.
Read handoff/member1/runtime.md for exact lock, checksums and Docker command.
python3 -m reviewer.prepare_runtime --dest /tmp/ssw590-member1-runtime
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v
export REVIEWER_MODEL_PATH=/tmp/ssw590-member1-runtime/SmolLM2-135M-Instruct.Q4_0.gguf
export REVIEWER_LLAMA_COMPLETION=/tmp/ssw590-member1-runtime/llama-b12785/llama-completion
# Make libgomp.so.1 available in the image/loader path.
python3 -m reviewer --input tests/fixtures/demo_broken.py \
--source-commit 5373351a7e7ac2bc0f34bae19c25383de3843ca7 \
--out-dir /tmp/ssw590-review-new-001
python3 tests/smoke_demo.py /tmp/ssw590-review-new-001/reviewed.py
Use a fresh output directory for each invocation.
Actual local results:
19 unittest cases passed, including the two preexisting pricing cases; public CLI
corrected/rejected/unchanged/error and argparse usage distinction were exercised.
The finalized real model returned corrected/exit 0 and the smoke test passed.
All three fresh private-model cgroup trials: 23 prompt / 5 output tokens, no OOM;
natural peaks 236150784, 233103360, 238735360 bytes; durations 3.848678,
3.941480, 1.812362 seconds. A 250000000-byte hard-cap run peaked at
234405888 bytes, no OOM, corrected and smoke passed.
Sample successful real bundle: handoff/member1/evidence/acceptance-250m/.
Sample operational error: handoff/member1/evidence/error-missing-model/review.json
(exit 3, null counts, no reviewed.py).
Raw response, runtime counter lines, resource/OOM output and machine summary:
handoff/member1/evidence/{trial-1,trial-2,trial-3,acceptance-250m,measurements.json}.
Actual read-only host load query window: evidence/prometheus-host-window.json.
Dashboard metrics, null handling and report/SWOT content: handoff/member1/*.md.
Member 2 branch 4feb5881... accepted the recorded real review through its
unmodified bundle, verify, smoke and metrics commands locally; details and
the synthetic-run limitation are in handoff/member1/integration-check.md.
A combined temporary checkout found one Member 2 smoke exception mismatch. A
minimal return-code-to-ValueError fix in its owned ci/final_project.py made
all 19 local CI tests pass. In Member 2 pinned image, both 19-test suites
passed, including the five image-dependent cases. See integration-check.md.
A real-model local combined dry run under the 250000000-byte cap passed at
241446912 bytes; the isolated PDF/ZIP gates also passed. It used temporary
commit a40ffe1..., synthetic run ID 1 and isolated version 1.0.1; it is
neither a deployed Actions/Jenkins release nor scraped token metrics.
Evidence: handoff/member1/evidence/local-integration-dryrun/.
Known failures and limits:
Initial interactive CLI produced unrelated code. A server variant's private-model
peak was 261754880 bytes and failed the memory target; default-batch completion
also exceeded the target in two trials. These are retained under evidence/experiments/.
The smaller context/batch one-process completion configuration is the successful one.
This is local feasibility. The actual Actions/Jenkins image, end-to-end ZIP release,
token collector/Grafana panels and demo screenshots are not yet verified.
Gitea branch push from this SSH session is currently blocked by missing HTTPS
credentials; no working Git SSH identity is available. The committed branch
remains in this separate checkout until an authenticated push is available.
The separate official instructor rubric was not attached here; guide page 5's rubric
mapping was read, and the instructor copy should be checked before final submission.
Current BASE_SHA already contains the reviewed Homework 8/9 documentation branch
heads 4fa2bed7..., 6e2873cc... and 0d835a15...; no documentation rewrite was needed.
Next integration action / explicit dependency:
Member 2 should fetch this branch and consume the canonical fixture immediately,
then install pinned llama-completion + libgomp1 in its execution image, repeat the
checksum and memory smoke check, and wire the exact real review bundle into its
Actions/Jenkins transfer gate. Member 2 owns the textfile collector and Grafana
provisioning; integrate metrics-proposal.md only after verifying the deployed paths.
Coordinate any change to CLI flags, seven JSON fields, mode semantics, newline rule,
model runtime environment names or 250000000-byte boundary before consumption.
No uncommitted intended changes should remain after the final branch commit.
-77
View File
@@ -1,77 +0,0 @@
pipeline {
agent { label 'assignment8-trusted' }
options { disableConcurrentBuilds(); skipDefaultCheckout(); timeout(time: 45, unit: 'MINUTES'); timestamps() }
parameters {
string(name: 'SOURCE_SHA', defaultValue: '', description: 'Full SHA of this reviewed pipeline branch and Actions run')
string(name: 'ACTIONS_RUN_ID', defaultValue: '', description: 'Exact successful Gitea Actions run')
string(name: 'ACTIONS_ATTEMPT', defaultValue: '1', description: 'Exact attempt')
choice(name: 'MODE', choices: ['fixture'], description: 'Live mode requires Member 1 integration and review')
}
stages {
stage('Checkout exact source') {
steps {
script {
if (!(params.SOURCE_SHA ==~ /[0-9a-f]{40}/) || !(params.ACTIONS_RUN_ID ==~ /[1-9][0-9]*/) || !(params.ACTIONS_ATTEMPT ==~ /[1-9][0-9]*/)) { error('Invalid run identity') }
}
deleteDir()
checkout scm
sh '''set -eu
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
mkdir -p out
'''
}
}
stage('Retrieve exact Actions bundle') {
steps {
withCredentials([string(credentialsId: 'gitea-jenkins-ci', variable: 'GITEA_TOKEN')]) {
sh '''set +x
set -eu
python3 ci/final_project.py fetch --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --output out/review-bundle.zip > out/actions-run.json
'''
}
}
}
stage('Validate identity and payload hashes') {
steps { sh '''set -eu
python3 ci/final_project.py verify --bundle out/review-bundle.zip --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --output out/verified
sh ci/toolchain.sh start
''' }
}
stage('Reserve durable release version') {
steps {
script {
env.RELEASE_VERSION = sh(script: 'sh ci/toolchain.sh exec python3 ci/final_project.py reserve --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --state /state --baseline 1.0', returnStdout: true).trim()
}
}
}
stage('Compile LaTeX report') {
steps { sh '''set -eu
RUN_NUMBER=$(python3 -c 'import json;print(json.load(open("out/actions-run.json"))["run_number"])')
sh ci/toolchain.sh exec python3 documentation/ci/build_manual.py --sha "$SOURCE_SHA" --run-number "$RUN_NUMBER" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --review-bundle /work/out/review-bundle.zip --release-version "$RELEASE_VERSION" --mode "$MODE" --jenkins-build "$BUILD_NUMBER"
''' }
}
stage('Unit, syntax and reviewed-file smoke tests') {
steps { sh '''set -eu
sh ci/toolchain.sh exec python3 -m unittest discover -s tests -v
sh ci/toolchain.sh exec python3 -m unittest discover -s ci/tests -v
sh ci/toolchain.sh exec python3 ci/final_project.py test --review-dir out/verified --output out/test-result.json
''' }
}
stage('Package immutable release') {
steps { sh '''set -eu
sh ci/toolchain.sh exec python3 ci/final_project.py publish --sha "$SOURCE_SHA" --run-id "$ACTIONS_RUN_ID" --attempt "$ACTIONS_ATTEMPT" --mode "$MODE" --bundle out/review-bundle.zip --pdf documentation/build/main.pdf --state /state --output out/release --jenkins-build "$BUILD_NUMBER"
sh ci/toolchain.sh collect
''' }
}
stage('Publish downloadable ZIP') {
steps { archiveArtifacts artifacts: 'out/collected/release/*', fingerprint: true }
}
}
post {
always {
sh 'sh ci/toolchain.sh collect || true'
sh 'sh ci/toolchain.sh stop || true'
archiveArtifacts artifacts: 'out/actions-run.json,out/collected/test-result.json,out/collected/verified/verified.json', allowEmptyArchive: true
}
}
}
-65
View File
@@ -1,65 +0,0 @@
Member 2 technical checkpoint — 2026-11-26
Owner: Gowri (Member 2), implementation assisted by Codex.
Workspace: /home/codex/ssw590-member2
Branch: feature/final-ci-demo
Base: 5373351a7e7ac2bc0f34bae19c25383de3843ca7
Verified implementation: 0ec7cee5b9923e484e78046ca9adcb848423cd3e
User scope: shared technical prerequisites and Member 2 implementation.
Report prose is deferred. Earlier draft remains on local branch
archive/final-project-documentation-draft. Automated PDF run data is technical
build output, not a completed final-report chapter.
Implemented and verified:
- Shared CLI/artifact contract: ci/contract.json; canonical broken/fixed fixtures.
- Independent fixture reviewer; Member 1's draft workspace remains intact.
- Gitea Actions exact-SHA review bundle; strict identity, hash and ZIP checks.
- Separate final-project-fixture Jenkins job, existing trusted agent and
gitea-jenkins-ci credential. Original required pricing job unchanged.
- Pinned isolated compiler; ordinary manual mode retained; generated review
source/diff and release identity inserted into final-mode PDF.
- Durable locked Major.Minor.Changelist allocation, immutable releases,
reviewed-code execution gate, hashed ZIP payloads and checksum companion.
- 19 pipeline tests including real TeX failure and stale-output removal,
plus 2 existing application tests: all passed in Jenkins #4.
- Monitoring textfile collector at /home/codex/ssw590-final-metrics, readonly
/textfiles mount; existing CPU/memory collectors preserved. Prometheus
target up, collector success 1, scrape error 0; connectivity probe passed
and was removed. No simulated counts were emitted as live measurements.
- Grafana dashboard uid ssw590-final-project: six panels verified in Grafana
resource storage; input/output count availability are separate series.
Actual remote evidence:
- Actions #38 / source 0e7ade75... -> Jenkins #1 SUCCESS -> fixture 1.0.2.
- Jenkins #2: deliberate Actions/source mismatch rejected before compile,
tests or package; no release ZIP published (expected FAILURE).
- Jenkins #3: exact #1 retry SUCCESS; identical 1.0.2 ZIP SHA256:
64173b7bd460cf4ff392ec0cc051865220a242d12e779f929e63a57606013794.
- Actions #39 / verified implementation above -> Jenkins #4 SUCCESS,
fixture 1.0.3, all 21 tests passed. Downloaded actual archived ZIP and
independently checked every payload hash and fresh execution (hello).
- ci/evidence contains manifests, API results, compressed sanitized console
logs, actual Jenkins #1 host CPU/memory samples and monitoring checks.
- Local deliverable: /home/codex/outputs/member2-technical/ssw590-fixture-1.0.3.zip
- Temporary Jenkins API token revoked; rejection verified (401); secret file
removed. No temporary credential remains available for further API work.
Remaining dependencies / work:
- Member 1 supplies pinned real model/runtime, reviewer CLI, actual reviewed
output, raw model response, token counts and measured memory evidence.
Current workflow and Jenkins job intentionally permit fixture mode only.
- Integrate that reviewed runtime, connect measured live metrics, then run
the real-model end-to-end demo; do not relabel fixture results as AI results.
- Team confirmation of 1.0 release baseline (currently provisional).
- Issue-tracker API returned 403 with the existing repository token; no new
final-project issue or comment was created in this session.
- Author final report, diagrams, SWOT text and history only when user resumes
documentation. Existing report content is not claimed as final rubric work.
Runtime persistence:
Docker volume ssw590-final-project-state holds versions and immutable ZIPs.
Do not delete it. Build containers clean themselves up after each Jenkins run.
Monitoring deployment source lives under
/home/codex/myfileagent-gitea/assignment7-monitoring/monitoring;
tracked matching changes live in this branch. Existing infrastructure services
and Member 1's /home/codex/ssw590-final-project edits were preserved.
-71
View File
@@ -1,71 +0,0 @@
SSW590 Member 2 operations — fixture stage
Starting main SHA: 5373351a7e7ac2bc0f34bae19c25383de3843ca7
Branch: feature/final-ci-demo
Workspace: /home/codex/ssw590-member2
Member 1's earlier uncommitted draft remains in /home/codex/ssw590-final-project.
No reviewer/ or tests/smoke_demo.py ownership is assumed here.
Run local unit checks:
python3 -m unittest discover -s ci/tests -v
python3 -m unittest discover -s tests -v
Actions:
The final-project workflow runs only on feature/final-ci-demo or
final-project-demo. It uses the existing manual-latex label and proven
action pins. It runs only simulated review until Member 1 is integrated.
Copy the successful full source SHA, numeric Actions run ID and attempt.
The name is review-RUN_ID-attempt-ATTEMPT-FULL_SHA.
Jenkins setup (requires an authenticated administrator):
1. Create Pipeline job final-project-fixture.
2. Pipeline from SCM: Git, existing public repository URL, branch
*/feature/final-ci-demo, Script Path Jenkinsfile.final-project.
3. Keep the existing myfileagent-python-ci required check unchanged.
4. Reuse existing Jenkins credential gitea-jenkins-ci. Its installed
PersonalAccessTokenImpl implements StringCredentials and supports the
string binding used here; no credential value was read during setup.
5. Run once to load parameters; then Build with Parameters using the exact
successful run SHA/ID/attempt. If branch HEAD has advanced, select the
corresponding new successful run (pipeline refuses a checkout mismatch).
6. Use the existing assignment8-trusted agent. The job creates a temporary
compiler container, network disabled, memory 256 MiB, 0.65 CPU; no
Docker socket or secrets are mounted into that compiler container.
7. The dedicated Docker volume ssw590-final-project-state retains
versions.json and releases/. Do not delete it on cleanup/retry.
8. Download the archived out/collected/release/*.zip and companion checksum.
Extract freshly, verify every manifest payload hash, inspect PDF identity,
and execute python3 reviewed.py (expected hello).
Version policy:
1.0 is a provisional baseline for fixture development, not a team-approved
final baseline. State locks serialize allocation across processes. Source
SHA and mode select a reservation; model/runtime must be pinned in source
before live integration. An unchanged retry reuses original immutable
published bytes/identity. Changed reviewed bytes under the same identity
fail. Final live baseline/identity must be agreed with Member 1.
Report builds:
Ordinary mode remains: python3 documentation/ci/build_manual.py with the
existing GITEA_SHA/RUN_NUMBER/RUN_ID/RUN_ATTEMPT variables.
Final mode additionally accepts --review-bundle, --release-version,
--jenkins-build and --mode. It validates the bundle before inserting data.
Both modes require the pinned TeX image. See ci/toolchain.sh.
Failure exercises:
reviewer_stub.py --case rejected/error produces diagnostics, no reviewed.py.
--case runtime produces valid Python that fails execution; hash it normally.
For transfer corruption, create/hash a good bundle first, then mutate one
payload without updating SHA256SUMS. Validation must fail before TeX.
For wrong identity, use a different expected run ID or SHA. Do not publish.
Execute deliberate TeX failures only in isolated test copies.
Fixture tests never establish real-model accuracy, memory or token evidence.
Monitoring handoff:
ci/final_project.py metrics accepts explicitly live review metadata only.
It emits availability gauges, counts when known and a supplied measured
completion timestamp, using atomic textfile replacement. Existing Node
Exporter textfile collection is not yet enabled by this change. Coordinate
paths, mounts and real metric evidence with Member 1 before deployment.
No paid resizing or production pricing/Zammad deployment is included.
-76
View File
@@ -1,76 +0,0 @@
{
"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"
]
}
}
-10
View File
@@ -1,10 +0,0 @@
{
"source_sha": "bed90200d2e309a63b644a5f138624e6710be3bf",
"actions_run": "35",
"mode": "fixture",
"version": "1.0.1",
"payload_hashes": "passed",
"smoke": "passed",
"zip_sha256": "ecfecf00849828e22ad8be3e9f5dd3f330993fffa30224f3ab1eff13df94f4c6",
"execution": "isolated toolchain on Droplet; not a Jenkins job"
}
Binary file not shown.
-138
View File
@@ -1,138 +0,0 @@
{
"jenkins_build": 1,
"start": 1795637897.303,
"end": 1795638073.477,
"scope": "Shared host, includes unrelated workloads; not model RSS",
"series": {
"cpu_percent": [
{
"metric": {},
"values": [
[
1795637777.303,
"77.6760923166033"
],
[
1795637807.303,
"92.7444444444134"
],
[
1795637837.303,
"99.97777777775708"
],
[
1795637867.303,
"89.62895444741524"
],
[
1795637897.303,
"89.65555555555814"
],
[
1795637927.303,
"89.36666666672359"
],
[
1795637957.303,
"98.16666666670547"
],
[
1795637987.303,
"96.65555555560988"
],
[
1795638017.303,
"95.46666666664856"
],
[
1795638047.303,
"95.41111111110594"
],
[
1795638077.303,
"94.58888888882939"
],
[
1795638107.303,
"76.33385924758521"
],
[
1795638137.303,
"64.63333333331522"
],
[
1795638167.303,
"50.77777777779071"
]
]
}
],
"available_memory_bytes": [
{
"metric": {
"__name__": "node_memory_MemAvailable_bytes",
"instance": "node-exporter:9100",
"job": "node"
},
"values": [
[
1795637777.303,
"446656512"
],
[
1795637807.303,
"433098752"
],
[
1795637837.303,
"559407104"
],
[
1795637867.303,
"537243648"
],
[
1795637897.303,
"437555200"
],
[
1795637927.303,
"396320768"
],
[
1795637957.303,
"455864320"
],
[
1795637987.303,
"460541952"
],
[
1795638017.303,
"422821888"
],
[
1795638047.303,
"443179008"
],
[
1795638077.303,
"423858176"
],
[
1795638107.303,
"405078016"
],
[
1795638137.303,
"362545152"
],
[
1795638167.303,
"358948864"
]
]
}
]
}
}
-34
View File
@@ -1,34 +0,0 @@
{
"jenkins_url": "https://ci.myfileagent.tech/job/final-project-fixture/1/",
"actions_run": 38,
"manifest": {
"attempt": "1",
"jenkins_build": "1",
"mode": "fixture",
"payload_sha256": {
"README.txt": "0a7793faeee8ddc7d1fee883e85195eb08f767b09dc32d9c0be33cb316365f98",
"report-1.0.2.pdf": "f41138043a3b7d928bb9d6701a9ce8fd76c58c30b93a198fe4dae4fabd659b1b",
"review.json": "e56cc2bc964314e35e8917b972b13628b4e83d61b758bf179e7d42ee29a7dc6d",
"reviewed.py": "b80792336156c7b0f7fe02eeef24610d2d52a10d1810397744471d1dc5738180"
},
"run_id": "38",
"schema_version": 1,
"source_commit": "0e7ade75b99e18a24db1e7c78f6f442256be2e0f",
"version": "1.0.2"
},
"zip_sha256": "64173b7bd460cf4ff392ec0cc051865220a242d12e779f929e63a57606013794",
"payload_hashes": "pass",
"fresh_runtime_smoke": "pass",
"jenkins_result": "SUCCESS",
"test_counts": {
"pipeline": 18,
"existing": 2
},
"pdf_check": {
"release_identity": "pass",
"generated_review_appendix": "pass",
"reviewed_code": "pass after removing PDF extraction whitespace",
"review_diff": "present"
},
"console_log_sha256": "e429970e610fc3e259d11df7e8800d821374d28f264458e8828b1cbcd15c14f4"
}
Binary file not shown.
-14
View File
@@ -1,14 +0,0 @@
{
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"artifacts": [
{
"fileName": "actions-run.json",
"relativePath": "out/actions-run.json"
}
],
"building": false,
"duration": 41740,
"number": 2,
"result": "FAILURE",
"timestamp": 1795711715474
}
Binary file not shown.
-36
View File
@@ -1,36 +0,0 @@
{
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"artifacts": [
{
"fileName": "actions-run.json",
"relativePath": "out/actions-run.json"
},
{
"fileName": "release.json",
"relativePath": "out/collected/release/release.json"
},
{
"fileName": "ssw590-fixture-1.0.2.zip",
"relativePath": "out/collected/release/ssw590-fixture-1.0.2.zip"
},
{
"fileName": "ssw590-fixture-1.0.2.zip.sha256",
"relativePath": "out/collected/release/ssw590-fixture-1.0.2.zip.sha256"
},
{
"fileName": "test-result.json",
"relativePath": "out/collected/test-result.json"
},
{
"fileName": "verified.json",
"relativePath": "out/collected/verified/verified.json"
}
],
"building": false,
"duration": 195415,
"number": 3,
"result": "SUCCESS",
"timestamp": 1795711757395,
"retry_zip_sha256": "64173b7bd460cf4ff392ec0cc051865220a242d12e779f929e63a57606013794",
"byte_identical_to_build1": true
}
Binary file not shown.
-52
View File
@@ -1,52 +0,0 @@
{
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"artifacts": [
{
"fileName": "actions-run.json",
"relativePath": "out/actions-run.json"
},
{
"fileName": "release.json",
"relativePath": "out/collected/release/release.json"
},
{
"fileName": "ssw590-fixture-1.0.3.zip",
"relativePath": "out/collected/release/ssw590-fixture-1.0.3.zip"
},
{
"fileName": "ssw590-fixture-1.0.3.zip.sha256",
"relativePath": "out/collected/release/ssw590-fixture-1.0.3.zip.sha256"
},
{
"fileName": "test-result.json",
"relativePath": "out/collected/test-result.json"
},
{
"fileName": "verified.json",
"relativePath": "out/collected/verified/verified.json"
}
],
"building": false,
"duration": 167832,
"number": 4,
"result": "SUCCESS",
"timestamp": 1795711990901,
"manifest": {
"attempt": "1",
"jenkins_build": "4",
"mode": "fixture",
"payload_sha256": {
"README.txt": "3bbdaead77ac642c22c8217be9773f6dc4a97c0a02b9e0fa08b03b6a72fb6d33",
"report-1.0.3.pdf": "c6893079df21bdd444f9c09d633620d09e9bff397499bdd7c324139be6ee673a",
"review.json": "8a42691189a267cbefe1761ba2a8f872786f838bb46d525d839705f4f593ac71",
"reviewed.py": "b80792336156c7b0f7fe02eeef24610d2d52a10d1810397744471d1dc5738180"
},
"run_id": "39",
"schema_version": 1,
"source_commit": "0ec7cee5b9923e484e78046ca9adcb848423cd3e",
"version": "1.0.3"
},
"zip_sha256": "275c66b7120fb6987d5ac102ce9f38a9fe949cf0b337cef46cb1dcdfe8d65c1a",
"independent_hash_and_runtime_verification": "pass",
"download_url": "https://ci.myfileagent.tech/job/final-project-fixture/4/artifact/out/collected/release/ssw590-fixture-1.0.3.zip"
}
-70
View File
@@ -1,70 +0,0 @@
{
"observed_epoch": 1795711458,
"queries": {
"node_textfile_scrape_error": [
{
"metric": {
"__name__": "node_textfile_scrape_error",
"instance": "node-exporter:9100",
"job": "node"
},
"value": [
1795711458.653,
"0"
]
}
],
"node_scrape_collector_success{collector=\"textfile\"}": [
{
"metric": {
"__name__": "node_scrape_collector_success",
"collector": "textfile",
"instance": "node-exporter:9100",
"job": "node"
},
"value": [
1795711458.655,
"1"
]
}
],
"up{job=\"node\"}": [
{
"metric": {
"__name__": "up",
"instance": "node-exporter:9100",
"job": "node"
},
"value": [
1795711521.843,
"1"
]
}
]
},
"live_tokens_emitted": false,
"connectivity_probe": {
"query": "ssw590_collector_check",
"result": [
{
"metric": {
"__name__": "ssw590_collector_check",
"instance": "node-exporter:9100",
"job": "node"
},
"value": [
1795711663.854,
"1"
]
}
],
"removed_after_check": true
},
"grafana": {
"uid": "ssw590-final-project",
"url": "https://metrics.myfileagent.tech/d/ssw590-final-project",
"provisioned_resource_verified": true,
"panels": 6,
"availability_series": 2
}
}
-27
View File
@@ -1,27 +0,0 @@
test_concurrent_reservation (test_pipeline.PipelineTests.test_concurrent_reservation) ... ok
test_duplicate_and_symlink (test_pipeline.PipelineTests.test_duplicate_and_symlink) ... /usr/lib/python3.11/zipfile.py:1569: UserWarning: Duplicate name: 'reviewed.py'
return self._open_to_write(zinfo, force_zip64=force_zip64)
ok
test_fixture_cli_and_source_integrity (test_pipeline.PipelineTests.test_fixture_cli_and_source_integrity) ... ok
test_fixture_unchanged (test_pipeline.PipelineTests.test_fixture_unchanged) ... ok
test_fresh_output_required (test_pipeline.PipelineTests.test_fresh_output_required) ... ok
test_good_bundle_and_smoke (test_pipeline.PipelineTests.test_good_bundle_and_smoke) ... ok
test_metrics_reject_fixture (test_pipeline.PipelineTests.test_metrics_reject_fixture) ... ok
test_missing_live_counts_are_unknown (test_pipeline.PipelineTests.test_missing_live_counts_are_unknown) ... ok
test_rejected_not_bundled (test_pipeline.PipelineTests.test_rejected_not_bundled) ... ok
test_runtime_failure_reaches_smoke (test_pipeline.PipelineTests.test_runtime_failure_reaches_smoke) ... ok
test_tampered_transfer (test_pipeline.PipelineTests.test_tampered_transfer) ... ok
test_unexpected_paths (test_pipeline.PipelineTests.test_unexpected_paths) ... ok
test_version_retry_and_mode (test_pipeline.PipelineTests.test_version_retry_and_mode) ... ok
test_wrong_identity (test_pipeline.PipelineTests.test_wrong_identity) ... ok
test_existing_version_refuses_changed_review (test_release.ReleaseTests.test_existing_version_refuses_changed_review) ... ok
test_publish_and_retry_preserve_bytes (test_release.ReleaseTests.test_publish_and_retry_preserve_bytes) ... Reusing immutable release and its original build identity
ok
test_report_mismatch_prevents_release (test_release.ReleaseTests.test_report_mismatch_prevents_release) ... ok
test_runtime_failure_prevents_release (test_release.ReleaseTests.test_runtime_failure_prevents_release) ... ok
test_failed_compile_removes_stale_publish_targets (test_tex_failure.CompilerFailureTests.test_failed_compile_removes_stale_publish_targets) ... ok
----------------------------------------------------------------------
Ran 19 tests in 2.603s
OK
@@ -1,5 +0,0 @@
{
"temporary_jenkins_token": "revoked",
"revocation_verified": true,
"credential_file": "removed"
}
-334
View File
@@ -1,334 +0,0 @@
"""Exact-bundle validation and immutable release tooling; standard library only."""
import argparse
import contextlib
import fcntl
import hashlib
import io
import json
import os
from pathlib import Path
import re
import shutil
import stat
import subprocess
import sys
import tempfile
import urllib.request
import zipfile
ROOT = Path(__file__).resolve().parents[1]
BASE = 'https://myfileagent.tech'
REPO = 'myfileagent/myfileagent-pipeline'
PAYLOAD = {'reviewed.py', 'review.json'}
FILES = PAYLOAD | {'bundle.json', 'SHA256SUMS'}
MAX_BYTES = 2 * 1024 * 1024
def digest(data):
return hashlib.sha256(data).hexdigest()
def write_json(path, data):
path = Path(path)
path.parent.mkdir(parents=True, exist_ok=True)
tmp = path.with_name(path.name + '.tmp')
tmp.write_text(json.dumps(data, sort_keys=True, indent=2) + '\n', encoding='utf-8')
os.replace(tmp, path)
def identity(sha, run, attempt, mode):
if not re.fullmatch('[0-9a-f]{40}', str(sha)):
raise ValueError('Expected full lowercase SHA-1 source commit')
if any(not re.fullmatch('[1-9][0-9]*', str(x)) for x in (run, attempt)):
raise ValueError('Run ID and attempt must be positive integers')
if mode not in ('fixture', 'live'):
raise ValueError('Explicit fixture/live mode required')
return dict(schema_version=1, source_commit=sha, run_id=str(run), attempt=str(attempt), mode=mode)
def bundle_name(meta):
return f"review-{meta['run_id']}-attempt-{meta['attempt']}-{meta['source_commit']}"
def review_metadata(raw, expected):
data = json.loads(raw)
required = {'source_commit', 'model_id', 'status', 'summary', 'diff', 'input_tokens', 'output_tokens'}
if not isinstance(data, dict) or not required <= data.keys():
raise ValueError('Missing review metadata fields')
if data['source_commit'] != expected['source_commit'] or data['status'] not in ('corrected', 'unchanged'):
raise ValueError('Review identity/status does not permit a ready bundle')
if not all(isinstance(data[x], str) for x in ('summary', 'diff')):
raise ValueError('Review summary and diff must be strings')
if data.get('mode', expected['mode']) != expected['mode']:
raise ValueError('Review mode mismatch')
for key in ('input_tokens', 'output_tokens'):
value = data[key]
if value is not None and (type(value) is not int or value < 0):
raise ValueError('Invalid token count')
if data['status'] == 'corrected' and (not isinstance(data['model_id'], str) or not data['model_id']):
raise ValueError('Corrected review must identify its model')
if expected['mode'] == 'fixture' and data['model_id'] != 'fixture-model':
raise ValueError('Fixture model ID required')
if expected['mode'] == 'live' and data['model_id'] == 'fixture-model':
raise ValueError('Fixture data cannot be released in live mode')
return data
def zip_bytes(contents):
out = io.BytesIO()
with zipfile.ZipFile(out, 'w', compression=zipfile.ZIP_DEFLATED) as z:
for name, data in sorted(contents.items()):
info = zipfile.ZipInfo(name, date_time=(2020, 1, 1, 0, 0, 0))
info.compress_type = zipfile.ZIP_DEFLATED
info.external_attr = 0o100644 << 16
z.writestr(info, data)
return out.getvalue()
def create_bundle(review_dir, output, expected):
output = Path(output)
if output.exists():
raise ValueError('Refuse to overwrite a bundle')
files = {}
for name in PAYLOAD:
path = Path(review_dir) / name
if path.is_symlink() or not path.is_file() or path.stat().st_size > MAX_BYTES:
raise ValueError('Invalid review file')
files[name] = path.read_bytes()
review_metadata(files['review.json'], expected)
files['bundle.json'] = (json.dumps(expected, sort_keys=True)+'\n').encode()
files['SHA256SUMS'] = ''.join(f'{digest(files[n])} {n}\n' for n in sorted(PAYLOAD)).encode()
output.parent.mkdir(parents=True, exist_ok=True)
output.write_bytes(zip_bytes(files))
def read_bundle(path, expected):
if Path(path).stat().st_size > MAX_BYTES:
raise ValueError('Bundle exceeds size limit')
with zipfile.ZipFile(path) as z:
entries = z.infolist()
if len(entries) != len(FILES) or {i.filename for i in entries} != FILES:
raise ValueError('Unexpected, duplicate or missing bundle files')
if sum(i.file_size for i in entries) > MAX_BYTES:
raise ValueError('Expanded bundle exceeds size limit')
for i in entries:
kind = stat.S_IFMT(i.external_attr >> 16)
if kind not in (0, stat.S_IFREG) or i.flag_bits & 1:
raise ValueError('Only unencrypted regular files are allowed')
files = {i.filename: z.read(i) for i in entries}
if json.loads(files['bundle.json']) != expected:
raise ValueError('Bundle SHA/run/attempt/mode mismatch')
required = ''.join(f'{digest(files[n])} {n}\n' for n in sorted(PAYLOAD)).encode()
if files['SHA256SUMS'] != required:
raise ValueError('Payload checksum mismatch')
review_metadata(files['review.json'], expected)
return files
def verify_bundle(path, destination, expected):
files = read_bundle(path, expected)
destination = Path(destination)
destination.mkdir(parents=True, exist_ok=False)
for name, data in files.items():
(destination / name).write_bytes(data)
write_json(destination / 'verified.json', dict(**expected, bundle_sha256=digest(Path(path).read_bytes())))
return files
class SameOrigin(urllib.request.HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, headers, newurl):
from urllib.parse import urlsplit
if urlsplit(newurl).scheme != 'https' or urlsplit(newurl).netloc != 'myfileagent.tech':
raise ValueError('Refuse cross-origin artifact redirect')
return super().redirect_request(req, fp, code, msg, headers, newurl)
def fetch_bundle(output, expected):
token = os.environ.get('GITEA_TOKEN', '')
opener = urllib.request.build_opener(SameOrigin())
headers = {'Authorization': 'token '+token} if token else {}
def get(url, limit):
with opener.open(urllib.request.Request(url, headers=headers), timeout=60) as response:
raw = response.read(limit+1)
if len(raw) > limit:
raise ValueError('Response exceeds size limit')
return raw
# Server-side success is checked independently from client-supplied metadata.
run = json.loads(get(f'{BASE}/api/v1/repos/{REPO}/actions/runs/{expected["run_id"]}', MAX_BYTES))
if run.get('conclusion') != 'success' or run.get('head_sha') != expected['source_commit']:
raise ValueError('Selected Actions run is not successful on the expected SHA')
if str(run.get('run_attempt', '1')) != expected['attempt']:
raise ValueError('Actions run attempt mismatch')
name = bundle_name(expected)
raw = get(f'{BASE}/{REPO}/actions/runs/{expected["run_id"]}/artifacts/{name}', MAX_BYTES)
# upload-artifact wraps our canonical review-bundle.zip in its own ZIP.
with zipfile.ZipFile(io.BytesIO(raw)) as outer:
entries = outer.infolist()
if len(entries) != 1 or entries[0].filename != 'review-bundle.zip' or entries[0].file_size > MAX_BYTES:
raise ValueError('Unexpected Actions artifact wrapper')
content = outer.read(entries[0])
output = Path(output)
output.parent.mkdir(parents=True, exist_ok=True)
with output.open('xb') as target:
target.write(content)
read_bundle(output, expected)
return run
@contextlib.contextmanager
def locked(state):
state = Path(state)
state.mkdir(parents=True, exist_ok=True)
with (state / '.lock').open('a') as lock:
fcntl.flock(lock, fcntl.LOCK_EX)
yield state
def release_key(meta):
# Mode separates simulated and live reservations. Model/runtime must be pinned in the commit.
return f"{meta['mode']}:{meta['source_commit']}"
def reserve(state, meta, baseline='1.0'):
if not re.fullmatch(r'(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)', baseline):
raise ValueError('Baseline must be Major.Minor')
with locked(state) as state:
path = state / 'versions.json'
registry = json.loads(path.read_text()) if path.exists() else {'baseline': baseline, 'next': 1, 'reservations': {}}
if registry['baseline'] != baseline:
raise ValueError('Baseline differs from durable registry')
key = release_key(meta)
if key not in registry['reservations']:
registry['reservations'][key] = f"{baseline}.{registry['next']}"
registry['next'] += 1
write_json(path, registry)
return registry['reservations'][key]
def smoke(path):
run = subprocess.run([sys.executable, str(path)], capture_output=True, text=True, timeout=10)
if run.returncode or run.stdout != 'hello\n':
raise ValueError('Reviewed-file smoke test failed')
def test_review(verified, receipt):
root = Path(verified)
subprocess.run([sys.executable, '-m', 'py_compile', str(root / 'reviewed.py')], check=True, timeout=10)
# Adopt Member 1's smoke entry point when integrated; retain the independent assertion.
member1 = ROOT / 'tests/smoke_demo.py'
if member1.exists():
subprocess.run([sys.executable, str(member1), str(root/'reviewed.py')], check=True, timeout=20)
smoke(root / 'reviewed.py')
write_json(receipt, {'reviewed_sha256': digest((root/'reviewed.py').read_bytes()), 'result': 'passed'})
def publish(bundle, expected, pdf, state, output, baseline, jenkins_build):
files = read_bundle(bundle, expected)
version = reserve(state, expected, baseline)
pdf = Path(pdf)
from pypdf import PdfReader
reader = PdfReader(pdf)
text = '\n'.join(p.extract_text() or '' for p in reader.pages)
for value in [version, expected['source_commit']]:
if value not in text:
raise ValueError('PDF is missing release identity')
build_meta = json.loads(pdf.with_name('build-manifest.json').read_text())
if (build_meta.get('release_version') != version or build_meta.get('commit') != expected['source_commit']
or build_meta.get('review_sha256') != digest(files['review.json'])
or build_meta.get('reviewed_sha256') != digest(files['reviewed.py'])
or build_meta.get('pdf_sha256') != digest(pdf.read_bytes())
or build_meta.get('run_id') != expected['run_id'] or build_meta.get('attempt') != expected['attempt']
or build_meta.get('mode') != expected['mode']):
raise ValueError('Report manifest does not match this verified bundle')
with tempfile.TemporaryDirectory() as temp:
candidate = Path(temp)/'reviewed.py'
candidate.write_bytes(files['reviewed.py'])
smoke(candidate) # Publication cannot bypass the behavior gate.
contents = {n: files[n] for n in PAYLOAD}
contents[f'report-{version}.pdf'] = pdf.read_bytes()
contents['README.txt'] = (f'SSW590 final project {version}\nMode: {expected["mode"]}\n'
f'Source: {expected["source_commit"]}\nPython 3 required (tested by CI).\n'
'Extract into a fresh directory; run: python3 reviewed.py\nExpected stdout: hello\n'
'Compare payload SHA-256 hashes with manifest.json; compare the ZIP with its companion .sha256.\n'
'Fixture mode is simulated evidence, not a real AI review.\n').encode()
manifest = dict(**expected, version=version, jenkins_build=str(jenkins_build),
payload_sha256={n:digest(b) for n,b in sorted(contents.items())})
contents['manifest.json'] = (json.dumps(manifest, sort_keys=True, indent=2)+'\n').encode()
archive = zip_bytes(contents)
name = f'ssw590-{expected["mode"]}-{version}.zip'
with locked(state) as state:
release = state/'releases'/name
release.parent.mkdir(exist_ok=True)
if release.exists():
# A published version is immutable. A new build identity/PDF cannot silently overwrite it.
if release.read_bytes() != archive:
previous = release.read_bytes()
with zipfile.ZipFile(io.BytesIO(previous)) as z:
old_manifest = json.loads(z.read('manifest.json'))
if (old_manifest['source_commit'] != expected['source_commit']
or old_manifest['mode'] != expected['mode']
or any(z.read(n) != files[n] for n in PAYLOAD)):
raise ValueError('Version already published with different reviewed payload')
archive = previous
manifest = old_manifest
print('Reusing immutable release and its original build identity', file=sys.stderr)
else:
tmp = release.with_suffix('.tmp')
tmp.write_bytes(archive)
os.replace(tmp, release)
out = Path(output)
out.mkdir(parents=True, exist_ok=True)
(out/name).write_bytes(archive)
(out/(name+'.sha256')).write_text(f'{digest(archive)} {name}\n')
write_json(out/'release.json', manifest)
return name
def metrics(review, output, completed_at):
data = json.loads(Path(review).read_text())
if data.get('mode') != 'live' or data.get('model_id') == 'fixture-model':
raise ValueError('Only explicitly live metadata may emit live metrics')
rows = []
for key in ('input_tokens', 'output_tokens'):
value = data.get(key)
known = type(value) is int and value >= 0
rows += [f'review_{key}_available{{mode="live"}} {int(known)}']
if known:
rows += [f'review_{key}{{mode="live"}} {value}']
if not re.fullmatch('[0-9]+', str(completed_at)):
raise ValueError('Completion timestamp must be measured epoch seconds')
rows += [f'review_completed_timestamp_seconds{{mode="live"}} {completed_at}']
output = Path(output)
output.parent.mkdir(parents=True, exist_ok=True)
tmp = output.with_suffix('.tmp')
tmp.write_text('\n'.join(rows)+'\n')
os.replace(tmp, output)
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument('action', choices=['bundle','fetch','verify','reserve','test','publish','metrics'])
p.add_argument('--sha'); p.add_argument('--run-id'); p.add_argument('--attempt', default='1')
p.add_argument('--mode', choices=['fixture','live'], default='fixture')
p.add_argument('--review-dir'); p.add_argument('--bundle'); p.add_argument('--output')
p.add_argument('--state'); p.add_argument('--baseline', default='1.0'); p.add_argument('--pdf')
p.add_argument('--jenkins-build', default='local'); p.add_argument('--completed-at')
a = p.parse_args()
if a.action == 'test':
test_review(a.review_dir, a.output); return
if a.action == 'metrics':
metrics(a.review_dir+'/review.json', a.output, a.completed_at); return
meta = identity(a.sha,a.run_id,a.attempt,a.mode)
if a.action == 'bundle': create_bundle(a.review_dir,a.output,meta)
elif a.action == 'fetch': print(json.dumps(fetch_bundle(a.output,meta)))
elif a.action == 'verify': verify_bundle(a.bundle,a.output,meta)
elif a.action == 'reserve': print(reserve(a.state,meta,a.baseline))
elif a.action == 'publish': print(publish(a.bundle,meta,a.pdf,a.state,a.output,a.baseline,a.jenkins_build))
if __name__ == '__main__':
try:
main()
except Exception as exc:
print(f'Final-project gate failed: {type(exc).__name__}: {exc}', file=sys.stderr)
raise SystemExit(1)
-63
View File
@@ -1,63 +0,0 @@
"""Standalone simulated reviewer. Does not import Member 1's code."""
import argparse
import ast
import difflib
import json
from pathlib import Path
import re
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument('--input', required=True)
p.add_argument('--source-commit', required=True)
p.add_argument('--out-dir', required=True)
p.add_argument('--case', choices=['good', 'rejected', 'error', 'runtime'], default='good')
a = p.parse_args()
out = Path(a.out_dir)
try:
out.mkdir(parents=True, exist_ok=False)
except OSError:
p.exit(3, 'A fresh writable output directory is required\n')
data = dict(source_commit=a.source_commit, model_id='fixture-model', mode='fixture',
status='error', summary='', diff='', input_tokens=24, output_tokens=8)
result = 3
try:
if not re.fullmatch('[0-9a-f]{40}', a.source_commit):
raise ValueError('Full SHA required')
source = Path(a.input).read_text(encoding='utf-8')
if a.case == 'error':
raise RuntimeError('Simulated operational error')
if a.case == 'rejected':
data.update(status='rejected', summary='Simulated rejected proposal')
result = 2
else:
if a.case == 'runtime':
candidate = 'raise RuntimeError("fixture")\n'
status = 'corrected'
else:
try:
ast.parse(source)
candidate, status = source, 'unchanged'
data.update(input_tokens=None, output_tokens=None)
except SyntaxError:
if source not in ['print("hello"', 'print("hello"\n']:
data.update(status='rejected', summary='Unsupported fixture')
(out / 'review.json').write_text(json.dumps(data, indent=2)+'\n')
return 2
candidate = source.rstrip('\n') + ')' + ('\n' if source.endswith('\n') else '')
status = 'corrected'
data.update(status=status, summary=f'SIMULATED {a.case} fixture; not live AI evidence',
diff=''.join(difflib.unified_diff(source.splitlines(True), candidate.splitlines(True),
fromfile='original.py', tofile='reviewed.py')))
(out / 'reviewed.py').write_text(candidate, encoding='utf-8')
result = 0
except Exception as exc:
data['summary'] = f'Simulated fixture failure: {type(exc).__name__}'
(out / 'reviewed.py').unlink(missing_ok=True)
(out / 'review.json').write_text(json.dumps(data, indent=2)+'\n', encoding='utf-8')
return result
if __name__ == '__main__':
raise SystemExit(main())
-29
View File
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<flow-definition plugin="workflow-job">
<description>SSW590 Member 2 fixture pipeline. Simulated review, not live model evidence. Separate from the protected-main Python check.</description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition><name>SOURCE_SHA</name><description>Full SHA matching the selected Actions run and current Member 2 branch HEAD</description><defaultValue></defaultValue><trim>true</trim></hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition><name>ACTIONS_RUN_ID</name><description>Successful exact Actions run ID</description><defaultValue></defaultValue><trim>true</trim></hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition><name>ACTIONS_ATTEMPT</name><defaultValue>1</defaultValue><trim>true</trim></hudson.model.StringParameterDefinition>
<hudson.model.ChoiceParameterDefinition><name>MODE</name><choices class="java.util.Arrays$ArrayList"><a class="string-array"><string>fixture</string></a></choices></hudson.model.ChoiceParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps">
<scm class="hudson.plugins.git.GitSCM" plugin="git">
<configVersion>2</configVersion>
<userRemoteConfigs><hudson.plugins.git.UserRemoteConfig><url>https://myfileagent.tech/myfileagent/myfileagent-pipeline.git</url></hudson.plugins.git.UserRemoteConfig></userRemoteConfigs>
<branches><hudson.plugins.git.BranchSpec><name>*/feature/final-ci-demo</name></hudson.plugins.git.BranchSpec></branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="empty-list"/>
<extensions/>
</scm>
<scriptPath>Jenkinsfile.final-project</scriptPath>
<lightweight>true</lightweight>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>
-145
View File
@@ -1,145 +0,0 @@
import concurrent.futures
import io
import json
from pathlib import Path
import stat
import subprocess
import sys
import tempfile
import unittest
import zipfile
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
from ci.final_project import identity, create_bundle, read_bundle, verify_bundle, reserve, test_review, metrics, zip_bytes
SHA = 'a' * 40
META = identity(SHA, '1', '1', 'fixture')
def reserve_worker(args):
state, sha = args
return reserve(state, identity(sha, '1', '1', 'fixture'))
class PipelineTests(unittest.TestCase):
def setUp(self):
self.temp = tempfile.TemporaryDirectory()
self.addCleanup(self.temp.cleanup)
self.root = Path(self.temp.name)
self.review = self.root/'review'
self.review.mkdir()
self.review.joinpath('reviewed.py').write_text('print("hello")\n')
self.review.joinpath('review.json').write_text(json.dumps(dict(source_commit=SHA,
model_id='fixture-model', mode='fixture', status='corrected', summary='SIMULATED', diff='fixture',
input_tokens=24, output_tokens=8)))
self.bundle = self.root/'bundle.zip'
create_bundle(self.review, self.bundle, META)
def contents(self):
with zipfile.ZipFile(self.bundle) as z:
return {n:z.read(n) for n in z.namelist()}
def test_good_bundle_and_smoke(self):
out = self.root/'verified'
verify_bundle(self.bundle,out,META)
test_review(out,self.root/'tested.json')
self.assertEqual(json.loads((self.root/'tested.json').read_text())['result'],'passed')
def test_tampered_transfer(self):
files=self.contents();files['reviewed.py']=b'print("changed")\n'
self.bundle.write_bytes(zip_bytes(files))
with self.assertRaisesRegex(ValueError,'checksum'):read_bundle(self.bundle,META)
def test_wrong_identity(self):
for key,value in [('source_commit','b'*40),('run_id','2'),('attempt','2'),('mode','live')]:
with self.subTest(key=key), self.assertRaisesRegex(ValueError,'mismatch'):
read_bundle(self.bundle,{**META,key:value})
def test_unexpected_paths(self):
for name in ['../escape','/absolute','nested/file']:
files=self.contents();files[name]=b'bad'
path=self.root/'bad.zip';path.write_bytes(zip_bytes(files))
with self.subTest(name=name),self.assertRaises(ValueError):read_bundle(path,META)
def test_duplicate_and_symlink(self):
files=self.contents()
for kind in ['duplicate','symlink']:
out=io.BytesIO()
with zipfile.ZipFile(out,'w') as z:
for n,b in files.items():
info=zipfile.ZipInfo(n)
info.external_attr=((stat.S_IFLNK|0o777) if kind=='symlink' and n=='reviewed.py' else 0o100644)<<16
z.writestr(info,b)
if kind=='duplicate':z.writestr('reviewed.py',b'bad')
path=self.root/'bad.zip';path.write_bytes(out.getvalue())
with self.subTest(kind=kind),self.assertRaises(ValueError):read_bundle(path,META)
def test_fresh_output_required(self):
out=self.root/'verified';verify_bundle(self.bundle,out,META)
with self.assertRaises(FileExistsError):verify_bundle(self.bundle,out,META)
def test_rejected_not_bundled(self):
for status in ['rejected','error']:
data=json.loads((self.review/'review.json').read_text());data['status']=status
(self.review/'review.json').write_text(json.dumps(data))
with self.subTest(status=status),self.assertRaises(ValueError):create_bundle(self.review,self.root/'no.zip',META)
self.assertFalse((self.root/'no.zip').exists())
def test_runtime_failure_reaches_smoke(self):
(self.review/'reviewed.py').write_text('raise RuntimeError("fixture")\n')
path=self.root/'runtime.zip';create_bundle(self.review,path,META)
out=self.root/'runtime';verify_bundle(path,out,META)
with self.assertRaisesRegex(ValueError,'smoke'):test_review(out,self.root/'receipt.json')
self.assertFalse((self.root/'receipt.json').exists())
def test_version_retry_and_mode(self):
state=self.root/'state'
self.assertEqual(reserve(state,META),'1.0.1')
self.assertEqual(reserve(state,META),'1.0.1')
self.assertEqual(reserve(state,{**META,'mode':'live'}),'1.0.2')
with self.assertRaises(ValueError):reserve(state,META,'2.0')
def test_concurrent_reservation(self):
state=str(self.root/'state')
with concurrent.futures.ProcessPoolExecutor(max_workers=3) as pool:
same=list(pool.map(reserve_worker,[(state,SHA)]*6))
other=list(pool.map(reserve_worker,[(state,f'{i:040x}') for i in range(6)]))
self.assertEqual(len(set(same)),1)
self.assertEqual(len(set(other)),6)
self.assertNotIn(same[0],other)
def test_metrics_reject_fixture(self):
with self.assertRaises(ValueError):metrics(self.review/'review.json',self.root/'metrics.prom','123')
self.assertFalse((self.root/'metrics.prom').exists())
def test_missing_live_counts_are_unknown(self):
data=json.loads((self.review/'review.json').read_text())
data.update(mode='live',model_id='real-model',input_tokens=None,output_tokens=7)
(self.review/'review.json').write_text(json.dumps(data))
metrics(self.review/'review.json',self.root/'metrics.prom','123')
text=(self.root/'metrics.prom').read_text()
self.assertIn('review_input_tokens_available{mode="live"} 0',text)
self.assertNotIn('review_input_tokens{',text)
self.assertIn('review_output_tokens{mode="live"} 7',text)
def test_fixture_cli_and_source_integrity(self):
source=self.root/'source.py';source.write_text('print("hello"\n')
before=source.read_bytes()
for case,exit_code in [('good',0),('rejected',2),('error',3),('runtime',0)]:
out=self.root/case
run=subprocess.run([sys.executable,'ci/fixtures/reviewer_stub.py','--input',str(source),
'--source-commit',SHA,'--out-dir',str(out),'--case',case],capture_output=True)
self.assertEqual(run.returncode,exit_code,run.stderr)
self.assertEqual((out/'reviewed.py').exists(),exit_code==0)
self.assertEqual(source.read_bytes(),before)
def test_fixture_unchanged(self):
source=self.root/'valid.py';source.write_text('print("hello")\n')
out=self.root/'valid'
subprocess.run([sys.executable,'ci/fixtures/reviewer_stub.py','--input',str(source),
'--source-commit',SHA,'--out-dir',str(out)],check=True)
data=json.loads((out/'review.json').read_text())
self.assertEqual(data['status'],'unchanged');self.assertEqual(data['diff'],'')
self.assertEqual((out/'reviewed.py').read_bytes(),source.read_bytes())
if __name__=='__main__':unittest.main()
-71
View File
@@ -1,71 +0,0 @@
"""Publication gate tests run in the pinned compiler image (which provides pypdf)."""
import importlib.util
import io
import json
from pathlib import Path
import sys
import tempfile
import unittest
import zipfile
sys.path.insert(0,str(Path(__file__).resolve().parents[2]))
from ci.final_project import identity,create_bundle,publish,digest
@unittest.skipUnless(importlib.util.find_spec('pypdf'), 'pypdf is supplied by the pinned TeX image')
class ReleaseTests(unittest.TestCase):
def setUp(self):
from pypdf import PdfWriter
from pypdf.generic import DictionaryObject,NameObject,DecodedStreamObject
self.temp=tempfile.TemporaryDirectory();self.addCleanup(self.temp.cleanup)
self.root=Path(self.temp.name);self.meta=identity('a'*40,'1','1','fixture')
self.review=self.root/'review';self.review.mkdir()
(self.review/'reviewed.py').write_text('print("hello")\n')
(self.review/'review.json').write_text(json.dumps(dict(source_commit='a'*40,model_id='fixture-model',
mode='fixture',status='corrected',summary='fixture',diff='fixture',input_tokens=24,output_tokens=8)))
self.bundle=self.root/'review.zip';create_bundle(self.review,self.bundle,self.meta)
self.pdf=self.root/'main.pdf'
writer=PdfWriter();page=writer.add_blank_page(width=1200,height=800)
font=DictionaryObject({NameObject('/Type'):NameObject('/Font'),NameObject('/Subtype'):NameObject('/Type1'),NameObject('/BaseFont'):NameObject('/Helvetica')})
page[NameObject('/Resources')]=DictionaryObject({NameObject('/Font'):DictionaryObject({NameObject('/F1'):font})})
stream=DecodedStreamObject();stream.set_data(('BT /F1 10 Tf 40 700 Td (1.0.1 '+ 'a'*40+' Configuring and Running the DevOps Pipeline) Tj ET').encode())
page[NameObject('/Contents')]=writer._add_object(stream)
with self.pdf.open('wb') as f:writer.write(f)
self.manifest=dict(release_version='1.0.1',commit='a'*40,review_sha256=digest((self.review/'review.json').read_bytes()),
reviewed_sha256=digest((self.review/'reviewed.py').read_bytes()),pdf_sha256=digest(self.pdf.read_bytes()),run_id='1',attempt='1',mode='fixture')
self.write_manifest()
def write_manifest(self):
self.pdf.with_name('build-manifest.json').write_text(json.dumps(self.manifest))
def run_publish(self,build='1'):
return publish(self.bundle,self.meta,self.pdf,self.root/'state',self.root/'out','1.0',build)
def test_publish_and_retry_preserve_bytes(self):
name=self.run_publish();before=(self.root/'out'/name).read_bytes()
with zipfile.ZipFile(io.BytesIO(before)) as z:
manifest=json.loads(z.read('manifest.json'))
for path,sha in manifest['payload_sha256'].items():self.assertEqual(digest(z.read(path)),sha)
self.run_publish('2')
self.assertEqual((self.root/'out'/name).read_bytes(),before)
self.assertEqual(json.loads((self.root/'out/release.json').read_text())['jenkins_build'],'1')
def test_report_mismatch_prevents_release(self):
self.manifest['reviewed_sha256']='b'*64;self.write_manifest()
with self.assertRaisesRegex(ValueError,'manifest'):self.run_publish()
self.assertFalse((self.root/'out').exists())
self.assertFalse((self.root/'state/releases').exists())
def test_runtime_failure_prevents_release(self):
(self.review/'reviewed.py').write_text('raise RuntimeError("fixture")\n')
self.bundle.unlink();create_bundle(self.review,self.bundle,self.meta)
self.manifest['reviewed_sha256']=digest((self.review/'reviewed.py').read_bytes());self.write_manifest()
with self.assertRaisesRegex(ValueError,'smoke'):self.run_publish()
self.assertFalse((self.root/'state/releases').exists())
def test_existing_version_refuses_changed_review(self):
self.run_publish()
data=json.loads((self.review/'review.json').read_text());data['summary']='different'
(self.review/'review.json').write_text(json.dumps(data))
self.bundle.unlink();create_bundle(self.review,self.bundle,self.meta)
self.manifest['review_sha256']=digest((self.review/'review.json').read_bytes());self.write_manifest()
with self.assertRaisesRegex(ValueError,'different reviewed payload'):self.run_publish('2')
-39
View File
@@ -1,39 +0,0 @@
"""Exercise a real compiler failure without modifying the project manual."""
from pathlib import Path
import shutil
import subprocess
import sys
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[2]
@unittest.skipUnless(shutil.which('latexmk'), 'Requires the pinned TeX image')
class CompilerFailureTests(unittest.TestCase):
def test_failed_compile_removes_stale_publish_targets(self):
with tempfile.TemporaryDirectory() as temp:
root = Path(temp)
for name in ('documentation/ci/build_manual.py', 'ci/final_project.py'):
target = root / name
target.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(ROOT / name, target)
(root / 'documentation/main.tex').write_text(
'\\documentclass{article}\n\\newcommand{\\DocumentVersion}{1.0}\n'
'\\begin{document}\n\\UndefinedFinalProjectCommand\n\\end{document}\n')
def git(*args):
return subprocess.check_output(['git', '-C', str(root), *args], stderr=subprocess.DEVNULL, text=True).strip()
git('init'); git('add', '.')
git('-c', 'user.name=Fixture', '-c', 'user.email=fixture@localhost', 'commit', '-m', 'Isolated compiler failure fixture')
build = root / 'documentation/build'
build.mkdir()
for name in ('main.pdf', 'build-manifest.json'):
(build / name).write_text('stale output')
result = subprocess.run([sys.executable, str(root/'documentation/ci/build_manual.py'),
'--sha', git('rev-parse', 'HEAD'), '--run-number', '1', '--run-id', '1'],
capture_output=True, text=True, timeout=60)
self.assertNotEqual(result.returncode, 0)
self.assertIn('LaTeX compilation failed', result.stderr)
self.assertTrue((build/'main.log').is_file())
self.assertFalse((build/'main.pdf').exists())
self.assertFalse((build/'build-manifest.json').exists())
-18
View File
@@ -1,18 +0,0 @@
#!/bin/sh
# Called on the existing trusted agent. No host socket/network enters this container.
set -eu
name="ssw590-final-${BUILD_NUMBER:-local}"
image='sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1'
case "$1" in
start)
docker run -d --name "$name" --network none --memory 256m --memory-swap 256m --cpus .65 --pids-limit 256 \
--mount type=volume,src=ssw590-final-project-state,dst=/state \
--workdir /work --entrypoint sleep "$image" 3600
docker cp . "$name:/work"
docker exec "$name" git config --global --add safe.directory /work
;;
exec) shift; docker exec "$name" "$@" ;;
collect) mkdir -p out/collected; docker cp "$name:/work/out/." out/collected/ ;;
stop) docker rm -f "$name" ;;
*) echo 'Expected start, exec, collect or stop' >&2; exit 2 ;;
esac
+1 -58
View File
@@ -13,9 +13,6 @@ import re
import shutil import shutil
import subprocess import subprocess
import tempfile import tempfile
import sys
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
from ci.final_project import identity, read_bundle, digest
def build_metadata(sha, run_number, run_id, attempt): def build_metadata(sha, run_number, run_id, attempt):
@@ -67,10 +64,6 @@ def main():
parser.add_argument("--run-number", default=os.environ.get("GITEA_RUN_NUMBER", "")) parser.add_argument("--run-number", default=os.environ.get("GITEA_RUN_NUMBER", ""))
parser.add_argument("--run-id", default=os.environ.get("GITEA_RUN_ID", "")) parser.add_argument("--run-id", default=os.environ.get("GITEA_RUN_ID", ""))
parser.add_argument("--attempt", default=os.environ.get("GITEA_RUN_ATTEMPT", "1")) parser.add_argument("--attempt", default=os.environ.get("GITEA_RUN_ATTEMPT", "1"))
parser.add_argument("--review-bundle")
parser.add_argument("--release-version")
parser.add_argument("--jenkins-build", default="local")
parser.add_argument("--mode", choices=["fixture", "live"], default="fixture")
args = parser.parse_args() args = parser.parse_args()
metadata = build_metadata(args.sha, args.run_number, args.run_id, args.attempt) metadata = build_metadata(args.sha, args.run_number, args.run_id, args.attempt)
source = Path(__file__).resolve().parents[1] source = Path(__file__).resolve().parents[1]
@@ -81,19 +74,6 @@ def main():
if not version_match: if not version_match:
raise ValueError("Human-maintained document version is missing") raise ValueError("Human-maintained document version is missing")
metadata["document_version"] = version_match.group(1) metadata["document_version"] = version_match.group(1)
review_files = None
if bool(args.review_bundle) != bool(args.release_version):
raise ValueError("Review bundle and release version must be supplied together")
if args.review_bundle:
if not re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+", args.release_version):
raise ValueError("Major.Minor.Changelist required")
if not re.fullmatch(r"[A-Za-z0-9_-]{1,80}", args.jenkins_build):
raise ValueError("Invalid Jenkins build identity")
review_files = read_bundle(args.review_bundle, identity(args.sha, args.run_id, args.attempt, args.mode))
metadata.update(release_version=args.release_version, mode=args.mode,
jenkins_build=args.jenkins_build,
review_sha256=digest(review_files["review.json"]),
reviewed_sha256=digest(review_files["reviewed.py"]))
output = source / "build" output = source / "build"
output.mkdir(exist_ok=True) output.mkdir(exist_ok=True)
# Remove only this build's known publish targets, so a failed rebuild cannot # Remove only this build's known publish targets, so a failed rebuild cannot
@@ -103,44 +83,7 @@ def main():
with tempfile.TemporaryDirectory(prefix="manual-ci-") as temp: with tempfile.TemporaryDirectory(prefix="manual-ci-") as temp:
workspace = Path(temp) workspace = Path(temp)
copy_sources(source, workspace) copy_sources(source, workspace)
generated = latex_metadata(metadata) (workspace / "build-metadata.tex").write_text(latex_metadata(metadata), encoding="utf-8")
if review_files:
review = json.loads(review_files["review.json"])
def tex(value):
mapping = {"\\": r"\textbackslash{}", "{": r"\{", "}": r"\}",
"_": r"\_", "%": r"\%", "&": r"\&", "#": r"\#", "$": r"\$",
"^": r"\textasciicircum{}", "~": r"\textasciitilde{}"}
return ''.join(mapping.get(c, c) for c in str(value))
fields = {"FinalVersion": args.release_version, "FinalMode": args.mode,
"FinalJenkinsBuild": args.jenkins_build, "FinalStatus": review["status"],
"FinalModel": review["model_id"], "FinalInputTokens": review["input_tokens"],
"FinalOutputTokens": review["output_tokens"]}
generated += r"\renewcommand{\DocumentVersion}{" + args.release_version + "}\n"
generated += r"\renewcommand{\AssignmentTitle}{DevOps Pipeline Final Project}" + "\n"
generated += r"\renewcommand{\AssignmentNumber}{Final}" + "\n"
generated += r"\renewcommand{\DocumentStatus}{" + args.mode + " validation}\n"
for key, value in fields.items():
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 # Shell escape is needed by the current minted source. Run only trusted
# team source in the isolated job, with no host/Docker socket mounts. # team source in the isolated job, with no host/Docker socket mounts.
command = ["latexmk", "-pdf", "-shell-escape", "-interaction=nonstopmode", "-halt-on-error", "-file-line-error", "main.tex"] command = ["latexmk", "-pdf", "-shell-escape", "-interaction=nonstopmode", "-halt-on-error", "-file-line-error", "main.tex"]
+11
View File
@@ -0,0 +1,11 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "fixture-model",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 24,
"output_tokens": 8,
"schema_version": 1,
"mode": "fixture"
}
+1
View File
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,3 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
memory_peak=234405888
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=250000000 swap=250000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:50:52.216343Z",
"finished_at": "2026-11-27T02:50:55.608664Z",
"elapsed_seconds": 3.392288,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,11 @@
{
"prompt": "Input: print(\"hi\"\nOutput: print(\"hi\")\nInput: print(\"hello\"\nOutput:",
"raw_stdout": " print(\"hello\")\n\n\n",
"prompt_eval_tokens": 23,
"sampler_total_tokens": 28,
"output_tokens_method": "sampler_total_tokens - prompt_eval_tokens",
"runtime_log_counter_lines": [
"0.01.863.495 I common_perf_print: samplers time = 0.70 ms / 28 tokens",
"0.01.863.506 I common_perf_print: prompt eval time = 373.99 ms / 23 tokens ( 16.26 ms per token, 61.50 tokens per second)"
]
}
@@ -0,0 +1 @@
image_id=sha256:ae14d4ce8771606477a81446e7ef429edd6762305fc50c84507c1041fa8285d1 repo_digests=["python@sha256:ae14d4ce8771606477a81446e7ef429edd6762305fc50c84507c1041fa8285d1"]
@@ -0,0 +1,2 @@
f68203bfb98b1b1e8c64fac75fab10c4e36acac081609573b4df0fcc19c90dd9 /tmp/ssw590-member1-runtime/SmolLM2-135M-Instruct.Q4_0.gguf
c52fdce909b3e55b2e763e9a8b08b2b006281ebc5b5c6c8ea91e5d2075c8fd27 /tmp/ssw590-member1-runtime/llama-b12785-bin-ubuntu-x64.tar.gz
@@ -0,0 +1,16 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": null,
"status": "error",
"summary": "FileNotFoundError: review could not complete",
"diff": "",
"input_tokens": null,
"output_tokens": null,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:54:29.892888Z",
"finished_at": "2026-11-27T02:54:29.902307Z",
"elapsed_seconds": 0.009205,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"diagnostic": "FileNotFoundError: model file missing"
}
@@ -0,0 +1,3 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
memory_peak=252751872
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=400000000 swap=400000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:49:21.951797Z",
"finished_at": "2026-11-27T02:49:23.813683Z",
"elapsed_seconds": 1.861456,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,11 @@
{
"prompt": "Input: print(\"hi\"\nOutput: print(\"hi\")\nInput: print(\"hello\"\nOutput:",
"raw_stdout": " print(\"hello\")\n\n\n",
"prompt_eval_tokens": 23,
"sampler_total_tokens": 28,
"output_tokens_method": "sampler_total_tokens - prompt_eval_tokens",
"runtime_log_counter_lines": [
"0.01.206.980 I common_perf_print: samplers time = 0.30 ms / 28 tokens",
"0.01.207.091 I common_perf_print: prompt eval time = 162.90 ms / 23 tokens ( 7.08 ms per token, 141.19 tokens per second)"
]
}
@@ -0,0 +1,35 @@
Loading model...
▄▄ ▄▄
██ ██
██ ██ ▀▀█▄ ███▄███▄ ▀▀█▄ ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██ ██ ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
██ ██
▀▀ ▀▀
build : b12785-55d482814
model : /tmp/ssw590-member1-runtime/SmolLM2-135M-Instruct.Q4_0.gguf
ftype : Q4_0
modalities : text
available commands:
/exit or Ctrl+C stop or exit
/regen regenerate the last response
/clear clear the chat history
/read <file> add a text file
/glob <pattern> add text files using globbing pattern
> Repair the syntax of this Python line. Return only the corrected Python line, without markdown. Preserve the string and all behavior. Source: print("hello"
```python
def fix_s(s):
return s.replace("hello", "world")
print
Exiting...
@@ -0,0 +1,23 @@
Command being timed: "/tmp/ssw590-member1-runtime/llama-b12785/llama-cli -m /tmp/ssw590-member1-runtime/SmolLM2-135M-Instruct.Q4_0.gguf -p Repair the syntax of this Python line. Return only the corrected Python line, without markdown. Preserve the string and all behavior. Source: print("hello" -n 24 -c 256 -t 1 -tb 1 --temp 0 --seed 1 --single-turn --simple-io --no-display-prompt --no-warmup --cache-ram 0 --no-show-timings"
User time (seconds): 1.63
System time (seconds): 0.17
Percent of CPU this job got: 51%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.47
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 199624
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 103
Minor (reclaiming a frame) page faults: 26576
Voluntary context switches: 586
Involuntary context switches: 1859
Swaps: 0
File system inputs: 208248
File system outputs: 8
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
memory_peak=261754880
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=400000000 swap=400000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:47:00.387748Z",
"finished_at": "2026-11-27T02:47:08.610118Z",
"elapsed_seconds": 8.222346,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,17 @@
{
"content": " print(\"hello\")",
"timings": {
"cache_n": 0,
"prompt_n": 23,
"prompt_ms": 237.676,
"prompt_per_token_ms": 10.333739130434783,
"prompt_per_second": 96.77039330853769,
"predicted_n": 5,
"predicted_ms": 164.39,
"predicted_per_token_ms": 41.0975,
"predicted_per_second": 24.332380315104327
},
"tokens_evaluated": 23,
"tokens_predicted": 5,
"stop": true
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,9 @@
REVIEW_EXIT=0
166805504
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=250000000 swap=250000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:42:25.211366Z",
"finished_at": "2026-11-27T02:42:27.997506Z",
"elapsed_seconds": 2.786359,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,17 @@
{
"content": " print(\"hello\")",
"timings": {
"cache_n": 0,
"prompt_n": 23,
"prompt_ms": 149.368,
"prompt_per_token_ms": 6.494260869565217,
"prompt_per_second": 153.9821112955921,
"predicted_n": 5,
"predicted_ms": 94.937,
"predicted_per_token_ms": 23.73425,
"predicted_per_second": 42.13320412484069
},
"tokens_evaluated": 23,
"tokens_predicted": 5,
"stop": true
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
158756864
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=250000000 swap=250000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:42:50.812903Z",
"finished_at": "2026-11-27T02:42:53.550712Z",
"elapsed_seconds": 2.737334,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,17 @@
{
"content": " print(\"hello\")",
"timings": {
"cache_n": 0,
"prompt_n": 23,
"prompt_ms": 178.552,
"prompt_per_token_ms": 7.7631304347826084,
"prompt_per_second": 128.81401496482817,
"predicted_n": 5,
"predicted_ms": 111.208,
"predicted_per_token_ms": 27.802,
"predicted_per_second": 35.968635349974825
},
"tokens_evaluated": 23,
"tokens_predicted": 5,
"stop": true
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
124366848
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=250000000 swap=250000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:42:54.996583Z",
"finished_at": "2026-11-27T02:43:00.428698Z",
"elapsed_seconds": 5.432061,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,17 @@
{
"content": " print(\"hello\")",
"timings": {
"cache_n": 0,
"prompt_n": 23,
"prompt_ms": 628.636,
"prompt_per_token_ms": 27.331999999999997,
"prompt_per_second": 36.587150592711836,
"predicted_n": 5,
"predicted_ms": 125.677,
"predicted_per_token_ms": 31.41925,
"predicted_per_second": 31.82762160140678
},
"tokens_evaluated": 23,
"tokens_predicted": 5,
"stop": true
}
@@ -0,0 +1,3 @@
total used free shared buff/cache available
Mem: 1967 1519 74 6 546 448
Swap: 2047 1989 58
@@ -0,0 +1 @@
exit=0 oom=false limit=250000000 swap=250000000
@@ -0,0 +1,5 @@
review_input_tokens_available{mode="live"} 1
review_input_tokens{mode="live"} 23
review_output_tokens_available{mode="live"} 1
review_output_tokens{mode="live"} 5
review_completed_timestamp_seconds{mode="live"} 1795749111
@@ -0,0 +1,3 @@
print("hello")
@@ -0,0 +1,15 @@
{
"attempt": "1",
"jenkins_build": "local",
"mode": "live",
"payload_sha256": {
"README.txt": "147f950ba0b4bff5177d637af9f5922e2c4fa98d677c703f8728307c85a6ef64",
"report-1.0.1.pdf": "befd6de9a1c70ec506c7eea2267f2d936fd498b5bd84711960709686fec005b0",
"review.json": "70a73a447cda74626729377cf71c13add1427f37bc1467a0cc214dc84bc97536",
"reviewed.py": "b80792336156c7b0f7fe02eeef24610d2d52a10d1810397744471d1dc5738180"
},
"run_id": "1",
"schema_version": 1,
"source_commit": "a40ffe1982c162e5f7cfaa204bb6e0e20c37010e",
"version": "1.0.1"
}
@@ -0,0 +1,8 @@
review_exit=0
241446912
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
@@ -0,0 +1,18 @@
{
"source_commit": "a40ffe1982c162e5f7cfaa204bb6e0e20c37010e",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T03:08:24.826807Z",
"finished_at": "2026-11-27T03:08:27.187495Z",
"elapsed_seconds": 2.360665,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1,11 @@
{
"prompt": "Input: print(\"hi\"\nOutput: print(\"hi\")\nInput: print(\"hello\"\nOutput:",
"raw_stdout": " print(\"hello\")\n\n\n",
"prompt_eval_tokens": 23,
"sampler_total_tokens": 28,
"output_tokens_method": "sampler_total_tokens - prompt_eval_tokens",
"runtime_log_counter_lines": [
"0.01.607.636 I common_perf_print: samplers time = 1.02 ms / 28 tokens",
"0.01.607.649 I common_perf_print: prompt eval time = 511.47 ms / 23 tokens ( 22.24 ms per token, 44.97 tokens per second)"
]
}
@@ -0,0 +1,27 @@
{
"kind": "local integration dry run; not Gitea Actions or Jenkins",
"integration_commit": "a40ffe1982c162e5f7cfaa204bb6e0e20c37010e",
"member1_commit": "edd87d6b7fef7509e155282ff29350881c0eb9ca",
"member2_commit": "4feb58810a90baf361bfd5be7fee376d22bfcd80",
"member2_temporary_fix": "Convert failing Member 1 smoke subprocess return code to ValueError in ci/final_project.py; not committed to Member 2 branch",
"run_id": "1 (synthetic local)",
"attempt": "1",
"version": "1.0.1 (isolated state)",
"review_status": "corrected",
"input_tokens": 23,
"output_tokens": 5,
"elapsed_seconds": 2.360665,
"memory_limit_bytes": 250000000,
"memory_peak_bytes": 241446912,
"oom_kill": 0,
"unit_tests": {
"member1": 19,
"member2": 19,
"image": "sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1"
},
"pdf_pages": 170,
"zip_sha256": "995ce3ee25bf8df9ce171efa2072af2f2836f4dfb938965f819e7bf6eaec9c0a",
"zip_payload_hashes_verified": 4,
"extracted_program_stdout": "hello\\n",
"metrics_note": "Formatted locally; not scraped by Prometheus or shown in Grafana"
}
@@ -0,0 +1,4 @@
{
"result": "passed",
"reviewed_sha256": "b80792336156c7b0f7fe02eeef24610d2d52a10d1810397744471d1dc5738180"
}
@@ -0,0 +1 @@
995ce3ee25bf8df9ce171efa2072af2f2836f4dfb938965f819e7bf6eaec9c0a ssw590-live-1.0.1.zip
@@ -0,0 +1,55 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"method": "Docker cgroup v2 memory.peak after private model copy, no swap, whole reviewer and llama-completion process tree; includes tmpfs model pages and cgroup-charged file cache",
"memory_target_bytes": 250000000,
"records": [
{
"trial": 1,
"mode": "live",
"status": "corrected",
"input_tokens": 23,
"output_tokens": 5,
"elapsed_seconds": 3.848678,
"memory_peak_bytes": 236150784,
"cgroup_limit_bytes": 400000000,
"oom_kill": 0,
"model_copy": "private tmpfs within cgroup"
},
{
"trial": 2,
"mode": "live",
"status": "corrected",
"input_tokens": 23,
"output_tokens": 5,
"elapsed_seconds": 3.94148,
"memory_peak_bytes": 233103360,
"cgroup_limit_bytes": 400000000,
"oom_kill": 0,
"model_copy": "private tmpfs within cgroup"
},
{
"trial": 3,
"mode": "live",
"status": "corrected",
"input_tokens": 23,
"output_tokens": 5,
"elapsed_seconds": 1.812362,
"memory_peak_bytes": 238735360,
"cgroup_limit_bytes": 400000000,
"oom_kill": 0,
"model_copy": "private tmpfs within cgroup"
},
{
"trial": "acceptance-250m",
"mode": "live",
"status": "corrected",
"input_tokens": 23,
"output_tokens": 5,
"elapsed_seconds": 3.392288,
"memory_peak_bytes": 234405888,
"cgroup_limit_bytes": 250000000,
"oom_kill": 0,
"model_copy": "private tmpfs within cgroup"
}
]
}
@@ -0,0 +1,200 @@
{
"source": "existing local Prometheus API",
"window_start_utc": "2026-11-27T02:48:00.836093+00:00",
"window_end_utc": "2026-11-27T02:52:31.906785+00:00",
"step_seconds": 30,
"trial_intervals_utc": [
{
"started_at": "2026-11-27T02:50:00.836093Z",
"finished_at": "2026-11-27T02:50:04.684844Z"
},
{
"started_at": "2026-11-27T02:50:23.948898Z",
"finished_at": "2026-11-27T02:50:27.890688Z"
},
{
"started_at": "2026-11-27T02:50:30.094374Z",
"finished_at": "2026-11-27T02:50:31.906785Z"
}
],
"queries": {
"node_up": {
"promql": "up{job=\"node\"}",
"response": {
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"__name__": "up",
"instance": "node-exporter:9100",
"job": "node"
},
"values": [
[
1795747680.836,
"1"
],
[
1795747710.836,
"1"
],
[
1795747740.836,
"1"
],
[
1795747770.836,
"1"
],
[
1795747800.836,
"1"
],
[
1795747830.836,
"1"
],
[
1795747860.836,
"1"
],
[
1795747890.836,
"1"
],
[
1795747920.836,
"1"
],
[
1795747950.836,
"1"
]
]
}
]
}
}
},
"host_cpu_percent": {
"promql": "100 * (1 - avg by(instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[2m])))",
"response": {
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"instance": "node-exporter:9100"
},
"values": [
[
1795747680.836,
"63.90000000001035"
],
[
1795747710.836,
"72.81111111114215"
],
[
1795747740.836,
"59.322222222237755"
],
[
1795747770.836,
"58.71111111113958"
],
[
1795747800.836,
"64.36666666665892"
],
[
1795747830.836,
"75.31111111114215"
],
[
1795747860.836,
"80.19999999999224"
],
[
1795747890.836,
"65.65555555551934"
],
[
1795747920.836,
"58.57777777774673"
],
[
1795747950.836,
"52.699999999992244"
]
]
}
]
}
}
},
"host_mem_available_bytes": {
"promql": "node_memory_MemAvailable_bytes{job=\"node\"}",
"response": {
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"__name__": "node_memory_MemAvailable_bytes",
"instance": "node-exporter:9100",
"job": "node"
},
"values": [
[
1795747680.836,
"449515520"
],
[
1795747710.836,
"383606784"
],
[
1795747740.836,
"425607168"
],
[
1795747770.836,
"352559104"
],
[
1795747800.836,
"377438208"
],
[
1795747830.836,
"502824960"
],
[
1795747860.836,
"522153984"
],
[
1795747890.836,
"498524160"
],
[
1795747920.836,
"513839104"
],
[
1795747950.836,
"531513344"
]
]
}
]
}
}
}
}
}
@@ -0,0 +1,3 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
memory_peak=236150784
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=400000000 swap=400000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:50:00.836093Z",
"finished_at": "2026-11-27T02:50:04.684844Z",
"elapsed_seconds": 3.848678,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,11 @@
{
"prompt": "Input: print(\"hi\"\nOutput: print(\"hi\")\nInput: print(\"hello\"\nOutput:",
"raw_stdout": " print(\"hello\")\n\n\n",
"prompt_eval_tokens": 23,
"sampler_total_tokens": 28,
"output_tokens_method": "sampler_total_tokens - prompt_eval_tokens",
"runtime_log_counter_lines": [
"0.02.939.758 I common_perf_print: samplers time = 1.72 ms / 28 tokens",
"0.02.940.259 I common_perf_print: prompt eval time = 542.08 ms / 23 tokens ( 23.57 ms per token, 42.43 tokens per second)"
]
}
@@ -0,0 +1,3 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
memory_peak=233103360
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=400000000 swap=400000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:50:23.948898Z",
"finished_at": "2026-11-27T02:50:27.890688Z",
"elapsed_seconds": 3.94148,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,11 @@
{
"prompt": "Input: print(\"hi\"\nOutput: print(\"hi\")\nInput: print(\"hello\"\nOutput:",
"raw_stdout": " print(\"hello\")\n\n\n",
"prompt_eval_tokens": 23,
"sampler_total_tokens": 28,
"output_tokens_method": "sampler_total_tokens - prompt_eval_tokens",
"runtime_log_counter_lines": [
"0.01.649.391 I common_perf_print: samplers time = 0.46 ms / 28 tokens",
"0.01.649.465 I common_perf_print: prompt eval time = 232.25 ms / 23 tokens ( 10.10 ms per token, 99.03 tokens per second)"
]
}
@@ -0,0 +1,3 @@
print("hello")
@@ -0,0 +1,9 @@
review_exit=0
memory_peak=238735360
low 0
high 0
max 0
oom 0
oom_kill 0
oom_group_kill 0
container_exit=0 oom=false limit=400000000 swap=400000000
@@ -0,0 +1,18 @@
{
"source_commit": "5373351a7e7ac2bc0f34bae19c25383de3843ca7",
"model_id": "HuggingFaceTB/SmolLM2-135M-Instruct",
"status": "corrected",
"summary": "Added the missing closing parenthesis",
"diff": "--- original.py\n+++ reviewed.py\n@@ -1 +1 @@\n-print(\"hello\"\n+print(\"hello\")\n",
"input_tokens": 23,
"output_tokens": 5,
"schema_version": 1,
"mode": "live",
"started_at": "2026-11-27T02:50:30.094374Z",
"finished_at": "2026-11-27T02:50:31.906785Z",
"elapsed_seconds": 1.812362,
"input_sha256": "9e600e31c44a6a8f4bec8948fb5d503a40472ed6632394fdda6f1814165f4909",
"model_revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
"raw_response_file": "raw_response.txt",
"runtime_response_file": "runtime_response.json"
}
@@ -0,0 +1 @@
print("hello")
@@ -0,0 +1,11 @@
{
"prompt": "Input: print(\"hi\"\nOutput: print(\"hi\")\nInput: print(\"hello\"\nOutput:",
"raw_stdout": " print(\"hello\")\n\n\n",
"prompt_eval_tokens": 23,
"sampler_total_tokens": 28,
"output_tokens_method": "sampler_total_tokens - prompt_eval_tokens",
"runtime_log_counter_lines": [
"0.01.081.421 I common_perf_print: samplers time = 0.45 ms / 28 tokens",
"0.01.081.431 I common_perf_print: prompt eval time = 199.34 ms / 23 tokens ( 8.67 ms per token, 115.38 tokens per second)"
]
}
+35
View File
@@ -0,0 +1,35 @@
# Member 1 to Member 2 integration check
Checked against Member 2 branch `feature/final-ci-demo` at `4feb58810a90baf361bfd5be7fee376d22bfcd80` on 2026-11-27 UTC. The recorded real review under `evidence/acceptance-250m/` was passed through that branch's unmodified `ci/final_project.py` in a temporary local directory.
| Gate | Result |
| --- | --- |
| `bundle --mode live` | Passed; canonical ZIP created |
| `verify --mode live` | Passed; exact identity and hashes accepted |
| `test` | Passed; reviewed file SHA-256 `b80792336156c7b0f7fe02eeef24610d2d52a10d1810397744471d1dc5738180` |
| `metrics` | Formatted input availability 1/count 23, output availability 1/count 5 |
The compatibility run used synthetic run ID `1`, attempt `1`, and a supplied timestamp. It did not run Gitea Actions, Jenkins, Prometheus scraping, Grafana, or release publication. It must not be presented as the live end-to-end demo or monitoring evidence.
Integration points on Member 2's branch:
1. `.gitea/workflows/final-project.yml` currently invokes `ci/fixtures/reviewer_stub.py`, labels the bundle `fixture`, and triggers only on `feature/final-ci-demo` and `final-project-demo`. Replace that step in Member 2's owned workflow with `python3 -m reviewer ...` and `bundle --mode live` after merging this reviewer. The Actions runner needs the locked model, runtime, `libgomp1`, and a fresh output directory. Run the model checksum and full workload memory check there before claiming the 250,000,000-byte target for CI.
2. `Jenkinsfile.final-project` currently offers only `MODE=fixture`. Member 2 should expose `live` only after the Actions live artifact and runtime check succeed. The existing downstream validator already accepts `mode=live` and rejects fixture metadata under that mode.
3. The metrics formatter accepts our live review counts. Member 2 owns writing those metrics to the deployed collector path and verifying actual Prometheus samples and Grafana panels. Use the real completed timestamp from the Actions run, not the synthetic local value.
4. The existing `final-project-fixture` Jenkins job points at `feature/final-ci-demo`; a live run needs an integrated branch/job revision and exact SHA/run/attempt pairing. Preserve the immutable release state volume and agree the live version baseline before publishing.
No shared contract change was needed. The reviewer emits the seven required fields, `mode=live`, and measured integer token counts. Its `raw_response.txt` and `runtime_response.json` are local evidence files; Member 2's four-file bundle intentionally packages only `reviewed.py`, `review.json`, `bundle.json`, and `SHA256SUMS`.
## Combined-check finding
The Member 1 patch applied cleanly to a temporary checkout of Member 2's published branch. Member 1's 19 tests passed. Member 2's local suite initially had one error: its `test_review` invokes the now-present `tests/smoke_demo.py` with `check=True`; when that script rejects a deliberately bad reviewed file, Python raises `CalledProcessError`, while `ci/tests/test_pipeline.py::test_runtime_failure_reaches_smoke` expects `ValueError` containing `smoke`. This is an exception-type mismatch in Member 2's owned `ci/final_project.py`, not a release success. The failure still blocks publication as intended.
A temporary proof changed the invocation in `test_review` to capture the return code and raise `ValueError('Member 1 smoke test failed')` on nonzero. With that change, all 19 Member 2 local tests passed, including the smoke-failure test; five TeX/image-dependent cases were skipped outside the pinned image. Member 2 should make and commit that minimal change in their owned file before the combined branch CI run. No shared reviewer schema or exit-code change is required.
## Pinned-image real-model local dry run
An exact temporary integration commit `a40ffe1982c162e5f7cfaa204bb6e0e20c37010e` combined Member 2's `4feb5881...`, Member 1's `edd87d6...`, and the temporary smoke exception fix described above. Both 19-test suites passed in Member 2's pinned TeX image (`sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1`). The real reviewer ran in the pinned Python image under a 250,000,000-byte Docker hard cap: corrected, 23 input / 5 output tokens, 2.360665 seconds, 241,446,912-byte cgroup peak, no OOM. Its raw output and resource records are in `evidence/local-integration-dryrun/`.
The unmodified Member 2 bundle, verify, PDF build, smoke, publish and metrics commands then passed locally from a self-contained exact-SHA clone. The PDF had 170 pages. An isolated `1.0.1` local ZIP had SHA-256 `995ce3ee25bf8df9ce171efa2072af2f2836f4dfb938965f819e7bf6eaec9c0a`; its companion checksum and four payload hashes verified, and extracted `reviewed.py` printed `hello`. The ZIP, full local logs and README are under the user-facing `outputs/local-real-integration-a40ffe1/` directory on this host. The first PDF attempt failed because a Git worktree pointer was outside the container; a self-contained clone fixed the test setup.
This is a local dry run with synthetic Actions run ID `1`, `jenkins_build=local`, isolated version state, and local metric formatting. It is not a Gitea Actions/Jenkins run, deployed `1.0.1` release, or Prometheus/Grafana token evidence. Member 2's fixture `1.0.3` release remains the last reported deployed fixture result.
+36
View File
@@ -0,0 +1,36 @@
# Proposed final-project metrics and Grafana panels
**Status:** proposal only. Member 2 owns deployed `monitoring/` changes and must verify the actual scrape/collector configuration. The repository currently scrapes the `node` job every 30 seconds and Node Exporter enables only CPU, meminfo and filesystem collectors. No live review-token panel or textfile collector was deployed by Member 1.
## Ingestion contract
After exact bundle identity/hash validation, a trusted host-side step may atomically replace one `.prom` textfile under a dedicated read-only Node Exporter mount. Enable `--collector.textfile` and `--collector.textfile.directory=...` explicitly. Do not mount a writable host path into the Actions job. Retain the completed sample for at least two 30-second scrapes, then verify `up{job="node"} == 1`, `node_textfile_scrape_error == 0`, the sample timestamp and the query result. Keep source SHA/run/build links in an annotation or evidence manifest, never as metric labels.
| Metric | Type/unit | Meaning |
| --- | --- | --- |
| `review_input_tokens{mode="live"}` | gauge, tokens | Exact prompt tokens from the pinned runtime. Omit if unknown. |
| `review_output_tokens{mode="live"}` | gauge, tokens | Exact generated tokens, including any stop token counted by runtime. Omit if unknown. |
| `review_token_counts_available{mode="live"}` | gauge, 0/1 | 1 only when both counters were measured. |
| `review_duration_seconds{mode="live"}` | gauge, seconds | `review.json` elapsed time for the last completed run. |
| `review_memory_peak_bytes{mode="live"}` | gauge, bytes | Whole review cgroup `memory.peak`; omit if absent. |
| `review_memory_limit_bytes{mode="live"}` | gauge, bytes | Actual cgroup hard limit; omit if absent. |
| `review_completed_timestamp_seconds{mode="live"}` | gauge, Unix seconds | UTC completion timestamp. |
| `review_status_code{mode="live"}` | gauge, 0/2/3 | 0 success, 2 rejected, 3 operational error. |
Fixture mode is a separate label value and must be filtered out of the final live dashboard. A bypassed valid file should use `mode="bypass"` with absent token gauges and `review_token_counts_available=0`. Do not turn `null` into zero input or output tokens. If a rejected/error run has no model counts, publish availability 0 and status, not a fabricated count.
## Panels and queries
- Input tokens: `review_input_tokens{mode="live"}`.
- Output tokens: `review_output_tokens{mode="live"}`.
- Duration: `review_duration_seconds{mode="live"}`.
- Peak versus limit: `review_memory_peak_bytes{mode="live"}` and `review_memory_limit_bytes{mode="live"}`.
- Completion freshness: `time() - review_completed_timestamp_seconds{mode="live"}`.
- Host CPU: `100 * (1 - avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[2m])))`.
- Host available memory: `node_memory_MemAvailable_bytes{job="node"}`.
Set dashboard timezone to `America/New_York`; retain UTC machine timestamps. Save a fixed before/during/after time window, raw Prometheus query responses, and screenshots. Annotate review start/end and Jenkins build start/end with SHA and run links. Host CPU/memory include pricing, Zammad and all other workloads; they cannot by themselves establish model-only memory. A two-minute CPU rate smooths a short run, and completed token gauges may appear only after inference ends. No fabricated load spike or fixture count should be shown as live evidence.
## Read-only host evidence captured by Member 1
`evidence/prometheus-host-window.json` contains actual range-query responses from the existing Prometheus for **2026-11-27 02:48:00–02:52:31 UTC**, covering the three final real-model trials. At 30-second steps it recorded ten samples each: `up{job="node"}` was 1 throughout; host CPU query values ranged about 52.7–80.2%; host `MemAvailable` ranged 352,559,104–531,513,344 bytes. These are shared-host observations, not a model-only load attribution. No token metric was deployed or scraped; token evidence is in each live `review.json` and runtime response. Member 2 should capture before/during/after Grafana screenshots and the final end-to-end run window after integrating textfile metrics.
+33
View File
@@ -0,0 +1,33 @@
# Proposed report contribution: Member 1
For Member 2 to integrate into the required **“Configuring and Running the DevOps Pipeline”** chapter. This is prose and table content only; no shared LaTeX or deployed dashboard file was edited.
## Why a model is in this pipeline
The learning goal is to demonstrate measured automated review inside the team's existing Gitea Actions → Jenkins → LaTeX/tests → versioned ZIP pipeline. A deterministic parser can detect this missing parenthesis more cheaply; the local model is used to *propose* a repair. The deterministic validator then permits only adding the final `)` to `print("hello"`, checks syntax again, and runs the reviewed artifact's hello smoke test. The source commit remains unchanged. The model cannot select commands, files, credentials or release destinations. This narrow demo does not prove that the model prevents major bugs in general Python programs.
The chosen model is [SmolLM2-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct) (Apache-2.0) in a pinned third-party [Q4_0 GGUF](https://huggingface.co/QuantFactory/SmolLM2-135M-Instruct-GGUF) with [llama.cpp b12785](https://github.com/ggml-org/llama.cpp/releases/tag/b12785). Exact revisions, hashes, prompt and settings are in `reviewer/model-lock.json`. The verified raw completion was ` print("hello")` followed by whitespace; its surrounding whitespace was removed, the input's newline restored, and the exact accepted diff recorded. The runtime counters were 23 prompt and 5 generated tokens. Unknown counters remain null.
Three fresh container trials with a private GGUF copy charged to the same cgroup peaked at 236,150,784, 233,103,360 and 238,735,360 bytes, with elapsed times 3.848678, 3.941480 and 1.812362 seconds. The 250,000,000-byte cap trial peaked at 234,405,888 bytes, returned `corrected`, had no OOM kill and passed the hello smoke test. The measurement includes reviewer and model child processes and cgroup-charged cache. It is local feasibility evidence. The actual Actions execution image and shared-host Grafana window still require integration verification. Failed experiments matter: the interactive CLI produced unrelated code, and a server variant exceeded the target at 261,754,880 bytes; batch/context reduction and the completion executable were needed.
## AI reviewer SWOT (controlled one-line syntax task)
| Strengths | Weaknesses | Opportunities | Threats |
| --- | --- | --- | --- |
| Repeatable commit-linked proposal and raw-response log; measured token/time use. | Small model needed prompt constraints; output needed narrow whitespace cleanup; consumes memory. | Automate review records and compare proposals against deterministic tests. | Invalid edits, unavailable weights/runtime, prompt sensitivity, false confidence if validation is skipped. |
## Human reviewer SWOT (same task)
| Strengths | Weaknesses | Opportunities | Threats |
| --- | --- | --- | --- |
| Can infer intent and question requirements; can review broader context. | Availability and speed vary; repetitive one-character errors are easy to overlook. | Teach code-review discipline and improve fixtures and acceptance criteria. | Fatigue, inconsistent review, missed defects or overconfidence. |
These are qualitative comparisons, not measured productivity claims. A human still approves implementation scope, integration and release policy. Member 2's separate Actions/Jenkins SWOT charts address the instructor's two-tool rubric item.
## Validator and process contribution
Requirements enter as a Gitea issue; the source change is a Git commit. Actions should call the reviewer on that full SHA and publish an immutable result bundle. Jenkins must verify SHA/run/attempt and hashes before building the LaTeX PDF or executing the reviewed file. Unit tests, Python syntax parsing and the hello smoke test serve different gates. Prometheus/Grafana associate actual review counters with the same run window and show host load; host load is not proof of model-only memory. The versioned ZIP is the deployment artifact, subject to Member 2's durable version reservation and fresh-download verification.
The guide's page 5 maps the 100-point rubric to issue tracking, version control, trigger, build visibility, tests, artifact, SWOT, configuration, report and cloud execution; it also identifies reverse documentation as the explicit +5 bonus. The separate official instructor rubric was not among the files attached to this chat, so Member 2 should verify this wording against the instructor copy before final report submission.
A read-only Prometheus range query around the three final local trials recorded node exporter `up=1` in ten 30-second samples, with host CPU query values about 52.7–80.2% and host available memory 352,559,104–531,513,344 bytes. These values reflect the entire shared Droplet and the two-minute CPU rate; they are context, not proof that the model caused those changes. The raw query responses and UTC window are in `handoff/member1/evidence/prometheus-host-window.json`. The final Grafana token/host dashboard and end-to-end demo screenshots are pending Member 2's integration.
+69
View File
@@ -0,0 +1,69 @@
# Member 1 runtime contract
This is a **real** SmolLM2-135M-Instruct run. The model proposes text; the reviewer accepts only the specified one-character repair. The original source remains untouched. The only model-output cleanup is removal of surrounding spaces/tabs/newlines, followed by restoration of the source's final-newline policy. The unmodified stdout is saved as `raw_response.txt`.
## Identity and inputs
- Base model: `HuggingFaceTB/SmolLM2-135M-Instruct`, revision `12fd25f77366fa6b3b4b768ec3050bf629380bac`, Apache-2.0. [Official model card](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct).
- Third-party quantization: `QuantFactory/SmolLM2-135M-Instruct-GGUF`, revision `476854d00ede130660aba430d15f9347ad2e7d0e`, `SmolLM2-135M-Instruct.Q4_0.gguf`, 91,726,912 bytes, SHA-256 `f68203bfb98b1b1e8c64fac75fab10c4e36acac081609573b4df0fcc19c90dd9`. [Artifact repository](https://huggingface.co/QuantFactory/SmolLM2-135M-Instruct-GGUF).
- Runtime: official [llama.cpp release b12785](https://github.com/ggml-org/llama.cpp/releases/tag/b12785), source commit `55d482814bb3b985daa7bfa175c6d628fc27beac`; Ubuntu x64 archive SHA-256 `c52fdce909b3e55b2e763e9a8b08b2b006281ebc5b5c6c8ea91e5d2075c8fd27`. Entrypoint `llama-completion` on Linux amd64 CPU.
- Python 3.12+ standard library. Runtime also requires `libgomp.so.1`. The measured local setup used Ubuntu `libgomp1` version `14.2.0-4ubuntu2~24.04.1`, package SHA-256 `e8a95ec58125b4933597f30ff56c2ae10edf90f287262e366d4b6edea3019144` extracted under `/tmp`; it was not installed on the host. Member 2's execution image should include a pinned compatible `libgomp1`.
- Exact settings and prompt are in [model-lock.json](../../reviewer/model-lock.json): context 64, batch and microbatch 32, one thread, eight maximum generated tokens, temperature 0, seed 1, stop at newline.
## Setup and CLI
From the repository root, with outbound HTTPS for the two public artifacts:
```sh
python3 -m reviewer.prepare_runtime --dest /tmp/ssw590-member1-runtime
```
In an image with `libgomp1` already installed:
```sh
export REVIEWER_MODEL_PATH=/tmp/ssw590-member1-runtime/SmolLM2-135M-Instruct.Q4_0.gguf
export REVIEWER_LLAMA_COMPLETION=/tmp/ssw590-member1-runtime/llama-b12785/llama-completion
SHA=$(git rev-parse HEAD)
python3 -m reviewer --input tests/fixtures/demo_broken.py --source-commit "$SHA" --out-dir /tmp/ssw590-review-001
python3 tests/smoke_demo.py /tmp/ssw590-review-001/reviewed.py
```
Choose a **new** output directory each time. If `libgomp1` is not on the host, set `LD_LIBRARY_PATH` to a compatible extracted library directory. Do not set `REVIEWER_BACKEND_COMMAND` for a live run: that override is exclusively for deterministic fixtures and labels the output `mode=fixture`. Already-valid source runs without a model and uses `mode=bypass`.
The adapter hashes the model before inference. It runs a fixed executable and fixed arguments; it never runs model-generated commands. It parses llama.cpp's `common_perf_print` prompt-token and sampler-total counters. For b12785, output tokens are `sampler_total_tokens - prompt_eval_tokens`; the probe agreed with the server API's `predicted_n=5`. If either counter is absent, JSON count is `null`. The raw response and the counter lines are saved with each review.
## Whole-workload measurement
The measured container was `python@sha256:ae14d4ce8771606477a81446e7ef429edd6762305fc50c84507c1041fa8285d1`. It used Docker cgroup v2, `--network none`, `--cpus 1`, no swap, and the full reviewer plus its llama.cpp child. A private copy of the GGUF was placed on container tmpfs before inference so its pages were charged to the same cgroup; `memory.peak` includes cgroup-charged file cache. The three fresh-process trials used a 400,000,000-byte ceiling to reveal natural peaks; a fourth verified the 250,000,000-byte hard cap. Exact bundles and resource records are under `evidence/`.
To reproduce one strict run on this host after preparation (the following assumes the extracted `libgomp1` directory shown here):
```sh
mkdir -p /tmp/ssw590-member1-runtime/container-out
# Choose a fresh container name and /out/ directory each time.
docker run --name ssw590-member1-recheck --network none \
--memory 250000000 --memory-swap 250000000 --cpus 1 --pids-limit 64 \
--read-only --tmpfs /tmp:rw,noexec,size=128m \
--user "$(id -u):$(id -g)" \
-v "$PWD:/src:ro" -v /tmp/ssw590-member1-runtime:/runtime:ro \
-v /tmp/ssw590-member1-runtime/container-out:/out:rw -w /src \
-e PYTHONDONTWRITEBYTECODE=1 -e REVIEWER_MODEL_PATH=/tmp/model.gguf \
-e REVIEWER_LLAMA_COMPLETION=/runtime/llama-b12785/llama-completion \
-e LD_LIBRARY_PATH=/runtime/libgomp-root/usr/lib/x86_64-linux-gnu:/runtime/llama-b12785 \
python@sha256:ae14d4ce8771606477a81446e7ef429edd6762305fc50c84507c1041fa8285d1 \
sh -c 'cp /runtime/SmolLM2-135M-Instruct.Q4_0.gguf /tmp/model.gguf; python3 -m reviewer --input tests/fixtures/demo_broken.py --source-commit 5373351a7e7ac2bc0f34bae19c25383de3843ca7 --out-dir /out/recheck; result=$?; echo review_exit=$result; cat /sys/fs/cgroup/memory.peak; cat /sys/fs/cgroup/memory.events; exit $result'
docker inspect ssw590-member1-recheck --format 'exit={{.State.ExitCode}} oom={{.State.OOMKilled}} limit={{.HostConfig.Memory}} swap={{.HostConfig.MemorySwap}}'
```
`--memory-swap` equal to `--memory` disables additional swap. The command includes the temporary copy step in the cgroup; a normal production image may mount a preexisting model instead. Member 2 must repeat a memory check in the actual Actions image/runner before claiming that environment also meets the target.
## Results and limits
| Run | Natural/strict peak bytes | Elapsed seconds | Input/output tokens | Outcome |
| --- | ---: | ---: | ---: | --- |
| Trial 1, 400 MB ceiling | 236,150,784 | 3.848678 | 23 / 5 | corrected, no OOM |
| Trial 2, 400 MB ceiling | 233,103,360 | 3.941480 | 23 / 5 | corrected, no OOM |
| Trial 3, 400 MB ceiling | 238,735,360 | 1.812362 | 23 / 5 | corrected, no OOM |
| Acceptance, 250 MB cap | 234,405,888 | 3.392288 | 23 / 5 | corrected, no OOM, smoke passed |
This is measured local feasibility for the controlled fixture, not proof of arbitrary Python repair or Actions/Jenkins deployment. An initial interactive CLI returned unrelated code. A one-shot server variant peaked at 261,754,880 bytes with a private model copy under a 400 MB ceiling; a default-batch completion trial also exceeded the target. These failed experiments are retained under `evidence/experiments/`.
-3
View File
@@ -52,11 +52,8 @@ services:
- --collector.cpu - --collector.cpu
- --collector.meminfo - --collector.meminfo
- --collector.filesystem - --collector.filesystem
- --collector.textfile
- --collector.textfile.directory=/textfiles
volumes: volumes:
- /:/host:ro,rslave - /:/host:ro,rslave
- /home/codex/ssw590-final-metrics:/textfiles:ro
networks: [monitoring] networks: [monitoring]
blackbox-exporter: blackbox-exporter:
image: quay.io/prometheus/blackbox-exporter:v0.29.1 image: quay.io/prometheus/blackbox-exporter:v0.29.1
-25
View File
@@ -1,25 +0,0 @@
Final-project monitoring integration — collector and dashboard deployed; live-model connection pending
Use Member 1's measured live review metadata only. The metric adapter is:
python3 ci/final_project.py metrics --review-dir VERIFIED_LIVE_DIRECTORY \
--completed-at MEASURED_COMPLETION_EPOCH --output DIRECTORY/final-project.prom
Dedicated host directory: /home/codex/ssw590-final-metrics
Mounted readonly into Node Exporter at /textfiles.
Enable --collector.textfile and --collector.textfile.directory=/textfiles
in addition to the existing cpu, meminfo and filesystem collectors. Do not
replace the existing deployment Compose file with an unverified template.
The job's Actions container currently has no host-volume access. Use the
trusted integration step to transfer validated metrics to that host directory.
Validate with Node Exporter target health and node_textfile_scrape_error == 0.
Retain last-run gauges through at least two 30-second scrapes. Unknown counts
are omitted and explicitly represented by *_available == 0. Do not substitute
zero tokens for an unknown count. Refresh/remove stale samples intentionally.
dashboard.json is provisioned with the existing prometheus datasource. Keep existing dashboard copies
in sync where the existing monitoring deployment requires it. Add annotations
for source SHA, Actions run/attempt and Jenkins build; use a fixed window.
Fixture metrics must not populate the live panels. Shared-host CPU includes
Zammad, pricing and other services. Record baseline and after observations;
do not manufacture load or claim per-model RSS from host available memory.

Some files were not shown because too many files have changed in this diff Show More