Project archives silently replace existing assets when external paths collide
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- bun, node.js, typescript
調査の方向性
Read packages/cli/src/utils/publishProject.ts, especially localizeExternalAssets and addExternalAsset, then run the synthetic reproduction with cloud render --dry-run --json and inspect the archive. Done means existing red and blue assets retain their contents and paths, both green references point to a separate archived file, and the archive contains four files including index.html.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Packing a project can silently replace a project asset with an unrelated external asset. The published/cloud-rendered project then displays the wrong image even though the local files are unchanged and archive preparation succeeds.
This affects projects that already contain an _ext/ directory, including source unpacked from a HyperFrames project archive, and then reference another sibling asset whose localized name collides with an existing file.
Minimal reproduction
Run from a built repository checkout with Bun and Node 22+:
#!/usr/bin/env bash
set -euo pipefail
# Run from a built repository checkout. All inputs are synthetic.
proof_dir=$(mktemp -d)
mkdir -p "$proof_dir/project/_ext/shared" "$proof_dir/shared"
for pair in 'project/_ext/shared/logo.svg red' 'project/_ext/shared/logo_2.svg blue' 'shared/logo.svg green'; do
read -r name color <<< "$pair"
printf '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="%s"/></svg>' "$color" > "$proof_dir/$name"
done
cat > "$proof_dir/project/index.html" <<'HTML'
<html><body><div data-composition-id="logos" data-width="400" data-height="100" data-duration="1" data-no-timeline><img src="_ext/shared/logo.svg"><img src="_ext/shared/logo_2.svg"><img src="../shared/logo.svg"><img src="../shared/logo.svg"></div></body></html>
HTML
HYPERFRAMES_NO_UPDATE_CHECK=1 HYPERFRAMES_SKIP_SKILLS=1 DO_NOT_TRACK=1 node packages/cli/bin/hyperframes.mjs cloud render "$proof_dir/project" --dry-run --json
(cd packages/cli && bun --eval '
import { createPublishArchive } from "./src/utils/publishProject.ts";
import AdmZip from "adm-zip";
const zip = new AdmZip(createPublishArchive(process.argv[1]).buffer);
console.log("entries", zip.getEntries().map(entry => entry.entryName));
console.log("original red preserved", zip.readAsText("_ext/shared/logo.svg").includes("fill=\"red\""));
console.log("new green separately archived", zip.readAsText("_ext/shared/logo_3.svg").includes("fill=\"green\""));
console.log("HTML", zip.readAsText("index.html"));
' "$proof_dir/project")
printf 'Synthetic fixture retained at %s\n' "$proof_dir"
Steps to reproduce
- Create the synthetic project above. Its first image references an existing red logo and its third image references a different green sibling logo.
- Run the public
cloud render --dry-run --jsoncommand. It uses the same archive staging aspublishwithout uploading anything. - Inspect the resulting ZIP through
createPublishArchive, also used by publish/cloud rendering.
Expected behavior
All three distinct assets survive. The existing red and blue assets retain their paths; both green references point to a separately archived file. There should be four files including index.html.
Actual behavior
The command exits 0 and reports file_count: 3. The ZIP's _ext/shared/logo.svg contains the green asset's bytes. The first and third images both reference that key, so the original red image is silently replaced. original red preserved and new green separately archived both print false.
Environment
Main 49e0312300d6c049b19eb8435930f980621a993f, Linux arm64, Bun 1.4.4, Node v24.22.1. Reproduced with synthetic SVGs and the actual CLI dry-run. No authenticated cloud job or publish request is needed.
Additional context
localizeExternalAssets creates an empty usedArchivePaths set even though the file map already contains project files. addExternalAsset therefore treats an existing key as available and replaces it. Its existing suffix loop already handles collisions between newly localized external files; the initial staged project files need to participate too.
Searched live open/closed issues and PRs for publish overwrite, archive collision, _ext, usedArchivePaths, and archive existing, and read the related #1160/#2595/#5309/#6266 discussions. #6265's documented query/fragment omissions are a separate problem. #6687 changes OAuth endpoint selection in the same file and does not cover archive paths.
- 主要言語
- TypeScript
- スター
- 54.1k
- フォーク
- 4.9k
- 平均マージ
- 8時間 46分
- マージ済み PR(30日)
- 781
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
heygen-com/hyperframes のほかの issue
-
render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212対応中かも @miguel-heygen が今日担当しました。 オープンbug triage/needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
heygen-com/hyperframes#6830 ·
メンテナーはふだん 1 日以内に返信
-
`motionContextToDocs`: `y` track copies `opacity` when a node animates both (key lookup has no word boundary)対応中かも @Muzzy5150 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
heygen-com/hyperframes#6756 ·
メンテナーはふだん 1 日以内に返信
-
Batch rendering rejects JSON files saved with a byte order mark対応中かも @AksharP5 が 2 日前に担当しました。 オープンbug triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
heygen-com/hyperframes#6604 ·
メンテナーはふだん 1 日以内に返信
-
bug difficulty/easy triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
heygen-com/hyperframes#6481 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Timeline: show a clip's full name when its label is cut off対応中かも @DanielMcSheehy が 12 日前に担当しました。 オープンdesktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
heygen-com/hyperframes#5582 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
heygen-com/hyperframes の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
anthropics/claude-code#106183 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
core: OpenRouter BYOK sessions record cost = 0 since v2.2.0 (ignores cost_details.upstream_inference_cost)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンreproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#60558 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信