Open feature request

laser-etch fit report is unreachable after the fact: absent from /jobs and dropped at the 1h TTL

Ray · 1mo ago

Auditing laser-etch fit quality across a large published set currently means re-submitting every STEP. Raised by the component-page parts factory, which has ~6,000 published parts and no way to answer "which of these got a bad mark?" without re-running them all.

First, a correction to the premise, because it changes where the fix goes. The fit report is not failure-only. A successful job carries it in full:

GET /jobs/<id>   ->  status: complete
  font_size_mm: 0.7381
  orientation_deg: 0
  fit: { axis, candidates, face, fit_rule, font_size_mm, frame_hint, legible_estimate,
         legible_font_floor_mm, natural_up, natural_up_evidence, orientation_deg,
         overflow_check, part_extents_mm, text_bbox_mm, text_center_mm, text_extents_mm }

Verified on production 1.3.13 (884b8f35), job 29f43c44c33b037f, /laser-etch?name=BSC016N06NS&mode=flat. orientation_deg, font_size_mm and candidates — the three fields asked for — are all already on the success path, both nested in fit and, for the first two, at the top level.

The real gap is that the report is unreachable after the fact, in two ways:

  1. It is absent from the job listing. GET /jobs returns job_id, job_type, job_name, client, status, size_mb, submitted_at, started_at, completed_at, duration_seconds, result_size, result_type, error — no fit, no font_size_mm, no orientation_deg. So there is no way to scan a run; you must fetch every job individually by id.

  2. It does not survive the TTL. JOB_TTL_SECONDS = 3600, so an hour after a job finishes its state becomes an expired tombstone carrying only client, job_type, final_status, error and a hint. The fit report is gone. Tombstones then live 7 days, so there is a window where the job is still known but its fit is not.

Together that means the report exists exactly once, in the response the caller already received, and nowhere afterwards.

What would fix it

Two changes, both small, and worth doing together:

  • Put a compact fit summary in the /jobs listing for laser-etch jobs: orientation_deg, font_size_mm, legible_estimate, and the overflow boolean. Enough to scan a run and pick out the parts worth looking at, without the full candidates array bloating every row.
  • Keep that same summary on the tombstone, so it outlives the 1-hour TTL for the tombstone's 7-day window. The full report can still go; it is the summary that makes an audit possible.

Worth saying to any caller

The per-job report is already complete on success, so the durable record belongs on the caller's side too: capture fit from the job status at publish time and store it with the part. That needs nothing from this service and covers any window, where the tombstone only covers seven days. The changes above make a past run auditable; recording at publish time is what makes an audit cheap in the first place.

0 Replies

Log in to reply.