hyperframes_version mp4 tag is always 0.0.0-dev: readEngineVersion() resolves ../../package.json and overshoots the package root
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- backend, build-system, cli
调研方向
Start with packages/engine/src/utils/renderProvenance.ts and compare its source, standalone-engine, and bundled CLI layouts, including dist/cli.js and dist/fontLocalizeCli.js. Reconcile the report with open PR #3695 before changing anything, then verify the foreign-package fallback and actual MP4 version tagging using the reproduction and ffprobe command. Done means current-head behavior is correct across the packaging matrix.
由索引模型根据 Issue 内容生成。
描述
Summary
readEngineVersion() resolves ../../package.json, which overshoots the package root in the published layout. The lookup throws MODULE_NOT_FOUND, a bare catch swallows it, and every rendered mp4 is stamped hyperframes_version = 0.0.0-dev instead of the real version.
hyperframes_renderer is stamped correctly, so the tag block looks healthy at a glance.
Affected
[email protected] (current). Present in both dist/cli.js and dist/fontLocalizeCli.js.
The code
dist/cli.js:74652
function readEngineVersion() {
try {
const version2 = createRequire(import.meta.url)("../../package.json").version;
return typeof version2 === "string" && version2.length > 0 ? version2 : UNKNOWN_VERSION;
} catch {
return UNKNOWN_VERSION; // UNKNOWN_VERSION = "0.0.0-dev"
}
}
Reproduce
mkdir /tmp/hf && cd /tmp/hf && npm pack [email protected] && tar xzf hyperframes-0.8.68.tgz
node -e '
const p = require("path");
const cli = p.resolve("package/dist/cli.js");
for (const rel of ["../../package.json", "../package.json"]) {
const r = p.normalize(p.join(p.dirname(cli), rel));
console.log(rel, "->", r, require("fs").existsSync(r) ? "EXISTS" : "MISSING");
}'
Output:
../../package.json -> /tmp/hf/package.json MISSING
../package.json -> /tmp/hf/package/package.json EXISTS
End to end: render any composition to mp4 and read the tags back.
ffprobe -v error -show_entries format_tags -of default=noprint_wrappers=1 out.mp4 | grep hyperframes
Expected hyperframes_version=0.8.68, actual hyperframes_version=0.0.0-dev.
Suggested fix
../../package.json → ../package.json at both sites.
Separately worth considering: the bare catch is why this went unnoticed. A MODULE_NOT_FOUND here means the build layout moved, which is not the same as "version unavailable" — logging it, or distinguishing it from a genuinely absent version, would surface the next occurrence rather than silently degrading to a sentinel that reads like real data.
Why it matters
The tag is the only in-band record of which engine produced a file. When it is a constant, a rendered mp4 carries no evidence of its own provenance, and a pinned version cannot be verified after the fact from the artifact — only from whatever external notes happened to be kept.
Triage follow-up — September 23, 2026
Existing implementation: #3695 (fix(engine): resolve provenance version from the owning package), which predates this report. It is open and awaiting review; please reconcile this report with that PR before starting another implementation.
Current main fa4261bee still contains the depth-specific lookup in packages/engine/src/utils/renderProvenance.ts. The reporter's correction is important: changing ../../ to ../ fixes the flat bundle but breaks the source layout.
Review scope: source, standalone engine, bundled CLI, foreign-package fallback, and actual output-version tagging. The proposed PR's tests were not rerun in this triage pass. difficulty/medium reflects the packaging/test matrix; the issue stays in triage until current-head verification and scope reconciliation are complete.
- 主要语言
- TypeScript
- 星标
- 54.1k
- 派生
- 4.9k
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 725
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
heygen-com/hyperframes 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
heygen-com/hyperframes#6157 · 2 条评论 ·
维护者通常 1 天内回复
-
format.md:66 host-id rule is ambiguous for multi-mount sub-compositions; scoped selector silently yields static frames可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
heygen-com/hyperframes#6139 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 62/100
heygen-com/hyperframes#6138 · 1 条评论 ·
维护者通常 1 天内回复
-
docs: clip window is inclusive in data-attributes.md but [start, start+duration) in router Contract 1可能已有人在做 @Mittalnew 于 2 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
heygen-com/hyperframes#6136 · 2 条评论 ·
维护者通常 1 天内回复
-
inspector: build.mjs resolves paths with URL#pathname, fails ENOENT (F:\\F:\\...) and aborts bun run build on Windows可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭triage/ready
难度 1/5 1 小时以内 新手友好度 88/100
heygen-com/hyperframes#5863 · 2 条评论 ·
维护者通常 1 天内回复
查看 heygen-com/hyperframes 的全部 Issue
相似的 Issue
-
a10y a10y-audit ai-driven-qa claude
难度 2/5 1-3 小时 新手友好度 86/100
linagora/twake-directory-manager#219 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
type: bug
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
0️⃣ phase/new
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Pulse v7: buildPreferencesFromTelos() bypasses telosSectionOrFile(), renders empty on unified-TELOS installs可能已有人在做 @zephyr91 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2393 ·
维护者通常 4 天内回复