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

Aperta Adatta ai principianti
#6,889 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@pqminh27 ci sta già lavorando.

Dal 31/10/2026.

  • #6890 di @pqminh27 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
aws, cloud, docker, gcp, typescript
Ambito
cli

Direzione di ricerca

I flag vengono analizzati con Number.parseInt nei percorsi CLI di Lambda e Cloud Run; inizia da lì e individua l'analisi degli interi condivisa usata per width, height, fps, memory, concurrency, timeout e chunk size. Sostituiscila con un controllo che accetti solo un token intero in base 10, mantenendo i controlli esistenti sui valori positivi e sugli FPS e i valori predefiniti per i flag omessi. È completato quando --width=1920.5 e --fps=24.5 vengono rifiutati con un messaggio di intero non valido e i valori validi continuano a passare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
54.1k
Fork
4.9k
Merge medio
6h 28m
PR unite (30g)
793

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di heygen-com/hyperframes

Tutte le issue di heygen-com/hyperframes

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.