Skip to content

test(media-server): make the Railway Dockerfile test chain pass on slow build machines - #4261

Merged
richiemcilroy merged 1 commit into
mainfrom
fix/media-railway-tests-only
Nov 14, 2026
Merged

richiemcilroy merged 1 commit into
mainfrom
fix/media-railway-tests-only

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

The Railway media server builds apps/media-server/Dockerfile, whose image build runs a long chain of bun test steps. That build has failed on every media server change since the address guard landed. Dockerfile.standalone, the farm and self-hosting image, kept passing. Both causes are tests that depend on how fast the build machine is.

Reproduced by building apps/media-server/Dockerfile at main on a 2-CPU Linux machine: the build stopped in the test step about 70 s in, matching the Railway failures.

Causes and fixes

  1. checkVideoAccessible depended on outside DNS. The test asked about a domain that does not exist. Since the address guard resolves names itself with a 10 s limit, a machine whose resolver is slow to give up ran past the 5 s test timeout. The test now uses a local server that answers 404 for the missing file, and a second case checks a file that exists.
  2. Decoder exit was checked too early. Five assertions in recording-verification.integration.test.ts check that no decoder is left after a deadline or failure, and they looked at the instant the call failed. On a slow machine a stopped decoder is still exiting then. A new decodersStopped helper waits up to 2 s. A decoder that was never stopped is still there after the wait, so a real leak still fails.

Test files only. No runtime code changes.

Tests

  • With both fixes, the full apps/media-server/Dockerfile build passes on the same 2-CPU Linux machine and the image is written.
  • The two files: 184 pass locally.

RetriggerView in GreptileConfidence Score: 5/5

This test-only PR appears safe to merge.

Summary

This PR changes only media-server tests.

  • The accessibility tests check local URLs with both missing and available files.
  • Decoder cleanup checks wait briefly for processes to finish exiting.

No actionable issues found. Tests and Docker builds were not run during this review.

Reviews (1) · Last reviewed commit: "test(media-server): make the Railway Doc..." · Reviewed by Greptile

…ow build machines

The checkVideoAccessible test asked about a name that does not exist. Since
the address guard resolves names itself with a 10 s limit, a build machine
whose resolver is slow to give up ran past the 5 s test timeout. It now uses
a local server for the missing file and covers a file that exists.

Five checks that no decoder is left after a deadline or failure looked the
instant the call failed. On a slow machine a stopped decoder is still
exiting then. They now wait up to 2 s, so a decoder that was never stopped
still fails them.
@sandchest-com

sandchest-com Bot commented Nov 14, 2026

Copy link
Copy Markdown

Sandchest

Sandchest reviewed 4f4ffec: nothing exploitable found in this change.

Sandchest reviews every change for vulnerabilities an attacker could use · Review details

@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai review

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

@richiemcilroy
richiemcilroy merged commit d2d7b7a into main Nov 14, 2026
45 checks passed

This branch was previously deployed

1 inactive deployment
Preview – cap-status — 4f4ffec4 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant