Skip to content

Fix #268: exercise HttpServerPort request cycle#592

Merged
flyingrobots merged 4 commits into
mainfrom
fix-268-http-server-cycle
Jun 3, 2026
Merged

Fix #268: exercise HttpServerPort request cycle#592
flyingrobots merged 4 commits into
mainfrom
fix-268-http-server-cycle

Conversation

@flyingrobots

Copy link
Copy Markdown
Member

Summary

  • replace the placeholder HttpServerPort request-cycle assertion with a real POST through NodeHttpAdapter
  • assert the adapter forwards method, URL, headers, body, status, and response body
  • remove the unnecessary abstract-port as any in the test

Closes #268

Validation

  • npm exec vitest run test/unit/ports/HttpServerPort.test.ts
  • npm run typecheck:test
  • pre-push IRONCLAD gates 0-7 passed with WARP_QUICK_PUSH=1

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@flyingrobots, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 27 minutes and 44 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3db10996-83f1-4ae7-84b6-0a519ef0ced4

📥 Commits

Reviewing files that changed from the base of the PR and between a21fb8b and 4b6824a.

📒 Files selected for processing (1)
  • test/unit/ports/HttpServerPort.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-268-http-server-cycle

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 and usage tips.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v18.0.0, release workflow will publish.

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer Self-Review Findings

@codex please confirm this finding before merge.

Severity File Lines Infraction Recommended mitigation
P3 Test determinism test/unit/ports/HttpServerPort.test.ts L18-L37 The server lifecycle is not fully deterministic: afterEach calls server.close() without awaiting the close callback, and the starts and stops a server listen promise resolves even if the callback receives an error. Update the test to use small promise helpers for listen/close. Reject listen errors, await close in cleanup, and assert the started server exposes an address before the request-cycle test proceeds.

I will address this in a follow-up commit on this PR branch.

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer Activity Summary

@codex please confirm this review posture.

Source Severity File Lines Issue Commit Outcome
Self-review P3 test/unit/ports/HttpServerPort.test.ts L18-L62 Server lifecycle test did not await close, and one listen promise could resolve even when the listen callback received an error. 4b6824af Added promise helpers for listen/close, awaited cleanup, and asserted a real listening address.
PR threads None n/a n/a No unresolved review threads found by GraphQL review-thread query. n/a No PR-thread fix required.

Validation:

  • npm exec vitest run test/unit/ports/HttpServerPort.test.ts
  • npm run typecheck:test
  • pre-push IRONCLAD gates 0-7 passed with WARP_QUICK_PUSH=1

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v18.0.0, release workflow will publish.

@flyingrobots flyingrobots merged commit e2c2ff4 into main Jun 3, 2026
17 checks passed
@flyingrobots flyingrobots deleted the fix-268-http-server-cycle branch June 3, 2026 22:09
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.

HttpServerPort test says "request/response cycle" but only tests interface shape

1 participant