[CLI] Reject non-integer tokens for distributed render flags

オープン 初心者向け
#6,889 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@pqminh27 がすでに取り組んでいます。

2026年10月31日 から。

  • #6890 @pqminh27 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
aws, cloud, docker, gcp, typescript
領域
cli

調査の方向性

フラグは Lambda と Cloud Run の CLI パスで Number.parseInt によって解析されています。そこから調べ始めて、width、height、fps、memory、concurrency、timeout、chunk size の解析に使われている共通の整数解析処理を見つけてください。それを、10進数の整数トークンのみを受け入れるチェックに置き換えてください。既存の正の値と FPS のチェック、および省略されたフラグのデフォルト値はそのまま維持します。--width=1920.5 と --fps=24.5 が不正な整数というメッセージで拒否され、有効な値は引き続き通ることが完了条件です。

索引モデルが issue の本文から書いたものです。

説明

area/tool bug difficulty/easy
Describe the bug

The Lambda and Cloud Run CLI paths use Number.parseInt for integer-valued flags. This accepts a numeric prefix and silently truncates the rest: for example, 1920.5 becomes 1920, and 24.5 becomes 24. A render can therefore use dimensions or an FPS different from what the caller supplied instead of rejecting malformed input.

Minimal reproduction

The latest published CLI reports v0.8.223 as current (npx --yes [email protected] hyperframes upgrade --check). In an isolated test setup, run:

npx --yes [email protected] hyperframes cloudrun render /tmp --width=1920.5 --height=1080 --fps=24.5
Steps to reproduce
  1. Use the latest Hyperframes CLI; the upgrade check above reports Already up to date for v0.8.223.
  2. Run the Cloud Run command above in a test environment. Do not use a production stack for this check.
  3. Observe that it does not report an invalid integer for either flag. On my machine it continues to the optional Cloud Run adapter check; the adapter is not installed, so no render is dispatched.
Expected behavior

Reject supplied integer flags unless the entire value is a base-10 integer token, then apply the existing positive-value and supported-FPS checks. Omitted optional flags should continue to use their current defaults.

Actual behavior

Number.parseInt("1920.5", 10) returns 1920, and Number.parseInt("24.5", 10) returns 24, so the CLI accepts the values and can continue with a silently altered render configuration.

Environment

Sanitized npx hyperframes doctor output (machine-specific cache paths and hardware metrics omitted):

✓ Version          0.8.223 (latest)
✓ Node.js          v25.2.1 (darwin arm64)
✗ Chrome           Chrome Headless Shell is required for local rendering.
✓ FFmpeg           ffmpeg 9.0.1
✓ FFprobe          ffprobe 9.0.1
✓ Docker           Docker version 29.6.1
✓ Docker running   Running
Additional context

The same integer-token validation should cover Lambda and Cloud Run flags, including width, height, FPS, memory, concurrency, timeout, and chunk sizing. Empty optional values should remain equivalent to an omitted flag where the CLI parser can produce them.

主要言語
TypeScript
スター
54.1k
フォーク
4.9k
平均マージ
6時間 28分
マージ済み PR(30日)
793

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

heygen-com/hyperframes のほかの issue

heygen-com/hyperframes の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。