Skip to content

Processing history: a case run log with per-stage outcomes - #54

Merged
charpy4n6 merged 1 commit into
mainfrom
feat/processing-history
Sep 10, 2026
Merged

charpy4n6 merged 1 commit into
mainfrom
feat/processing-history

Conversation

@charpy4n6

Copy link
Copy Markdown
Collaborator

What

Adds a Processing history view to the review gallery. Every case already
keeps an audit trail in the audit table (and the LAVA export dumps it), but
nothing in the UI showed it.

It is reached from the header ? Help button, which is now a small menu:

  • Manual — the existing manual dialog
  • Processing history — the new view

The view

Every run recorded against the case, newest first — ingest, process, screening,
hash-set match, carve, and examiner edits (categorize, snapshot, category
changes, …).

A process run additionally lists each post-processing stage with a ✓/✗:

stage
media processing hashes, metadata, thumbnails/keyframes, screening
known-hash match
exact stacking
visual stacking
near-duplicate clustering

RunStats gains a stages dict, and process() now wraps each of these stages
so one of them raising is recorded and the run continues, instead of
aborting the whole call and losing the record that the earlier stages
succeeded. Hover a failed pill for the exception.

The Show filter narrows the list to runs, examiner edits, or only runs with
a failed stage.

Changes

  • db.iter_audit(limit) — reads the audit table newest first
  • GET /api/audit
  • RunStats.stages + run_stage() wrapper in pipeline.process()
  • header ? Help ▾ menu (#helpMenu) in place of a plain button
  • #histDlg dialog + rendering in app.js
  • manual + in-app help updated

No schema change — iter_audit is a read helper on the existing table.

Testing

  • pytest -q — 257 passed, 3 skipped
  • tools/lint_changed.py — no new warnings
  • tools/check_line_endings.sh — clean
  • Verified in the browser and in the frozen PyInstaller build: menu → each
    entry opens the right dialog; forced a cluster_near failure and confirmed
    the run completed with cluster_near ✗ and the other four stages ✓.

🤖 Generated with Claude Code

A case already records an audit trail in the `audit` table, but nothing
surfaced it. Add a "Processing history" view, reached from the "? Help"
header button (now a menu: Manual / Processing history).

It lists every run against the case newest first — ingest, process,
screening, hash-set match, carve and examiner edits. A process run also
lists each post-processing stage (media processing, known-hash match,
exact stacking, visual stacking, near-duplicate clustering) with a
success/failure mark: `RunStats.stages` records each stage's outcome and
`process()` wraps them so one stage raising no longer aborts the run or
discards the record that the earlier ones succeeded. The "Show" filter
narrows to runs, examiner edits, or only runs with a failed stage.

- db.iter_audit(limit) reads the audit table newest first
- GET /api/audit
- no schema change (read helper on an existing table)

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@charpy4n6
charpy4n6 merged commit 85afb75 into main Sep 10, 2026
8 checks passed
@charpy4n6
charpy4n6 deleted the feat/processing-history branch September 10, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant