Skip to content

chore(upstream): adopt d94708e5 as a whole tree - #2

Merged
SanHsien merged 20 commits into
mainfrom
sync/upstream-d94708e5
Oct 12, 2026
Merged

SanHsien merged 20 commits into
mainfrom
sync/upstream-d94708e5

Conversation

@SanHsien

@SanHsien SanHsien commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

整樹採用上游 heygen-com/hyperframes 63574a7c7..d94708e5(約 837 個 commit),壓成單一 commit。兩邊沒有共同祖先,合併在本機暫時分支上以三方合併算出(基準 v0.8.35)。決策紀錄見 docs/DECISIONS.md 2026-10-07 條目。

草稿 PR:fork 先前的三處安全強化與上游重寫的程式碼衝突,合併時被取代,正在審查並補回後才會轉為可合併:遠端媒體下載的 magic-byte 驗證、上傳檔案的 0o600 權限、擷取時巢狀 <template> 的處理。

Verification

  • pwsh -NoProfile -File tools\dev_check.ps1:WINDOWS DEV CHECK GREEN
  • studio-server(render/preview/files/proxyTranscoder)vitest:合併後 5 失敗(皆為本機 symlink/備份測試,上游同樣失敗),上游 10 失敗;fork 的 Windows basename 修正讓 render 非 Latin-1 檔名測試通過。
  • cli、core 相關測試通過;tsc --noEmit 與上游相同。
  • 未跑:producer/engine/player、完整 bun run test、lint、瀏覽器測試。

🤖 Generated with Claude Code

Adopt all pending upstream work (about 837 commits) on top of the fork.
The fork history is squashed with no shared ancestry, so this was merged
through a bridge on v0.8.35 (63574a7) and squashed onto fork main.

400 generated catalog pages come from upstream; 39 other conflicts were
resolved by hand, keeping fork overlay files and the fork's CodeQL
hardening where it could coexist with upstream's rewrites. Conflict
table, kept fork deltas, dropped hardening, and verification are in
docs/DECISIONS.md (2026-10-07). Baseline reviewed_through moves to
d94708e.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SanHsien and others added 18 commits October 7, 2026 17:18
Restore the fork's assertRemoteMediaBytes in the adopted upstream freezeUrl:
downloaded bytes must match the destination extension (SVG still goes through
sanitizeSvg, .cube through cube-validate, unknown extensions fail closed).
Replace the invalid streaming fixture with valid ISO base media bytes, add
HTML-as-.png and #EXTM3U-as-.mp4 rejection tests, and delete the now
callerless freeze-publisher module and its test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Nothing imports stripFrameworkMarkup after the upstream adoption; upstream's
DOM-based filterExtractedScripts covers the same threat.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The file names an upstream maintainer as owner of the capture-check files; on
this fork it would request reviews from a person who does not maintain it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Before/After capture requirement is upstream's contributor process and
fails on every fork PR. Gate the job like the other upstream-process
workflows, list catalog-publish, canary-sunset and pr-captures in FORK.md, and
add a maintenance test that keeps the gates and the table in sync.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
….file

Upstream's fetchMediaVectors downloaded media-vectors.* from a mutable
raw.githubusercontent.com path with no timeout, size cap or pair validation,
then trusted row.file via resolve(row.file), so a tampered catalog could make
any local file the SFX result that freeze copies into the project.

- build-copy ships media-vectors.json/.bin in dist/catalog-artifact
- installMediaVectors installs from the bundled directory with the same pair
  and row validation as vectorPairAgrees, refuses absolute or .. row files,
  writes 0o600 via temp file and rename, and never fetches
- resolveBundledMediaFile accepts only relative paths that stay inside the
  bundled root; the cwd-relative candidate is gone
- resolve.mjs uses searchLocalSfxIndex; fetchMediaVectors and the
  HYPERFRAMES_REGISTRY path are removed
- tests: absolute and .. row files rejected, ranking works with fetch forbidden

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The comment claimed the suffixed path was validated at that point; the check
runs on the requested destination and suffixed names are chosen later in the
exclusive-create loop.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Append the findings, fixes and the two judged-covered items (upload mode,
frameworkMarkup) to the 2026-10-07 entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The fork's downloadTo rewrite moved writes into normalizeCloudAudio, so
existsSync, mkdirSync and writeFileSync were left unused and failed the
Preflight lint. Record the lint result and the two pre-existing CI
failures that come from upstream in DECISIONS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upstream render-order test looked for push("n") as raw text, but
the fork wraps scoped composition scripts as JSON string literals, so
the marker was not found in one mode and sorted first. Unescape quotes
before matching and require every marker to be present in both modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ll the event loop

Exclude '(' from the fragment id class so a long run of 'url(#!' with no
closing paren no longer backtracks quadratically (CodeQL js/polynomial-redos
heygen-com#156). Adds linear-time regression tests and keeps url(#a), url('#a') and
url( "#a" ) rewriting unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The default root is a predictable name under the shared tmpdir, so a local
user could pre-create it to plant cached frames or a symlinked .hf-last-gc
(CodeQL js/insecure-temporary-file heygen-com#177). assertPrivateCacheRoot creates the
root 0700 and requires a real directory, owned by the caller and closed to
group/other on POSIX. The extractor disables caching with its existing
warning when the check fails, clean skips the sweep, and the sweep marker is
written via exclusive temp file plus rename so it never follows a symlink.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ing it

Gemini response bytes were written to disk after only a RIFF header check
(CodeQL js/http-to-file-access heygen-com#180). Route them through normalizeCloudAudio
like the HeyGen path, injectable for tests, and report a transcode failure
as ok:false without leaving a raw file behind.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Nothing but its own tests called it; the catalog cache is filled by
installLocalVectors from the bundled package (CodeQL js/http-to-file-access
heygen-com#183). Removes it with its options type and timeout constant, ports the
media-vector validation tests onto installLocalVectors, and adds a test that
installLocalVectors does not touch fetch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ing it

A root left at 0755 by an older umask belongs to this user and nobody
else can write to it, so chmod it to 0700 and keep caching. Roots that
group or others can write to are still refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The animated-GIF cache sits under the same extract cache root and is
used during compile, before the frame cache's ownership check, so a root
another local user controlled could still poison or redirect it. Route
it through assertPrivateCacheRoot and disable only the GIF cache on
failure. Also format the Gemini TTS test and correct DECISIONS (heygen-com#182 is
fixed; media vectors install via installMediaVectors).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SanHsien
SanHsien marked this pull request as ready for review October 11, 2026 20:44
Copilot AI balanced review requested due to automatic review settings October 11, 2026 20:44
@SanHsien SanHsien closed this Oct 11, 2026
@SanHsien SanHsien reopened this Oct 11, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T01:53:36.010330Z 1efc522 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

../../../../skills/media-use/audio/scripts

P1 Badge 改用 Windows 可檢出的音訊來源

在 Windows 的一般 Git 設定(core.symlinks=false,或未啟用 Developer Mode)下,這個 mode 120000 項目會被檢出成只含目標文字的普通檔案,而非目錄;因此 resolve.mjs、media-fetch.test.mjs 等對 ../audio/scripts/lib/*.mjs 的匯入會以 ENOTDIR 失敗,Windows 原生開發、測試及直接執行 media-use 都會中斷。請改成建置時產生的實體副本或不依賴符號連結的共用模組配置。

AGENTS.md reference: AGENTS.md:L13-L13


"reviewed_through": "d94708e5312df021e1fdcac421f00ed3015f11bd",

P1 Badge 不要把未逐筆審查的提交標為已審查

docs/UPSTREAM.md 明載這批提交「沒有逐筆讀 diff」,卻把 reviewed_through 推進到 d94708e;之後 check_upstream_updates.py 會把整段未完成審查的歷史永久過濾掉,使排程誤報沒有待審提交。請將水位留在最後實際完成審查的提交,等逐筆判斷、記錄並驗證後再推進。

AGENTS.md reference: AGENTS.md:L52-L59


hyperframes/README.en.md

Lines 49 to 53 in 77b9b20

For Claude Code, install the versioned plugin:
```bash
claude plugin marketplace add heygen-com/hyperframes
claude plugin install hyperframes@hyperframes

P1 Badge 同步新增內容到繁中 README

這裡新增了 Claude 外掛安裝流程、更新方式及 21 個 skills 的新契約,但主要的繁中 README.md 完全未更新;以本 fork 的預設入口閱讀文件時,使用者看不到新的建議安裝方式,也無法得知 skill 數量及更新行為已改變。請把本次英文入口的產品變更同步翻入繁中主檔。

AGENTS.md reference: AGENTS.md:L44-L45


oid sha256:7cecfecfcad984b84f37c98aac469b5088cf1838ec139308a2436d2f66132bb0
size 8344

P1 Badge 移除提交中的測試輸出檔

本次 diff 更新了 77 個 packages/producer/tests/**/output/** 路徑,包括大量 PNG、MP4、MOV 與編譯後 HTML;即使媒體在 Git 中以 LFS pointer 表示,仍會新增或替換生成結果並要求保存相應 LFS 物件,讓執行測試產生的差異污染版本歷史。請只保留測試輸入及明確的固定 fixture,並把這批 render output 從提交移除。

AGENTS.md reference: AGENTS.md:L17-L18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SanHsien SanHsien closed this Oct 11, 2026
@SanHsien SanHsien reopened this Oct 11, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

!isAncestor(ADOPTION.reviewedHead, checkoutHead) ||
!isAncestor(ADOPTION.baseline, ADOPTION.reviewedHead)
) {
throw new Error("Comments adoption history does not match the reviewed PR");

P1 Badge 讓 Comments 基準接受壓縮後的候選提交

檢查此 commit 的 Comments workflow 時,reviewedHead 仍指向已被壓縮掉的 9aa1b4a...;git merge-base --is-ancestor 9aa1b4a... a589e59... 回傳 1。因此若以這個 squash commit 作為 PR #2 的新 head,.github/workflows/comments.yml 執行兩個 comment checks 時都會在此處拋出 Comments adoption history does not match the reviewed PR,而不會使用 adoption baseline。請讓例外驗證實際候選 head,否則該 workflow 無法通過。


../../../../skills/media-use/audio/scripts

P1 Badge 移除 Windows 無法可靠檢出的來源樹 symlink

在主要支援的 Windows 11 一般 clone 中,只要 core.symlinks=false 或使用者沒有建立 symlink 的權限,Git 就會把這一行檢出成普通文字檔,而非目錄;此時 src/media-use/resolve.mjs 對 ../audio/scripts/lib/heygen.mjs 的匯入會穿過一個普通檔案,導致來源 checkout 執行 hyperframes media-use 及相關測試時拋出 ERR_MODULE_NOT_FOUND。請改用建置時複製/產生的目錄或直接匯入 canonical 路徑。

AGENTS.md reference: AGENTS.md:L13-L13


version https://git-lfs.github.com/spec/v1

P1 Badge 從採用提交移除產生的測試輸出

這次 diff 共納入 77 個 packages/producer/tests/**/output/** 變更,包括新增的 speed-ramp/subcomp compiled HTML、MP4 與大量重新產生的影片和 PNG LFS 物件;這些是測試執行結果而非測試來源,會把非決定性的產物與大量 LFS churn 帶進 fork。請還原這些 output/ 變更,只保留測試來源與必要的明確期望值。

AGENTS.md reference: AGENTS.md:L18-L18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SanHsien
SanHsien merged commit cfda43f into main Oct 12, 2026
52 checks passed
@SanHsien
SanHsien deleted the sync/upstream-d94708e5 branch October 12, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants