Skip to content

fix: assert empty stderr, trust mise in app dir#352

Merged
iloveitaly merged 14 commits intorailwayapp:mainfrom
iloveitaly:claude/assert-empty-stderr-tests-011CV611yLzrr4AfQSsgDciJ
Nov 20, 2025
Merged

fix: assert empty stderr, trust mise in app dir#352
iloveitaly merged 14 commits intorailwayapp:mainfrom
iloveitaly:claude/assert-empty-stderr-tests-011CV611yLzrr4AfQSsgDciJ

Conversation

@iloveitaly
Copy link
Collaborator

@iloveitaly iloveitaly commented Nov 13, 2025

  • Add assertion to check that stderr is empty when integration tests pass successfully. This helps catch unexpected warnings or error messages that might indicate issues even when the test technically succeeds.
  • I originally ran into this when I noticed because of the mise paranoid change I was getting warnings anytime any mise shim was running because the app dir is not trusted by default. This PR also fixes this problem.
  • There were some warnings because of the package.json structure in some of the code projects, which is fixed.

@iloveitaly iloveitaly force-pushed the claude/assert-empty-stderr-tests-011CV611yLzrr4AfQSsgDciJ branch 5 times, most recently from 1650c92 to 3824c83 Compare November 18, 2025 20:06
@iloveitaly iloveitaly changed the title test: assert empty stderr on successful integration tests fix: assert empty stderr, trust mise in app dir Nov 18, 2025
@iloveitaly iloveitaly force-pushed the claude/assert-empty-stderr-tests-011CV611yLzrr4AfQSsgDciJ branch 2 times, most recently from b5a75dd to 1476acd Compare November 18, 2025 23:15
claude and others added 12 commits November 20, 2025 12:29
Add assertion to check that stderr is empty when integration tests pass
successfully. This helps catch unexpected warnings or error messages that
might indicate issues even when the test technically succeeds.

The check is added to runContainerWithTimeout which runs containers that
output expected strings. HTTP check tests are not affected since they
already validate correctness via HTTP requests and separating stderr
from detached containers is more complex.
Add "private": true to all example package.json files to suppress
package manager warnings about missing license fields. These are
test/example projects not meant to be published to npm registries.

This prevents stderr warnings like "warning package.json: No license
field" which were causing the new stderr assertion in integration tests
to fail even though the applications were running correctly.

Affected examples:
- All node-yarn-* examples
- node-npm, node-pnpm, node-bun examples
- config-file, mise-config examples
- Other node-based examples
Add MISE_TRUSTED_CONFIG_PATHS=/app to automatically trust mise
configuration files in the application directory during builds.

This prevents trust warnings when MISE_PARANOID mode is enabled:
  "Trust them with \`mise trust\`. See https://mise.jdx.dev/cli/trust.html"

Since the app directory (/app) is the user's code being built,
it's safe to trust mise configuration files located there.
Add optional "stderrAllowed" field to test.json that defaults to false.
When set to true, skips the stderr empty assertion for tests where
stderr output is expected and normal.

This is useful for applications that log to stderr by default, such as
gunicorn which outputs info logs to stderr:
  [2025-11-18 18:13:50 +0000] [1] [INFO] Starting gunicorn 23.0.0
  [2025-11-18 18:13:50 +0000] [1] [INFO] Listening at: http://0.0.0.0:3333 (1)

Updated python-uv test to set stderrAllowed: true since it uses
gunicorn which logs to stderr.
Add stderrAllowed: true to node-latest-npm-native-deps test to handle
the NPM_CONFIG_PRODUCTION deprecation warning:
  "npm warn config production Use \`--omit=dev\` instead"

This is temporary and should be removed once NPM_CONFIG_PRODUCTION is
removed from core/providers/node/node.go:241 in a separate PR.
Add stderrAllowed: true to node-prisma, node-remix, and
node-npm-install-in-build test cases to temporarily allow the
npm warning about NPM_CONFIG_PRODUCTION being deprecated.

This is a temporary workaround until NPM_CONFIG_PRODUCTION is
removed from node.go in a separate PR.
Bun routes console.log/console.error to stderr by default in
script mode. Add stderrAllowed: true to all Bun example tests
to allow this expected behavior.
TanStack Start outputs to stderr during server startup.
Add stderrAllowed: true to allow this expected behavior.
@iloveitaly iloveitaly force-pushed the claude/assert-empty-stderr-tests-011CV611yLzrr4AfQSsgDciJ branch from b2ff71c to 22fbaee Compare November 20, 2025 19:30
@iloveitaly iloveitaly marked this pull request as ready for review November 20, 2025 22:12
@iloveitaly iloveitaly merged commit c265238 into railwayapp:main Nov 20, 2025
177 of 179 checks passed
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.

2 participants