Focus demo CI on reviewed Python smoke test [skip ci]
myfileagent-python-ci/pipeline/head This commit looks good
myfileagent-python-ci/pipeline/head This commit looks good
This commit is contained in:
@@ -18,14 +18,14 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
- name: Verify source and run combined contract tests
|
||||
- name: Verify source and run reviewer and pipeline 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
|
||||
python3 -m unittest discover -s tests -v
|
||||
python3 -m unittest discover -s tests -p 'test_reviewer.py' -v
|
||||
- name: Run real model under measured 250 MB cap
|
||||
env:
|
||||
SOURCE_SHA: ${{ github.sha }}
|
||||
|
||||
@@ -54,10 +54,14 @@ RUN_NUMBER=$(python3 -c 'import json;print(json.load(open("out/actions-run.json"
|
||||
sh ci/toolchain.sh exec python3 demo/build_demo_pdf.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') {
|
||||
stage('Reviewer and pipeline unit 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 tests -p 'test_reviewer.py' -v
|
||||
sh ci/toolchain.sh exec python3 -m unittest discover -s ci/tests -v
|
||||
''' }
|
||||
}
|
||||
stage('Compile and execute model-reviewed Python') {
|
||||
steps { sh '''set -eu
|
||||
sh ci/toolchain.sh exec python3 ci/final_project.py test --review-dir out/verified --output out/test-result.json --release-version "$RELEASE_VERSION"
|
||||
''' }
|
||||
}
|
||||
|
||||
@@ -8,6 +8,13 @@ SmolLM2 model. It preserves the committed input and writes the validated repair
|
||||
to `reviewed.py` in the review bundle. Jenkins verifies that bundle, builds the
|
||||
short versioned demo PDF, tests the reviewed program, and packages the release.
|
||||
|
||||
The final-project workflow runs the reviewer and pipeline unit tests. Jenkins
|
||||
then has a separate `Compile and execute model-reviewed Python` stage: it
|
||||
compiles the verified `reviewed.py`, runs it, and requires exactly `hello` on
|
||||
standard output. The original broken `demo.py` is intentionally not executed.
|
||||
Legacy `pricing.py` tests belong to the older application and are not part of
|
||||
this syntax-review demo.
|
||||
|
||||
The dashboard's cumulative live token panels update after Jenkins verifies and
|
||||
publishes the measured review metrics. The prepared baseline uses `[skip ci]`
|
||||
so the live inference and counter change happen during the rehearsal.
|
||||
|
||||
@@ -6,6 +6,8 @@ This change prepares the existing Actions -> Jenkins -> PDF/tests -> versioned Z
|
||||
|
||||
`Jenkinsfile.final-project` now invokes `demo/build_demo_pdf.py` and `demo/demo_report.tex` instead of `documentation/ci/build_manual.py`. The existing full-manual builder remains available for separate use. The short LaTeX PDF is expected to be one page and visibly records the exact committed broken source, the raw response from the real SmolLM2 model, the accepted corrected source, and their one-character diff. It also prints the release version, full source SHA, model ID, Actions run/attempt, Jenkins build, measured tokens, elapsed time, Actions-job memory, and evidence hashes. The builder validates those values against the verified review bundle before copying `documentation/build/main.pdf` into the existing release pipeline. A saved real-review bundle from Actions run 43 produced an offline one-page preview; that preview's version 1.0.5 was a test label, not a release reservation.
|
||||
|
||||
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.
|
||||
|
||||
## 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.
|
||||
|
||||
Reference in New Issue
Block a user