Skip to content

Job status report - #75

Merged
Joseph-Ellaway merged 5 commits into
mainfrom
PDBE-9047-job-status-report
Nov 23, 2026
Merged

Joseph-Ellaway merged 5 commits into
mainfrom
PDBE-9047-job-status-report

Conversation

@Joseph-Ellaway

Copy link
Copy Markdown
Member

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

@Joseph-Ellaway
Joseph-Ellaway requested review from mihaitodor and a balanced review from Copilot November 20, 2026 16:13
@Joseph-Ellaway Joseph-Ellaway self-assigned this Nov 20, 2026
@Joseph-Ellaway Joseph-Ellaway added the enhancement New feature or request label Nov 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 StatusReporter and integrates it into the service workflow to write/remove status.json on success and failure paths.
  • Adds consistent error typing via ErrorLabels and 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.

Comment thread pisa_utils/run_pisa.py Resolved
Comment thread pisa_utils/run.py Resolved
Comment thread pisa_utils/run_pisa.py Resolved

@mihaitodor mihaitodor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Joseph-Ellaway
Joseph-Ellaway merged commit 651728b into main Nov 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants