mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
* fix(producer): resume checks the segment file the join reads, not the manifest's path A resumed segmented render now validates each reusable segment at its own computed path in the segment folder. It must be a plain file, not a link, and match a slice of this render's plan. The path a manifest records is never opened or probed. * fix(engine,producer): concat joins open only the list and encoder containers Both concat-demuxer joins (the engine's chunk and segment concat and the distributed assemble join) now pass a format whitelist of concat, mov and matroska. ffmpeg applies it to every file the list opens, so a listed file that is a playlist or manifest cannot pull in other files, while mp4, mov and webm joins work as before. * fix(producer): resume reuses only segments this install recorded Segment manifests are now signed with an HMAC keyed by a per-install secret kept in the HyperFrames config folder, outside every project. Resume trusts a manifest only when its signature checks out, so a segment folder copied from another machine or shipped inside a project is captured again, while a render's own interrupted run resumes as before. * docs(producer): restore the segment path ordering comment and rewrap resume docs * fix(producer): replace an empty or short resume key file A key file too short to use is now replaced by a fresh key instead of disabling resume for good. A missing key is still linked into place, so renders that create it at the same time share one key; a test runs eight processes against one path to check that. * fix(producer): warn under --resume when no resume key is available When the resume key can be neither read nor created, for example on a read-only home folder, a file system without hard links or a serverless runtime, --resume now logs one warning that every segment will be captured again instead of only reporting zero complete segments. * fix(engine): fail a concat join at a list entry ffmpeg refuses The concat demuxer ends the stream at a listed file it cannot open and ffmpeg still exits 0, which cut the output short without an error. -xerror on the concat input makes the join fail instead. mp4, mov and webm joins still exit 0. * fix(producer): resume checks each reused segment's SHA-256 Each finished segment's SHA-256 is now recorded in the signed manifest. The hash is taken once when the segment closes, and on resume only the files about to be reused are hashed again, so a file swapped for another of the same size is captured again. * docs(cli): note that resume re-checks segment hashes and recaptures older segments once * fix(studio-server): proxy joins only its own pieces, through the shared concat input Studio's chunked proxy copy now names its pieces with a tag keyed by the user's preview token, so pieces that arrive inside a project folder sit at names it never looks up and every piece is encoded fresh. A stopped copy of the user's own still continues from its finished pieces. The piece join uses concatListInputArgs, now in @hyperframes/parsers so the engine, producer and Studio share it. It allows only local files in the concat, mov or matroska formats and fails at a refused entry. The cache sweep recognizes both tagged and older piece names. * test(parsers): prove the concat protocol whitelist with a data: entry ffmpeg already refuses http:// in a concat list opened from a file, so the test passed without the whitelist. A data: entry opens by default; the test now asserts it is refused as not on the 'file' whitelist. * fix(studio-server): only the copy's own tagged pieces count as lock progress The copy lock counted any .part-<key>- file as the owner's progress, so a piece shipped with a future modified time kept a stalled lock looking active. It now counts only names under the copy's own tagged piece prefix. The cache sweep removes untagged pieces past the usual age even while that copy runs, and measures age in both directions so a future-dated piece is swept too. * fix(studio-server): say once when proxy pieces cannot be keyed to the user Without a preview token, piece names use a per-process secret, so pieces are reused only within that Studio process. Studio now logs that once, so a copy restarting from its first piece after a restart has a visible cause. * test(studio-server): name the proxy join test for what it checks * fix(producer): derive the segment manifest key from the preview token Sign segment manifests with an HMAC key derived from the per-user preview token instead of a separate key file. The token is created with an exclusive open, so concurrent renders never end up with different keys, and it is only used when the file is private to this user. Resume now checks a segment's SHA-256 before probing it, and a real-ffmpeg test documents how the concat join treats an entry that is itself an ffconcat list. * docs(producer): describe the manifest key per user and the no-token case