sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: [NEXT-1275] `cookies().get()` fails refreshing Client Cache
Labels: linear: next

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
    Binaries:
      Node: 20.1.0
      npm: 9.6.4
      Yarn: 1.22.19
      pnpm: 8.5.0
    Relevant packages:
      next: 13.4.3-canary.1
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/friendly-field-ssqzdp?file=%2Fapp%2Fpage.tsx%3A10%2C1

### To Reproduce

1. Visit the [reproduction example](https://codesandbox.io/p/sandbox/friendly-field-ssqzdp?file=%2Fapp%2Fpage.tsx%3A10%2C1)
2. go to `/create-cookie`
3. create a new cookie pressing the `create cookie` button
4. check the client cache is refreshed for the current path
5. visit home page `/`
6. check the client cache was not refreshed for other pages depending on the same cookie

### Describe the Bug

The client cache is not being fully invalidated for the paths that depend on `cookies().get()` but only the page that call the `cookies.().set()` method.

It seems that soft navigation is still enabled after the cookie mutation.

### Expected Behavior

updating a cookie should revalidate all the paths that depend on cookies().get()` or at very least perform a full cache revalidation similar as a `router.refresh()`

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

<sub>[NEXT-1275](https://linear.app/vercel/issue/NEXT-1275/cookiesget-fails-refreshing-client-cache)</sub>
Repository: vscode
Issue: Git - Allow deleting several branches at once
Labels: help wanted,feature-request,git

It would be great to be able to delete several branches using the command "Git: Delete Branch..." (eg the quick pick with branches could include checkboxes) 

<img width="736" alt="image" src="https://github.com/microsoft/vscode/assets/16353531/bf56ca4a-e169-4b92-826d-78e1b984e05b">

I think this would be a great addition especially because git CLI doesn't have a nice interactive workflow to delete branches.
Repository: next.js
Issue: <Link href="/" /> navigates to {basePath}.txt page
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.14.2
      npm: 9.6.5
      Yarn: 1.22.19
      pnpm: 7.31.0
    Relevant packages:
      next: 13.4.2
      eslint-config-next: 13.4.2
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

_No response_

### Link to the code that reproduces this issue

n/a

### To Reproduce

config

```ts
const isProd = process.env.NODE_ENV === "production";

const repoName = "test";

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    appDir: true,
  },
  assetPrefix: isProd ? `/${repoName}/` : "",
  basePath: isProd ? `/${repoName}` : "",
  images: { unoptimized: true },
  output: "export",
  generateBuildId: async () => {
    // You can, for example, get the latest git commit hash here
    return "my-build-id";
  },
};

module.exports = nextConfig;
```

code

```ts
    <Link
      href="/"
    >
      Nav Home
    </Link>
```


results on prod

`https://fitnessxengineer.github.io/test.txt`

### Describe the Bug

it should navigate to the basePath, not `basePath.txt`

`https://fitnessxengineer.github.io/test.txt`

### Expected Behavior

`https://fitnessxengineer.github.io/test/`

### Which browser are you using? (if relevant)

chrome

### How are you deploying your application? (if relevant)

github pages
Repository: vscode
Issue: Multicursor on duplicated lines disappears
Labels: bug,editor-multicursor


Type: <b>Bug</b>

>I have strings like this:
'descrizione_dim1' => "SELECT descrizione AS descrizione_dim1 FROM ( SELECT dim1 FROM %%SC_DB%%.ciclopassivo_fact %%WHERE%% GROUP BY dim1 ) AS i JOIN %%SC_DB%%.ciclopassivo_dim d ON d.codice = i.dim1 AND d.dim = 'dim1'",

>Highlight "dim1" and press CTRL + D to multi cursor every occurrence of "dim1"

>I now have 6 cursors

>I duplicate the line with CTRL + SHIFT + D

>I now only have 2 cursors, on the first two occurrences of "dim1" of the second (new) line.  Expected 6.

VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:39:26.248Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 5 5500U with Radeon Graphics          (12 x 2096)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|13.83GB (7.16GB free)|
|Process Argv|--file-uri file://192.168.1.248/htdocs_dataquality/htdocs_dataquality.code-workspace --crash-reporter-id 213291ae-c5b5-474f-8bc1-fcfca6af3087|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (10)</summary>

Extension|Author (truncated)|Version
---|---|---
dart-code|Dar|3.64.0
githistory|don|0.6.20
gitlens|eam|13.6.0
react-native-react-redux|EQu|2.0.6
copilot-nightly|Git|1.86.92
atom-keybindings|ms-|3.3.0
vscode-react-native|msj|1.11.0
sftp|Nat|1.16.1
material-icon-theme|PKi|4.27.0
volar|Vue|1.6.4


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
showlangstatbar:30737416
vsctsb:30705553
azdwalk:30721579
pythonms35:30701012
pythonfmttext:30731395
fixshowwlkth:30730052
pythongtdpath:30739704

```

</details>

<!-- generated by issue reporter -->
Repository: storybook
Issue: [Bug]: Args type doesn't use mapping
Labels: bug,needs triage

### Describe the bug

When using [mapping](https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values), I expect to be able to place my mapping keys into `args` and have them map over, to keep stories nice and tidy. This actually works! …but typescript doesn't like it—which I think is a bug. It doesn't pull in the keys as possible values for args.

```ts
import { Meta, StoryObj } from '@storybook/react'

const SimpleComponent = (props: { someObject: { foo: number } }) => <p>{props.someObject.foo}</p>

const meta: Meta<typeof SimpleComponent> = {
  component: SimpleComponent,
  args: { 
    someObject: 'large', // Type 'string' is not assignable to type '{ foo: number; }'
  },
  argTypes: {
    someObject: {
      control: { type: 'radio' },
      options: ['large', 'small'],
      mapping: {
        large: { foo: 100 },
        small: { foo: 3 },
      },
    },
  },
}
export default meta
type Story = StoryObj<typeof SimpleComponent>

export const Default: Story = {}
```

There's a partial workaround I'm using right now that involves creating mappings as objects and using them like this:
```ts
const someObjectMapping = {
  large: { foo: 100 },
  small: { foo: 3 },
}

const meta: Meta<typeof SimpleComponent> = {
  argTypes: {
    someObject: {
      control: { type: 'radio' },
      options: ['large', 'small'],
      mapping: someObjectMapping,
    },
  },
}
```

But the main problem with this approach is that although the arg gets fed into the story, storybook doesn't pick up on the arg when it draws the control panels:
![image](https://github.com/storybookjs/storybook/assets/4912865/2dfe628f-8ec8-4eb0-b98b-d4fe1e697f53)

__
Edit: Since I really want those default args to be populated, I've resorted to decorating the offending args with `/** @ts-expect-error */`

```ts
  args: {
    /** @ts-expect-error type mapping bug */
    someObject: 'large',
  },
```

### To Reproduce

https://stackblitz.com/edit/github-xtelxp?file=stories%2FSome.stories.tsx

### System

```shell
Environment Info:

  System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 113.0.5672.92
    Edge: 113.0.1774.35
    Firefox: 112.0.1
    Safari: 15.5
  npmPackages:
    @storybook/addon-a11y: 7.0.10 => 7.0.10 
    @storybook/addon-essentials: 7.0.10 => 7.0.10 
    @storybook/addon-interactions: ^7.0.10 => 7.0.10 
    @storybook/addon-links: ^7.0.10 => 7.0.10 
    @storybook/core-common: ^7.0.9 => 7.0.10 
    @storybook/core-server: 7.0.10 => 7.0.10 
    @storybook/nextjs: 7.0.10 => 7.0.10 
    @storybook/react: 7.0.10 => 7.0.10 
    @storybook/react-vite: 7.0.10 => 7.0.10
```


### Additional context

_No response_
Repository: vscode
Issue: Clipboard APIs do not work inside iframes in webviews
Labels: bug,help wanted,webview

Create a webview that has an iframe with `allow="clipboard-write"`:

```
<iframe src="http://127.0.0.1:8000/"  allow="clipboard-write" width="100%" height="600" />
```

In the hosted page, try to use the clipboard APIs:

```
<button onclick="window.navigator.clipboard.writeText('inner');">Copy "inner" to clipboard</button>
```

When clicking the button, the operation will fail and the developer tools will report:

> Uncaught (in promise) DOMException: Write permission denied.

I've tried numerous combinations of things in the `allow` attribute (such as `clipboard` and `clipboard-write http://127.0.0.1:8000/`), but nothing seems to fix this. I presume the iframe being another origin is complicating things.

However, outside of VS Code this works fine. I made iframes nested three-deep that cross origins, and as long as I have `allow="clipboard-write"` then all of the nested frames are able to call this API successfully.

This _might_ be related to https://github.com/microsoft/vscode/issues/129178 (which is that the system-level Cmd+C shortcut does not work), but I'm not sure these two things should be the same (one is the system copying something, and the other is JavaScript access to the clipboard API) so am raising a separate issue.
Repository: electron
Issue: [Bug]: With the menu open, clicking on the title bar generates a click event inside the window
Labels: platform/windows,bug :beetle:,status/confirmed,has-repro-gist,24-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

24.3.0

### What operating system are you using?

Windows

### Operating System Version

Windows 10 version 22H2

### What arch are you using?

x64

### Last Known Working Electron version

v23.3.2 does not seem to have this issue, so I guess it's new in v24.

### Expected Behavior

The bug below doesn't happen...

### Actual Behavior

Probably this is Windows-specific. **When you have a menu open** inside Electron, if you click on the app's title-bar, a mouse event is generated inside the window itself. (Specifically I have examined `mousedown` events, presumably the related events also happen, but I haven't looked.)

The X and Y (e.g. `event.clientX` and `event.clientY`) of this event correspond (at least approximately) to the mouse location _on the entire screen_.

### Testcase Gist URL

https://github.com/rooklift/electron_title_click_bug/

### Additional Information

I have provided a convenient little app which draws the location of `mousedown` events on a canvas. Simply clone the repo and run `electron .` Remember that you must have a menu open and displayed when clicking the title bar for this to happen. Also note that the location of the window must be such that the clicks will be inside it, given the explanation of X/Y coordinates above.

_I recommend placing the window fairly close (not too close) to the top left of the screen, then opening a menu, then clicking the middle of the title bar._
Repository: flutter
Issue: [web] Investigate compiling CanvasKit/Skwasm with `skia_enable_optimize_size`
Labels: engine,platform-web,e: web_canvaskit,P2,e: wasm,e: web_skwasm,team-web,triaged-web

There is a flag `skia_enable_optimize_size`, which throws out some SDF rendering code paths in Skia. A little bit of experimentation with it I found it saves us around 50kb compressed (with brotli) on the size of the wasm module. We should try running our benchmarks against it, and if there are no significant performance regressions, consider enabling the flag for our build.
Repository: flutter
Issue: Flake in WindowsTest.LaunchMainHasNoOutput
Labels: engine,platform-windows,a: desktop,P2,c: flake,team-windows,triaged-windows

From https://ci.chromium.org/ui/p/flutter/builders/prod/Windows%20windows_unopt/121/overview

I've only seen this once so far, but filing an issue eagerly in case it needs to be escalated. Last touched by @loic-sharma in https://github.com/flutter/engine/commit/ab8c96ff37a2bfe886928ac4d8e8da5b796a44b6.

```
[168/480] WindowsTest.LaunchMainHasNoOutput (4861 ms)
[INFO:test_timeout_listener.cc(76)] Test timeout of 120 seconds per test case will be enforced.
Note: Google Test filter = WindowsTest.LaunchMainHasNoOutput
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from WindowsTest
[ RUN      ] WindowsTest.LaunchMainHasNoOutput
WARN: Renderer11.cpp:908 (initializeD3DDevice): Failed creating Debug D3D11 device - falling back to release runtime.
WARN: Renderer11.cpp:908 (initializeD3DDevice): Failed creating Debug D3D11 device - falling back to release runtime.
../../flutter/shell/platform/windows/flutter_windows_unittests.cc(65): error: Value of: cout.empty()
  Actual: false
Expected: true
[  FAILED  ] WindowsTest.LaunchMainHasNoOutput (4719 ms)
[----------] 1 test from WindowsTest (4719 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (4720 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] WindowsTest.LaunchMainHasNoOutput

 1 FAILED TEST
[168/480] WindowsTest.LaunchMainHasNoOutput returned/aborted with exit code 1 (4861 ms)
```
Repository: deno
Issue: fmt removes indents from nested conditional types.
Labels: deno fmt

Take the following for instance, which has been formatted [with prettier](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYhCAHgBUA+bAXm2OzgA94oATAZ2wCU5IAnJwlmNwCWUAOYAabAEMoaUgB0o8mAH5qAbXkgARlO5aAurQYJWHLhF79BIidNkKlMZWuKadew+90AvQ8cYzKABXAFttOH0nZRdsKDgAN0jFGOcYJDjE5Oj0zKSo5Qz4-IBuEHEQCAwYIWgWZFA9bggAdwAFPQR6lCkAGxapNHqK7W4pMABrOBgAZSlQuAAZEThkADM+ljgRscnpmYxx22RBYO2QOHC4JiZrxZlRYKlROHxuUKkYGrFkEClgmAQcogAAWMFCvQA6iChPAWIcwHAZl1YUIErC0L8wCxhiARFtuDA2mNRB91ptzgArFh0Ga2XpwACKwQg8HJvS2FUO3AJv3QWBYYGE1WBGGEsEhQiYMBByAAHAAGLnNLaQsYYX5iuAEpLAgCOLPgxKq3T+LAAtPFrtdgdw4AahHbic8yUgNhzzltQkITtwzhUWPS4ABBL7CbQAuBtSLLeLszkgQNiBnM1mrN0UiowKTaSXS2VIAAsWbGQl6tgAwhBQq6LiwAKzA4JbYg57qnc4JM4ASWYCFmQqE1WDzBm6AZ8bgAF8p0A):
```ts
type Foo<T> = T extends Record<string, any>
	? T["bar"] extends Record<string, any>
		? T["bar"]["baz"] extends number
			? never
			: never
		: never
	: never;
```

`deno fmt` turns it into:

```ts
type Foo<T> = T extends Record<string, any>
	? T["bar"] extends Record<string, any> ? T["bar"]["baz"] extends number ? never
		: never
	: never
	: never;
```

Which makes it much less readable.
Repository: pytorch
Issue: multiple values for argument `softmax_scale`
Labels: oncall: distributed,triaged,module: fsdp,oncall: pt2,pt2d-triage-nov2024

### 🐛 Describe the bug

Posting this on behalf of Mosaic

```
pip install --no-cache-dir --find-links https://download.pytorch.org/whl/torch_stable.html torch==2.0.0+cu117 torchvision torchtext
pip install einops
```

`python attention.py`

https://raw.githubusercontent.com/sashaDoubov/llm-foundry/sasha/repro-issue/llmfoundry/models/layers/attention.py

### Error logs

Not an error but instead seeing this scary warning

```

[2023-05-15 23:04:35,681] torch._dynamo.symbolic_convert: [WARNING] /llm-foundry/llmfoundry/models/layers/attention.py <function xformers_attn_fn at 0x7f2a6834ed40> [UnspecializedNNModuleVariable(MultiheadAttention), TensorVariable(), TensorVariable(), TensorVariable(), ConstantVariable(int)] {'softmax_scale': ConstantVariable(float), 'attn_bias': TensorVariable(), 'key_padding_mask': ConstantVariable(NoneType), 'is_causal': ConstantVariable(bool), 'dropout_p': ConstantVariable(float), 'training': ConstantVariable(bool), 'needs_weights': ConstantVariable(bool)} multiple values for argument 'softmax_scale'

[2023-05-15 23:04:35,707] torch._dynamo.symbolic_convert: [WARNING] /llm-foundry/llmfoundry/models/layers/attention.py <function xformers_attn_fn at 0x7f2a6834ed40> [UnspecializedNNModuleVariable(MultiheadAttention), TensorVariable(), TensorVariable(), TensorVariable(), ConstantVariable(int)] {'softmax_scale': ConstantVariable(float), 'attn_bias': TensorVariable(), 'key_padding_mask': ConstantVariable(NoneType), 'is_causal': ConstantVariable(bool), 'dropout_p': ConstantVariable(float), 'training': ConstantVariable(bool), 'needs_weights': ConstantVariable(bool)} multiple values for argument 'softmax_scale'
```

## How to remove the error

As a workaround you can comment out softmax_scale and the code then works  https://gist.github.com/msaroufim/5fe1a5cf745e31baabeb62b8dce10c82 but that's not a real solution

### Versions

n

cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @zhaojuanmao @mrshenli @rohan-varma @chauhang @penguinwu @pritamdamania87 @satgera @gqchen @aazzolini @osalpekar @jiayisuse @XilunWu @tianyu-l @yf225 @ezyang @bdhirsh @anijain2305 @zou3519 @kiukchung @lucasllc @ngimel
Repository: flutter
Issue: [flutter_tools] flutter update-packages --force-upgrade fail
Labels: c: crash,tool,P3,team-tool,triaged-tool

```
PathNotFoundException: Cannot open file, path = '/path/to/flutter/version' (OS Error: No such file or directory, errno = 2)
```
Repository: go
Issue: cmd/compile, x/build/cmd/relui: update compiler's PGO profile as part of rc1 relui flow
Labels: Builders,NeedsFix,release-blocker,recurring

CL https://golang.org/cl/451292 adds a default profile of the compiler, so we can build the compiler with PGO. As the compiler's source code evolves, we may want to periodically update the profile.

cc @prattmic @aclements
Repository: deno
Issue: `deno install` - `--compile` flag
Labels: suggestion,compile

It might be useful to add a `--compile` flag to `deno install`, for installing a script as a compiled executable:

```
$ deno install --compile -A npm:vite
$ vite --version
vite/4.3.6 win32-x64 node-v18.12.1
```

The reasons for this are:

1. Compiled executables run slightly faster than non-compiled in some cases because they read from a virtual file system. We'll also probably add snapshotting in the future, which could unlock other startup performance benefits.
2. It makes the install not dependent on the current deno executable.
3. It makes it easier for someone to have install steps that output a compiled exectable.
4. It is easy to add this feature.
Repository: flutter
Issue: MenuAnchor cascade view
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

MenuAnchor nested submenus will look like a mess when there are too much of them.

### Proposal

That would be awesome if it has the cascading flag to enable this feature so the menu looks like this:
![saket_cascade](https://github.com/flutter/flutter/assets/1377460/68b20276-0777-434c-8beb-3157088dedc9)


Implemented in android by saket:
https://github.com/saket/cascade/
Repository: go
Issue: net/http: add clear documentation on when to drain & close a Response
Labels: Documentation,NeedsDecision

This is more of a documentation request / proposal to add something to the language FAQ.

There seems to currently be no authoritative answer to the following question: Do you need to drain and close an http.Response, and if so do you always need to do this or only under certain circumstances?

Throughout my own journey in Go I've seen answers varying from "no" to "only if the request is over Xkb", "always" and a lot of things in between. Doing this wrongly can lead to resource leaks so it would seem nice to at least know what the state of this is. It also seems the answer to this may have changed over time but the response tends to be "read net/http" which isn't very practical and is something one would have to redo for every Go release. The complexity of "net/http" has grown over time too and some parts of it aren't all that approachable.

I bring this up because this post is currently making the rounds: https://manishrjain.com/must-close-golang-http-response. In it, the author suggests a few things:
* Response body must always be closed
* Response body must always be drained and closed
* Not using the DefaultTransport makes a difference in this behaviour

From the Reddit discussion, we also see a number of confused people, the advice to drain, to drain with a limit reader and that as long as you read the whole response body it is implicitly closed so you don't need to call Close().

That particular post and the ensuing confusion in the discussion including contradicting advice is only a recent example, there's a lot more of this.

It would be nice if what is expected here could be authoritatively stated in the examples & documentation of the net/http package. This seems to be a rather common issue and potential foot-gun in Go. Given Go is used extensively to write networked services, resolving ambiguity around what the client needs to do would be helpful.

The fact that this seems to confuse people to this day would also suggest http.Response might be overdue for a convenience helper that drains and/or closes the body that you can safely defer and forget about.