From 3a5730ecf85b97aa0c3f5d96444b95ad288f4897 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 4 Jul 2026 14:15:27 +0000 Subject: [PATCH] test(@stdlib/namespace): raise exec `maxBuffer` in `test.cli.js` The job "Run affected tests" in workflow `run_affected_tests` failed on develop with `stdout maxBuffer length exceeded` while running `lib/node_modules/@stdlib/namespace/test/test.cli.js:238`. Root cause: two tests exec the namespace CLI and capture its full stdout (a CSV dump and a newline-delimited JSON dump of all 3212+ namespace entries) via `child_process.exec` without an explicit `maxBuffer`, so Node's 1 MiB default applies. The namespace has grown past that limit, so `exec` now returns an error instead of stdout, which fails the test via `t.fail(error.message)`. The failure is deterministic and reproduces on every run, as the namespace only grows. This commit adds an explicit `maxBuffer` option (`5000*1024`) to both `exec` calls, matching the existing `{'maxBuffer': N*1024}` convention used in `lib/node_modules/@stdlib/datasets/*/test/test.cli.js` for CLIs with large stdout. No source or CLI behavior changes. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28686663068 --- .../@stdlib/namespace/test/test.cli.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/namespace/test/test.cli.js b/lib/node_modules/@stdlib/namespace/test/test.cli.js index 896ecfce3a08..4af7ca561295 100644 --- a/lib/node_modules/@stdlib/namespace/test/test.cli.js +++ b/lib/node_modules/@stdlib/namespace/test/test.cli.js @@ -191,6 +191,7 @@ tape( 'when invoked with a `-V` flag, the command-line interface prints the vers tape( 'the command-line interface prints selected fields of the stdlib namespace (comma-separated values)', opts, function test( t ) { var expected; + var opts; var cmd; cmd = [ @@ -201,7 +202,11 @@ tape( 'the command-line interface prints selected fields of the stdlib namespace expected = csv( namespace(), [ 'alias', 'path' ] ); - exec( cmd.join( ' ' ), done ); + opts = { + 'maxBuffer': 5000*1024 + }; + + exec( cmd.join( ' ' ), opts, done ); function done( error, stdout, stderr ) { if ( error ) { @@ -218,6 +223,7 @@ tape( 'the command-line interface prints selected fields of the stdlib namespace tape( 'the command-line interface prints the stdlib namespace (newline-delimited JSON)', opts, function test( t ) { var fields; + var opts; var cmd; var ns; @@ -228,7 +234,11 @@ tape( 'the command-line interface prints the stdlib namespace (newline-delimited fields = [ 'alias', 'path', 'type', 'related' ]; ns = namespace(); - exec( cmd.join( ' ' ), done ); + opts = { + 'maxBuffer': 5000*1024 + }; + + exec( cmd.join( ' ' ), opts, done ); function done( error, stdout, stderr ) { var expected;