Repository navigation
Electron desktop prototype over the CLI, plus timeline, motion and test-corpus fixes - #2
Merged
Merged
Conversation
The OpenCV path kept pixels strictly above the sensitivity and dropped small contours; the pure-Python path counted pixels at or above it and boxed every changed pixel. The same recording gave different hits depending on installed packages (NFR-08, AC-11). CI never saw it because CI had no OpenCV. - One rule for both paths: changed when |delta| >= sensitivity, box around every changed pixel, ROI clipped to the frame; a parity test enforces it. - Fix the threshold test, which compared a delta of 50, not the 80 it claimed. - New `ml` extra (OpenCV + NumPy), installed in CI so the parity test runs. - Motion spec description no longer claims blur and morphological closing.
…before it starts A .dav file spanning a clock set back 2 h (Tier S S-08) parsed as one recording running 14:00 -> 12:00 at confidence 1.0; `spectra gaps` crashed on it, and so would `spectra timeline` once an offset was set. - Dahua (plugin 0.2.0): split a channel where its device time steps back or jumps forward more than 2 s, with a note on both sides; note segments that do not start on an I-frame. - New FR-55 anomaly `ends_before_start` (NF-TIME-ENDS-BEFORE-START); inverted items are excluded from the overlap check. - Gap analysis and correlation keep inverted recordings off the axis and list them; gap_report gains `not_placed`, which also covers items with no time.
…lugin - S-03 listed a surviving range of -13086 bytes: the 16 KiB overwrite runs past its 5378-byte recording. Survivors are now computed as the recording minus the overwrite (image bytes and hashes unchanged). - S-10's ambiguity test swapped in a stand-in Hikvision plugin. It now runs the shipping registry as a strict xfail (Tier S / published layout conflict). - New: S-08 split against its oracle, every oracle range is a real span of its image, and checked-in oracles match the generator.
- --json on case new/attach/custody, import image/files, identify select, parse, export clip, time set and report generate. - `identify show`: the stored identification, read-only, not audited. - `list artifacts`: stored artefacts with digests and store paths. - `gaps` lists the recordings its figures do not account for.
One screen per doc 7 §4 step: case, documents & custody, evidence, identify, parse, time model, recover, timeline, analytics, review & export, report. The app holds no forensic logic: every action runs `spectra ... --json` as a child process from a fixed argv, so each click is an audited command anyone can re-run (View > Command Log). Sandboxed renderer; loads only its own spectra-app:// UI and spectra-media:// artefacts (by digest, from the open case); every other request cancelled, no hostname resolves, no dev server. Replaces the planned PySide6 shell: docs 1, 2, 3 and 8 and CLAUDE.md §17 item 26 record the decision; ui/ becomes desktop/ (P5). CLAUDE.md §17 items 22-25 record the fixes in the preceding commits.
- requirements.txt installs spectra editable with the dev and ml extras plus a development FFmpeg (imageio-ffmpeg); versions stay in pyproject.toml. E01 support (libewf) is opt-in because its wheel does not build on Python 3.14. - README: current status, and how to run the engine and the desktop app on Windows (python.exe and npm.cmd called directly, so it works under an AllSigned execution policy) and on Linux/macOS, with fixes for the common errors. - desktop/README.md and CLAUDE.md point at requirements.txt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A working desktop prototype for SPECTRA, and fixes for four problems found while reviewing
the repo against the docs. The app covers the pre-selection demo scope (doc 8 §3.4) end to
end: new case → documents & custody → evidence → identify → parse → time model → recover →
timeline → analytics → export & play → report.
What's in it
Desktop app —
desktop/(Electron + React + TypeScript)python -m spectra.cli … --jsonas achild process, from a fixed argument list built in the main process. Each click is
therefore an audited command anyone can re-run, and the Command Log shows each one.
spectra-app://(the UI) andspectra-media://, which serves stored clipsfrom the open case by SHA-256 only;
with uncertainty and all-channel gaps; a player for the verified evidence MP4; §7
negative findings; the s. 63(4) certificate preview; live audit-chain status.
CLI (
72b5aa8)--jsonon the ten commands the app drives that lacked it.identify showandlist artifacts.Fixes
811e2aeMotion analysis gave different results depending on whether OpenCV wasinstalled.
mlextra (OpenCV + NumPy), installed in CI.b951682A clock change produced a recording that ended before it started, andspectra gapscra52de8d4Test-corpus answer files.strict xfail with the real plugins.
checked-in answer files match the generator.
Docs & setup (
64220eb,b1f33f5)requirements.txt, and README instructions to run the engine and the app, includingunder a Windows
AllSignedexecution policy.Decisions for reviewers
doc 3 §16 now records why.
ui/becomesdesktop/(P5).frame/s. A slower stream splits frame by frame, with a note on each split, rather than
getting a false time span. (P2)
findings.jsongains a new anomaly kind. This changes the P5 contract.gap_reportgainsnot_placed, whichlists every recording the gap figures don't cover.
Testing
(no pyewf wheel for Python 3.14; no real-hardware time vectors), 1 xfailed (S-10). Ruff
clean.
empty screen to the report, and a tamper check that names the altered audit record.
Native file dialogs were answered by the script. The script is not in this PR.
exporting a copy to a folder.
Known limitations
frames()doesn't stripPES headers or set frame timing. Engine gap; next up.
analytics appear disabled and labelled.
annotations carry the engine's own values.