Show accepted model repair in Actions logs [skip ci]

This commit is contained in:
Codex Agent
2026-11-28 21:28:54 +00:00
parent 8a8efe961b
commit 25167307e8
4 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
python3 -m unittest discover -s ci/tests -v
python3 -m unittest discover -s tests -p 'test_reviewer.py' -v
- name: Run real model under measured 250 MB cap
- name: Run real model, show accepted repair and measure memory
env:
SOURCE_SHA: ${{ github.sha }}
ACTIONS_RUN_ID: ${{ github.run_id }}
+2 -1
View File
@@ -6,7 +6,7 @@ Updated 28 November 2026. This is the current documentation-preparation record f
- Shared base: `5373351a7e7ac2bc0f34bae19c25383de3843ca7`. Prepared demo branch in Gitea: `feature/final-ci-demo`; this local checkout is `feature/final-demo-refresh`.
- Preparation commit `1bb4e0a9dde2e57380bd85156ffe5ceb0896340a` added the valid demo source and short PDF/versioned live demo changes. Commit `d118a677e0a67795336e8c8fddadd7412c68806d` adjusted the memory ceiling, warning, and Grafana display. Both were pushed by the user using the interactive credential helper.
- Latest implementation commit `3ad7836e5b7e70b1c1fd95934c95748979534ab6` focuses the demo tests and separates the Jenkins reviewed-program stage. **It has not been pushed to Gitea as of this handoff.** The local `../outputs/push-ssw590-demo-refresh.sh` checks the expected tip and old remote head and asks for credentials only in the user's interactive SSH terminal; it stores none. The preparation commits contain `[skip ci]`, so the intentionally broken on-stage commit should be the next live inference event.
- Reviewer-test implementation commit `3ad7836e5b7e70b1c1fd95934c95748979534ab6` focuses the demo tests and separates the Jenkins reviewed-program stage. The subsequent handoff and Actions-log changes **have not been pushed to Gitea as of this handoff**. The local `../outputs/push-ssw590-demo-refresh.sh` checks the expected tip and old remote head and asks for credentials only in the user's interactive SSH terminal; it stores none. The preparation commits contain `[skip ci]`, so the intentionally broken on-stage commit should be the next live inference event.
- Member 1 owns `reviewer/`, `demo/`, reviewer tests and source evidence. Member 2 originally integrated the Actions, Jenkins, bundle/ZIP, version reservation, shared CI and monitoring. Subsequent demo refresh changes were made with the user's authorization and are identified below. Final LaTeX course documentation remains deferred at the user's request.
## Implemented review and live pipeline
@@ -21,6 +21,7 @@ Updated 28 November 2026. This is the current documentation-preparation record f
- `demo/` contains `demo.py`, `build_demo_pdf.py`, `demo_report.tex`, and `README.md`; all are needed. The prepared `demo/demo.py` is exactly one line, `print("hello")`, plus a newline. During the user-led demo, edit **only that file** and delete **only the final closing parenthesis**. Commit the resulting `print("hello"` to `feature/final-ci-demo`. The broken committed source is the review input, not the successful program to run.
- The final-project Actions and Jenkins unit-test commands now discover only `tests/test_reviewer.py` and `ci/tests`; unrelated legacy `tests/test_pricing.py` is excluded from this demo pipeline. `Jenkinsfile.final-project` has a separate **Compile and execute model-reviewed Python** stage. The existing `ci/final_project.py test` command compiles the verified `reviewed.py`, calls `tests/smoke_demo.py`, and independently executes `reviewed.py`, requiring exit 0 and exact `hello\n` output. Only then is `out/test-result.json` written and packaging allowed. Source details: `demo/README.md` and `handoff/member1/demo-refresh.md`.
- The Gitea Actions step **Run real model, show accepted repair and measure memory** now prints the source commit, locked model ID, measured tokens, raw model response, accepted one-character diff, and a reviewed-program smoke PASS message after the smoke check succeeds. These lines come from the real review bundle fields and the executed reviewed file; they are meant to make the fix visible in the Actions log without downloading the artifact. The bundle's `review.json` and the short Jenkins PDF remain the durable evidence. This log display has not yet been observed in a live run.
- Verification of the latest test selection: `python3 -m unittest discover -s tests -p 'test_reviewer.py' -v` passed **17/17** locally on 28 November; `git diff --check` passed before commit. The new stage layout has **not** yet been seen in live Jenkins. The previously established `ci/tests` and smoke behavior were not rerun solely for this label/selection change.
## Monitoring and memory behavior
+6
View File
@@ -52,3 +52,9 @@ data['raw_response']=(p.parent/'raw_response.txt').read_text()
data['runtime_response']=json.loads((p.parent/'runtime_response.json').read_text())
p.write_text(json.dumps(data,indent=2)+'\n')
subprocess.run([sys.executable,'tests/smoke_demo.py',str(p.parent/'reviewed.py')],check=True)
print(f'LIVE REVIEW ACCEPTED for source commit {data["source_commit"]}', flush=True)
print(f'Model: {data["model_id"]}; input tokens: {data["input_tokens"]}; output tokens: {data["output_tokens"]}', flush=True)
print(f'Raw model response: {data["raw_response"]!r}', flush=True)
print('Accepted one-character source diff:', flush=True)
print(data['diff'], end='' if data['diff'].endswith('\n') else '\n', flush=True)
print('Reviewed Python execution: PASS (stdout: hello)', flush=True)
+2
View File
@@ -8,6 +8,8 @@ This change prepares the existing Actions -> Jenkins -> PDF/tests -> versioned Z
The final-project Gitea Actions and Jenkins unit-test commands select `tests/test_reviewer.py` and `ci/tests`, so unrelated legacy `tests/test_pricing.py` no longer appears in this demo pipeline. Jenkins displays a separate `Compile and execute model-reviewed Python` stage. The existing `ci/final_project.py test` command compiles the verified `reviewed.py`, invokes `tests/smoke_demo.py`, then independently executes `reviewed.py` and requires a zero exit code and exact `hello\n` output before writing `out/test-result.json` and permitting packaging. The intentionally broken committed `demo/demo.py` is never executed as the successful artifact. This stage separation has not yet been observed in a live Jenkins run; the selected reviewer command passed 17 tests locally.
For the audience, the live Actions step now prints the raw SmolLM2 response, accepted source diff, measured token counts and reviewed-Python smoke result after successful execution. The prior run 43 log did not show the repair; its saved `review.json` and raw-response files do. The new log presentation is prepared locally and still needs a future live run.
## Version identity
Jenkins reserves a durable version before the metrics/PDF/test stages and passes `RELEASE_VERSION` to each. The short PDF text and build manifest carry it. `out/test-result.json` records it. The release archive name, `report-<version>.pdf`, `VERSION.txt`, README, `manifest.json` (`version` and `document_version`), `release.json`, and the separate downloadable PDF/checksum all carry the same version. The upstream Actions bundle and raw review are produced before Jenkins reserves a release number; they are bound to the exact source SHA, run ID, attempt, hashes, and model identity, so their original measured bytes remain intact. A retry of the same identity reuses the immutable ZIP bytes and reserved version.