* feat(playback): formalize resumable direct streams and stall observability Implements #443: strong stat-based ETag + If-Range on original-file direct play (via http.ServeContent), stream-end outcome classification in RollingDeadlineWriter (stalled_reap vs client_gone vs completed) with a structured log event and Prometheus counters, the direct_stream_resume_v1 protocol-v3 capability, and a contract doc. Progressive remux is explicitly excluded from the resume contract. Code written by OpenAI Codex CLI (gpt-5.6-sol) from a Claude-authored spec; reviewed and verified by Claude. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(playback): harden direct stream resume contract * test(playback): cover resume platform contracts --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
26 lines
399 B
Go
26 lines
399 B
Go
//go:build linux
|
|
|
|
package playback
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func directPlayFilesystemRevision(_ *os.File, info os.FileInfo) (string, bool) {
|
|
stat, ok := info.Sys().(*syscall.Stat_t)
|
|
if !ok {
|
|
return "", false
|
|
}
|
|
return fmt.Sprintf(
|
|
"linux:%x:%x:%x:%x:%x:%x",
|
|
uint64(stat.Dev),
|
|
stat.Ino,
|
|
stat.Ctim.Sec,
|
|
stat.Ctim.Nsec,
|
|
info.ModTime().UnixNano(),
|
|
info.Size(),
|
|
), true
|
|
}
|