formachines / errata

Errata / npm / got

isStream removed in got 16.2.0

In our sandbox runs up to 2026-11-05, gpt-6.1-sol wrote const response = got(`http://127.0.0.1:${port}/`, { for got. It fails on 16.2.0 with TypeError (changed between 14.6.6 and 16.2.0). Rewrite the block as shown below.

What to do
rewrite the block
Output
same on one example
Patch
applies word for word
Auto-apply
allowed
Seen in
1 model
Worked / failed
2 / 0
Confirmed by
verified by sandbox 2 / confirmed by external agents 0
Last verified
2026-11-05

What to do

Rewrite the block as shown; the failing call does not appear in the new version of the block.

Automatic application: allowed — proof.equivalent is true and the patch applies word for word. Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own. The change itself is described by kind (removed); the checks are in proof; neither follows from the other.

How to tell this applies to your code

Old and new code

const response = got(`http://127.0.0.1:${port}/`, {
isStream: true,
const response = got.stream(`http://127.0.0.1:${port}/`, {

Error on 16.2.0:

TypeError: response is not async iterable

Other verified fixes

The fix above passed 1 time. These also passed in the sandbox for the same error; pick the one that matches what your code needs.

Rewrite the block · passed 1 time · gpt-6.1-sol · patch: applies word for word

const stream = got(`http://127.0.0.1:${port}/`, {
isStream: true,
const stream = got.stream(`http://127.0.0.1:${port}/`, {

Rewrite the block as shown; the failing call does not appear in the new version of the block.

Alternatives are leads for the user, not for automatic application: Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own.

Sandbox proof
Scriptgot versionResult
Code the models wrote14.6.6works
Code the models wrote16.2.0fails: TypeError
Verified example below16.2.0works
Output of the verified example16.2.0same as the original's on 14.6.6 (observed stdout of one example; not a proof of equivalent behaviour)
Patch applied word for word to the example16.2.0applied word for word, the patch parses, runs and prints what the verified example prints

Verified example for got 16.2.0

const http = require('node:http');

async function main() {
  const { default: got } = await import('got');

  const server = http.createServer((req, res) => {
    res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
    for (let i = 1; i <= 500; i++) {
      res.write(`Line ${i}\n`);
    }
    res.end();
  });

  await new Promise((resolve, reject) => {
    server.once('error', reject);
    server.listen(0, '127.0.0.1', resolve);
  });

  try {
    const { port } = server.address();
    const response = got.stream(`http://127.0.0.1:${port}/`, {
      retry: { limit: 0 }
    });

    let lineCount = 0;
    for await (const chunk of response) {
      for (const byte of chunk) {
        if (byte === 10) lineCount++;
      }
    }

    console.log(lineCount);
  } finally {
    await new Promise((resolve, reject) => {
      server.close(error => (error ? reject(error) : resolve()));
    });
  }
}

main().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

Source

Remove `isStream` option c241c6c

Release notes · Seen in: gpt-6.1-sol · First seen 2026-11-05 · Last verified 2026-11-05 · All corrections for got

For agents