The strongest design choice here is freezing the billing input at task creation rather than trying to reconcile it afterward. Once settlement can only refund, the probed duration effectively becomes part of the task’s immutable financial state not just metadata about the video.
There’s also a broader systems lesson here: derive billing from the same authoritative input that determines execution. Otherwise you can have two different truths what the customer was charged for and what the provider actually processed. The ffprobe step closes that gap before the task becomes externally observable.
I’d treat the probe result, rounding rule, and pricing version as part of the task record as well. That makes later reconciliation deterministic even if the model pricing or media-processing behavior changes, and turns “why was this job charged 4 seconds?” into an answerable audit question rather than a debugging exercise.
The strongest design choice here is freezing the billing input at task creation rather than trying to reconcile it afterward. Once settlement can only refund, the probed duration effectively becomes part of the task’s immutable financial state not just metadata about the video.
There’s also a broader systems lesson here: derive billing from the same authoritative input that determines execution. Otherwise you can have two different truths what the customer was charged for and what the provider actually processed. The ffprobe step closes that gap before the task becomes externally observable.
I’d treat the probe result, rounding rule, and pricing version as part of the task record as well. That makes later reconciliation deterministic even if the model pricing or media-processing behavior changes, and turns “why was this job charged 4 seconds?” into an answerable audit question rather than a debugging exercise.