Skip to content

test(microvm): read the host-loopback HTTP request up to its blank line - #577

Open
Jay (jay23606) wants to merge 1 commit into
microsoft:devfrom
jay23606:fix/host-loopback-http-fragments
Open

Jay (jay23606) wants to merge 1 commit into
microsoft:devfrom
jay23606:fix/host-loopback-http-fragments

Conversation

@jay23606

Copy link
Copy Markdown
Contributor

Fixes #505

Summary

  • The host-loopback HTTP fixture validated the first recv(4096) and rejected a valid request that TCP delivered in several reads (for example GET then the rest).
  • _read_http_request now reads until the header terminator, within the configured timeout and an 8 KiB cap, then validates the full request.

Test

  • New HostLoopbackHttpFixtureTests uses real loopback sockets. The split case fails on dev (WinError 10053) and passes with this change, as does the single-send control.
  • test_microvm_tests runs the same 9 failures on dev and on this branch (the host-loopback publication and ingress scripts and the SMP timer test), so they are not from this change.
  • ruff, ruff format, and pyright strict on Linux and Windows are clean.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 15, 2026 20:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix addresses TCP fragmentation with regression coverage and no identified blocking issues.

0 open findings

What changed in this PR

Fixes #505 by allowing the host-loopback HTTP fixture to handle requests fragmented across TCP reads.

Changes:

  • Accumulates requests until the header terminator, with a deadline and an 8 KiB size limit.
  • Adds real loopback-socket tests for single-send and fragmented requests.
File Description
scripts/​test_microvm_tests.py Adds HTTP fixture regression tests.
scripts/​nvx_tools/​microvm_tests.py Adds bounded request accumulation before validation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 21:50
@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from ba7c1d9 to 35e299e Compare October 15, 2026 21:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix addresses TCP fragmentation with regression coverage and no identified blocking issues.

0 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 16, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix addresses the reported fragmentation failure with regression coverage and no identified blocking issues.

0 open findings

🧠 Review effort: Balanced

@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from 2360e7d to 1a47959 Compare October 19, 2026 04:34
Copilot AI balanced review requested due to automatic review settings October 19, 2026 04:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fragmentation fix has regression coverage and no identified blocking regressions; tests were not executed during this review.

No open issues 🎉

Review effort: Balanced

@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from 1a47959 to ade1d55 Compare October 19, 2026 11:03
Copilot AI balanced review requested due to automatic review settings October 19, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in the focused fix and regression tests; tests were not executed during this review.

No open issues 🎉

Review effort: Balanced

@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from ade1d55 to 253b1e6 Compare October 19, 2026 12:55
Copilot AI balanced review requested due to automatic review settings October 19, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change fixes fragmented reads, with regression coverage and no identified blocking regressions.

No open issues 🎉

Review effort: Balanced

@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from 253b1e6 to 9eaec4c Compare October 19, 2026 13:11
Copilot AI balanced review requested due to automatic review settings October 19, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix has no identified blocking issues and includes regression coverage; tests were not rerun during review.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 13:31
@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from 9eaec4c to d74b91f Compare October 19, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix addresses fragmented requests with regression coverage and no identified blocking issues.

No open issues 🎉

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change addresses fragmented requests with regression coverage and no identified blocking issues.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 21:58
@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from 642b73e to 7d1dcb5 Compare October 19, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 22:36
@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from 7d1dcb5 to d6d9916 Compare October 19, 2026 22:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from d6d9916 to a8e6244 Compare October 19, 2026 22:55
Copilot AI balanced review requested due to automatic review settings October 19, 2026 22:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from a8e6244 to 19be981 Compare October 19, 2026 23:39
Copilot AI balanced review requested due to automatic review settings October 19, 2026 23:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from 19be981 to fa9d8b8 Compare October 20, 2026 00:40
Copilot AI balanced review requested due to automatic review settings October 20, 2026 00:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 02:15
@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from fa9d8b8 to b340cbd Compare October 20, 2026 02:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The fixture validated the first recv(4096) and rejected a valid request that
TCP delivered in several reads. Read until the header terminator, within the
timeout and a size cap. Add tests for a single send and a split request.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
@jay23606
Jay (jay23606) force-pushed the fix/host-loopback-http-fragments branch from b340cbd to a341239 Compare October 20, 2026 04:47
Copilot AI balanced review requested due to automatic review settings October 20, 2026 04:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Track host-loopback HTTP fixture bugs: fragmented TCP requests rejected

2 participants