Skip to content

Conversation

@deathbyknowledge
Copy link
Collaborator

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

🦋 Changeset detected

Latest commit: cd65c3e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/sandbox Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 26, 2025

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/sandbox-sdk/@cloudflare/sandbox@254

commit: cd65c3e

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

🐳 Docker Image Published

FROM cloudflare/sandbox:0.0.0-pr-254-5535f48

Version: 0.0.0-pr-254-5535f48

You can use this Docker image with the preview package from this PR.

Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

The implementation is correct - calling cancel() before releaseLock() properly terminates HTTP connections when streams are broken early. However, needs a changeset before merge.

Issues:

  1. Missing changeset - The existing .changeset/tough-buttons-arrive.md is for "Update dependencies", not this fix. Need a new changeset:

    ---
    '@cloudflare/sandbox': patch
    ---
    
    Fix stream cleanup by calling cancel() before releaseLock()
  2. Comment inconsistency - sse-parser.ts:75 has shorter comment than the other two files. Use the detailed version everywhere for clarity.

Optional: Consider adding a test case for early stream termination (breaking from for await loop).

Verdict: Needs changeset before merge.

Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

The stream cancellation fix is correct. Calling reader.cancel() before reader.releaseLock() properly terminates HTTP connections per Web Streams API spec, which prevents connection leaks when breaking from generators early.

One issue remains from previous review: sse-parser.ts still uses empty catch block instead of the detailed comment used in the other two files. This inconsistency should be fixed.

Verdict: Approve after fixing comment consistency in sse-parser.ts:77

@ghostwriternr ghostwriternr marked this pull request as ready for review November 26, 2025 16:52
@ghostwriternr ghostwriternr enabled auto-merge (squash) November 26, 2025 16:52
@ghostwriternr ghostwriternr merged commit 8728890 into main Nov 26, 2025
15 checks passed
@ghostwriternr ghostwriternr deleted the fix-preview-urls branch November 26, 2025 17:04
@github-actions github-actions bot mentioned this pull request Nov 26, 2025
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