Harden tracking job isolation and metric integrity#1
Draft
sudoax0n wants to merge 75 commits into
Draft
Conversation
sudoax0n
force-pushed
the
fix/critical-job-races
branch
from
July 12, 2026 21:35
cdd7151 to
08c8c1f
Compare
sudoax0n
force-pushed
the
fix/critical-job-races
branch
from
July 13, 2026 06:18
7d6eda9 to
64ce4b5
Compare
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
Hardens Flyt’s tracking pipeline against concurrent uploads, stale jobs, partial or crashed publication, uncertain process termination, disposable review state, and scientifically invalid event/metric output. The implementation lives in the canonical
server.jsandtracker.py; temporary patch automation and diagnostics are not part of the final diff.Guarantees implemented
Job isolation, upload cancellation, and process termination
SIGTERMtoSIGKILL.closeevent or an already-setexitCode/signalCodeproves child termination.kill()returning false, and childerrorevents without closure reject termination and keep the system gated.input-*uploads andrun-*workspaces left by a process crash.Transactional publication and crash recovery
Frame integrity
TRACKER_SYNCmarker is required.CAP_PROP_FRAME_COUNTis diagnostic metadata (expectedMetadataMatches) and cannot reject an otherwise complete ffmpeg-verified decode.Event, review, and metric integrity
tracking_validanddetection_count.avgProximity, event means, and Prism exports ignore invalid/nonfinite/occluded proximity observations.<runId>:<eventId>.events.json; unscoped and orphan event IDs are rejected.history/<runId>/verification.json, so current-run verdicts survive later runs and historical reloads.Regression coverage
Node utility tests
errorwithoutclose, failed termination tracking, and realSIGTERM→SIGKILLbehavior;HTTP and lifecycle integration tests
Tracker and frontend tests
CI
Permanent
Critical fixes CIpassed on clean head8611885ad49cc7a0545897df4a6e3fa6dad819e6:Review / merge notes
mainat61b9d424f777176f9aea84f4c4e04e5320cf1c18.fix/critical-job-racesat8611885ad49cc7a0545897df4a6e3fa6dad819e6.mainhas not been modified or merged.