Repository navigation
Job status report - #75
Merged
Merged
Conversation
Joseph-Ellaway
requested review from
mihaitodor
and
a balanced review from Copilot
November 20, 2026 16:13
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The change still has unresolved review findings, including a type-safety nit (passing an enum where a string is expected) and a moderate concern about subprocess output handling that may buffer excessively and fail on non-UTF-8 output, so it needs updates before approval.
2 open issues
What changed in this PR
Adds structured job/service status reporting by writing a status.json file into the JSON output directory so downstream consumers can reliably detect completion and surface actionable error details.
Changes:
- Introduces
StatusReporterand integrates it into the service workflow to write/removestatus.jsonon success and failure paths. - Adds consistent error typing via
ErrorLabelsand a known PISA return-code mapping for structured error reporting. - Expands documentation and test coverage for the status-reporting contract and error-code mapping; bumps version to 3.6.0.
| File | Description |
|---|---|
| uv.lock | Updates the lockfile to reflect the project version bump to 3.6.0 and associated dependency metadata. |
| tests/test_service_status.py | Adds tests validating status.json creation/removal and expected behavior across success and failure scenarios. |
| tests/models/test_validation_error_handlers.py | Adds tests asserting correctness of the known PISA error-code mapping and label behavior. |
| README.md | Documents the status.json format, lifecycle, and error type/code semantics for downstream consumers. |
| pyproject.toml | Bumps the package/project version to 3.6.0. |
| pisa_utils/run.py | Integrates status reporting into the service entrypoint to write structured status on success and exception paths. |
| pisa_utils/run_pisa.py | Updates PISA subprocess invocation and status reporting integration to better preserve failure details for reporting. |
| pisa_utils/models/validation_error_handlers.py | Introduces ErrorLabels and a KNOWN_PISA_ERROR_CODES mapping to classify and serialize structured error types. |
Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
Joseph-Ellaway
commented
Nov 20, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Writes a
status.jsonfor structured error reporting. Can be picked up by API downstream to deliver job completion and give useful information to user.