Skip to content

fix(assetserver): commit fallback response headers before flush - #6399

Merged
leaanthony merged 1 commit into
masterfrom
codex/v3-20261028-port-009
Oct 28, 2026
Merged

leaanthony merged 1 commit into
masterfrom
codex/v3-20261028-port-009

Conversation

@taliesin-ai

Copy link
Copy Markdown
Collaborator

A handler can set streaming headers and call Flush before emitting body bytes. The fallback wrapper previously delegated that flush without applying its cloned headers or marking its own status committed. The client could receive a headerless 200 response, and a later WriteHeader(404) could still invoke fallback after the response had started.

Selected because early flushing is a valid streaming-handler pattern and the failure is reproducible without native GUI dependencies.

Ported onto current public master with feature changes excluded.

Validation on this port, from v3:

  • CI=1 go test -race -tags bench ./internal/assetserver -count=1 — passed.
  • go vet -tags bench ./internal/assetserver — passed.
  • git diff --check — passed.

Historical performance measurements, where present in the original implementation, were not rerun here. Native platform validation is limited to the local Linux environment.

The maintainer requested immediate admin merges for this dependency-ordered bug/performance series, with the final PR left open for CI review. No release, milestone or repository-protection changes are included.

@leaanthony
leaanthony merged commit e7a2dd3 into master Oct 28, 2026
15 of 17 checks passed
@leaanthony
leaanthony deleted the codex/v3-20261028-port-009 branch October 28, 2026 10:52
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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