Skip to content

test: verify namespace middleware isolation - #209

Merged
electrohyun merged 1 commit into
electrohyun:mainfrom
shaurya703:test/namespace-middleware-isolation
Aug 10, 2026
Merged

electrohyun merged 1 commit into
electrohyun:mainfrom
shaurya703:test/namespace-middleware-isolation

Conversation

@shaurya703

Copy link
Copy Markdown
Contributor

Closes #207

Adds one case to src/middleware.test.ts: middleware registered on /admin via io.of('/admin').use() does not run for a default-namespace connection and runs exactly once for an /admin connection. The default-namespace connection is fully awaited first, so its completion is the ordering marker that proves the middleware was skipped — no timeout involved.

Also regenerated docs/conformance.md with pnpm conformance and removed the now-covered namespace-middleware bullet from the Not covered yet list.

Verified locally:

  • pnpm test:real — 201 passed
  • pnpm test:mock — 201 passed
  • pnpm check:conformance, pnpm typecheck, pnpm lint, pnpm format:check all pass

@github-actions github-actions Bot added the test Test coverage and fixtures label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 17bb1940-639b-4aed-a022-67d5e58bd7f2

📥 Commits

Reviewing files that changed from the base of the PR and between ec8f38b and 94a7d08.

📒 Files selected for processing (2)
  • docs/conformance.md
  • src/middleware.test.ts

📝 Walkthrough

Walkthrough

The PR adds a test for /admin namespace middleware isolation. It verifies default-namespace connections bypass the middleware and /admin connections invoke it once. The conformance report updates references and removes the covered item.

Changes

Namespace middleware coverage

Layer / File(s) Summary
Namespace middleware isolation test and conformance update
src/middleware.test.ts, docs/conformance.md
The test verifies middleware isolation between / and /admin. The conformance report links the coverage and updates middleware test references.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: electrohyun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the namespace middleware isolation test, which is the primary change.
Description check ✅ Passed The description accurately covers the middleware test, regenerated conformance documentation, and reported validation commands.
Linked Issues check ✅ Passed The changes satisfy issue #207 by testing namespace isolation without runtime changes and updating conformance documentation.
Out of Scope Changes check ✅ Passed The changes are limited to the requested middleware test and related generated conformance documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@electrohyun electrohyun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM. Thanks for the contribution!

@electrohyun
electrohyun merged commit b63346f into electrohyun:main Aug 10, 2026
14 checks passed
@electrohyun

Copy link
Copy Markdown
Owner

@shaurya703, your PR has now been merged, making you smocket's first external contributor! This is a meaningful milestone for the project. 😊

We're preparing more contributor-friendly issues as smocket moves toward 1.0.0. If you'd like to follow along, feel free to star the repository and check back for future issues.

We hope to see you around again!

@electrohyun electrohyun added the good first issue Good for newcomers label Aug 10, 2026
@electrohyun electrohyun added the 📏 s Pull request changes 10–49 lines label Aug 11, 2026
@electrohyun electrohyun self-assigned this Aug 27, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in smocket Aug 27, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in smocket Aug 27, 2026
@shaurya703
shaurya703 deleted the test/namespace-middleware-isolation branch December 3, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers 📏 s Pull request changes 10–49 lines test Test coverage and fixtures

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: verify namespace middleware isolation

2 participants