You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let a user deliberately re-run the detection step on a file that has already been analyzed — e.g. after the pipeline's policies/labels change, after an engine/model upgrade, or when the first run failed — and get a fresh run without deleting and re-uploading the file.
Current state
It's already technically possible, just not first-class.create_pipeline_run (crates/nvisy-server/src/handler/pipeline_runs.rs) mints a new run each call for a given { pipeline, file_id }; there is no uniqueness constraint preventing multiple runs per file. Calling it again does start a new detection.
Idempotency-Key replays — a repeated key returns the existing run instead of analyzing again (lines ~87-97). So the safety valve against accidental dupes exists, but there is no explicit "re-run" intent.
Run statuses: Running, Analyzed, Completed, Failed, Cancelled (pipeline_run_status.rs). A file can therefore accumulate multiple runs over time.
So the gap is UX/semantics, not raw capability: re-running is an implicit consequence of hitting the endpoint again, not a named, intentional action, and there's no clear model for how prior runs relate to a re-run.
Proposal
Make re-analyze an explicit, discoverable action:
Endpoint/affordance — a clear "re-run detection" on a file (or on a prior run), that starts a new detection run against the chosen pipeline reusing the existing create_pipeline_run path.
Run history — treat runs as a versioned history per (file, pipeline): list prior runs, mark the latest, keep older analyses (or prune per retention). The analysis blobs already live in the intermediates bucket keyed per run.
Clarity on what's reused vs recomputed — a re-run re-detects from the source file (does NOT reuse the prior Audit), so it picks up current policies/labels and engine version.
Open questions
Trigger shape — re-run keyed off the file (pick pipeline again) or off a prior run (re-use its pipeline)? Possibly both.
Superseding — does a new run supersede the prior one (latest wins for redact), or can multiple analyzed runs coexist and the user picks which to redact from? Affects the redact lookup.
In-flight guard — block starting a re-run while a Running run for the same (file, pipeline) is in progress? (Cheap conflict check vs. allowing concurrent runs.)
Idempotency — re-run is intentionally NOT idempotent with the prior run; make sure the affordance doesn't send a stale Idempotency-Key that would replay the old run instead of starting a new one.
Cost/telemetry — re-runs re-incur detection cost; emit an activity event and surface who triggered it.
Summary
Let a user deliberately re-run the detection step on a file that has already been analyzed — e.g. after the pipeline's policies/labels change, after an engine/model upgrade, or when the first run failed — and get a fresh run without deleting and re-uploading the file.
Current state
create_pipeline_run(crates/nvisy-server/src/handler/pipeline_runs.rs) mints a new run each call for a given{ pipeline, file_id }; there is no uniqueness constraint preventing multiple runs per file. Calling it again does start a new detection.Idempotency-Keyreplays — a repeated key returns the existing run instead of analyzing again (lines ~87-97). So the safety valve against accidental dupes exists, but there is no explicit "re-run" intent.Running,Analyzed,Completed,Failed,Cancelled(pipeline_run_status.rs). A file can therefore accumulate multiple runs over time.So the gap is UX/semantics, not raw capability: re-running is an implicit consequence of hitting the endpoint again, not a named, intentional action, and there's no clear model for how prior runs relate to a re-run.
Proposal
Make re-analyze an explicit, discoverable action:
create_pipeline_runpath.Audit), so it picks up current policies/labels and engine version.Open questions
Runningrun for the same (file, pipeline) is in progress? (Cheap conflict check vs. allowing concurrent runs.)Idempotency-Keythat would replay the old run instead of starting a new one.pipeline:run.*) — a re-run should emit the same lifecycle events.Out of scope
🤖 Generated with Claude Code