Skip to content

feat: forward row counts / status_note / ext_refs in job_update and job_close - #154

Merged
Kydoimos97 merged 1 commit into
releasefrom
feature/job-lifecycle-fields
Aug 7, 2026
Merged

feat: forward row counts / status_note / ext_refs in job_update and job_close#154
Kydoimos97 merged 1 commit into
releasefrom
feature/job-lifecycle-fields

Conversation

@Kydoimos97

Copy link
Copy Markdown
Contributor

Feature Updates

  • job_update and job_close can now carry the data the jobs API already accepts. Both helpers gain four optional keyword-only parameters — input_rows, output_rows, status_note, ext_refs — sent in the request payload only when provided. Until now the client had no parameters for these, so no service using the standard helpers could record how many rows a job processed/produced, a status note, or external references on a running or closing job. This is the client half of the datastore.processing_events write-contract fix (the API/DB half lands in AiAxis); together they stop job rows from coming out with random gaps.

Fixes

  • None (purely additive; existing calls are unchanged and all four fields default to omitted).

Resolved Incidents

Datadog

None — proactive observability enablement, not an incident fix.

GitHub

None.

References

  • Pairs with AiAxis PR #3625 (processing_events targeting columns + hardening).
  • Backward compatible: new params are optional and keyword-only. Ship via a patch tag (v6.2.x) so services pinned to wrenchcl~=6.2.0 pick it up without a pin change.
  • Follow-up: per-service call-site sweep so producers actually pass row counts / progress once this version is published.

End-user impact

No direct user-facing change. Enables reliable per-job throughput and status reporting across pipeline services, which downstream powers correct job/progress UX in the app.

…te and job_close

The Wrench jobs API already accepts these fields on the update and close
endpoints, but the client helpers had no parameters for them, so no service
using the standard helpers could populate input/output row counts, a status
note, or ext_refs on a running or closing job. Add them as optional
keyword-only params, included in the payload only when provided (fire-and-forget
behavior unchanged). This is the client half of the processing_events write
contract fix.
@Kydoimos97
Kydoimos97 requested review from a team and Wrench-Review-Bot August 7, 2026 18:59
@Wrench-Review-Bot

Wrench-Review-Bot commented Aug 7, 2026

Copy link
Copy Markdown

PR Review — APPROVE

Adds input_rows, output_rows, status_note, ext_refs as optional keyword-only params to job_update() and job_close(), forwarding them to the existing API fields the server already accepts.

Nits

  • Nit: tests/test_wrench_notify.pyTestJobClose has test_job_close_includes_all_lifecycle_fields but no symmetric test_job_close_omits_lifecycle_fields_when_not_provided. TestJobUpdate has both. Not a concern given the pattern is identical and the include paths are tested, but adding the omit test would make the two classes fully parallel.
  • Nit: WrenchCL/Wrench/_notify.py:220ext_refs: Optional[dict] is unbound; Optional[Dict[str, Any]] is more informative (requires from typing import Dict, Any).

Context

Diff: 2 files, +110/−0 · Prior reviews: none · Related: AiAxis #3625 (OPEN — DB persistence half; API already accepts the new fields so this ships safely first)

— Claude

@Wrench-Review-Bot Wrench-Review-Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PR Review — APPROVE

Adds input_rows, output_rows, status_note, ext_refs as optional keyword-only params to job_update() and job_close(), forwarding them to the existing API fields the server already accepts.

Nits

  • Nit: tests/test_wrench_notify.pyTestJobClose has test_job_close_includes_all_lifecycle_fields but no symmetric test_job_close_omits_lifecycle_fields_when_not_provided. TestJobUpdate has both. Not a concern given the pattern is identical and the include paths are tested, but adding the omit test would make the two classes fully parallel.
  • Nit: WrenchCL/Wrench/_notify.py:220ext_refs: Optional[dict] is unbound; Optional[Dict[str, Any]] is more informative (requires from typing import Dict, Any).

Context

Diff: 2 files, +110/−0 · Prior reviews: none · Related: AiAxis #3625 (OPEN — DB persistence half; API already accepts the new fields so this ships safely first)

— Claude

@Wrench-Service-Bot Wrench-Service-Bot added lifecycle: 4-ready [4] Approved and ready to merge type: feature New feature or capability labels Aug 7, 2026
@Wrench-Review-Bot

Copy link
Copy Markdown

PR Review complete — APPROVED. Full review ↗

@Kydoimos97
Kydoimos97 merged commit 4edf561 into release Aug 7, 2026
1 check passed
@Kydoimos97
Kydoimos97 deleted the feature/job-lifecycle-fields branch August 7, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle: 4-ready [4] Approved and ready to merge type: feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants