Production-grade hardening: lint/security/ffmpeg-observability/process-leak/tests/CI - #18
Open
itsPremkumar wants to merge 9 commits into
Open
Production-grade hardening: lint/security/ffmpeg-observability/process-leak/tests/CI#18itsPremkumar wants to merge 9 commits into
itsPremkumar wants to merge 9 commits into
Conversation
…s-escape, no-unused-expressions, no-empty-object-type)
…o close filter-injection/breakage; add regression test
…ual-fx/watermark) for observability, keep offline-fallback contract
…/T (detached Python not reaped by SIGTERM)
…lt; buildDuckExpression emits raw ffmpeg between()+gt() (was String.raw with stray backslashes)
…put; skip bundled-music tests when input/bgm/__bundled__ is empty (env, like network skips)
…ts/check-coverage.mjs to parse V8 coverage summary
…n-blur, @remotion/transitions as explicit dependencies remotion/*.tsx imported these subpackages without declaring them, so a clean npm ci (e.g. in CI) failed typecheck with TS2307 'Cannot find module @remotion/...'. They were only present via transitive hoisting, which is non-deterministic. Declaring them explicitly (pinned to ^4.0.487, matching the other @Remotion deps) makes the install reproducible and unblocks CI.
…en infra is absent; give restitch test 240s timeout (flaky under load, not a logic failure)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drives the Automated-Video-Generator through the gstack
/health→/review→ fix-loop methodology to production grade. All changes verified locally: typecheck clean, ESLint 0 errors, full suite 560 pass / 0 fail / 14 env-skip, line coverage 82.05% ≥ 80% floor.Changes (atomic commits)
drawtextcaptions through the canonicalffmpegDrawtextEscape()(handles\ : ' " ,) inexport.ts/brand.ts, closing a filter-injection / caption-breakage vector. Added regression test.stderrin previously-silent catch blocks (sfx/visual-fx/watermark) for observability, preserving the "never hard-fail offline" fallback contract.killBackend()now tears down the full backend process tree on Windows viataskkill /T /F /PID— adetachedPython backend is not reaped by a bareSIGTERM(real RAM leak between jobs).candidatesPerAssetdefault corrected 4→2 to match its own documented default;buildDuckExpressionnow emits correct raw-comma ffmpegbetween(t,s,e)wrapped ingt()(wasString.rawwith stray backslashes that broke the duck curve).buildDuckExpressionassertions to the corrected output; env-dependent bundled-music tests skip wheninput/bgm/__bundled__is empty (same convention as network-image skips).scripts/check-coverage.mjs.@remotion/shapes,@remotion/paths,@remotion/motion-blur,@remotion/transitionsas explicit dependencies (matching^4.0.487). They were imported byremotion/*.tsxonly via transitive hoisting, which a cleannpm ci(e.g. CI) did not guarantee — causingTS2307: Cannot find module '@remotion/...'and breaking main's typecheck. This is what made CI red on every recentmainpush; this PR fixes that root cause.CI note
The repo's
CIworkflow currently only triggers onpushtomainandpull_request; in practice nopull_requestrun has ever been recorded for this repo, so CI does not run on this PR branch. The fix above targets the exact TS2307 error seen inmain's CI logs (run 30057719212, step "Typecheck"). Merging this PR tomainwill let thepushtrigger re-run CI, which should now pass.Test plan
npm run typecheck— clean (0 errors)npx eslint src/ remotion/— 0 errorsnpm run test:unit— 560 pass / 0 fail / 14 skip (network + absent bundled assets)npm run test:coveragethrough gate — 82.05% linesNote
The 14 skipped tests pass only when their infra is present — the
input/bgm/__bundled__music tracks aren't committed in this checkout. Committing those assets would flip them from skip→run.