feat: forward row counts / status_note / ext_refs in job_update and job_close - #154
Conversation
…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.
PR Review — APPROVEAdds Nits
ContextDiff: 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
left a comment
There was a problem hiding this comment.
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.py—TestJobClosehastest_job_close_includes_all_lifecycle_fieldsbut no symmetrictest_job_close_omits_lifecycle_fields_when_not_provided.TestJobUpdatehas 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:220—ext_refs: Optional[dict]is unbound;Optional[Dict[str, Any]]is more informative (requiresfrom 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
|
✅ PR Review complete — APPROVED. Full review ↗ |
Feature Updates
job_updateandjob_closecan 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 thedatastore.processing_eventswrite-contract fix (the API/DB half lands in AiAxis); together they stop job rows from coming out with random gaps.Fixes
Resolved Incidents
Datadog
None — proactive observability enablement, not an incident fix.
GitHub
None.
References
v6.2.x) so services pinned towrenchcl~=6.2.0pick it up without a pin change.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.