Skip to content

refactor: share admission refusal writer between express and nestjs - #220

Merged
thegdsks merged 2 commits into
mainfrom
refactor/admission-refusal-writer
Oct 13, 2026
Merged

thegdsks merged 2 commits into
mainfrom
refactor/admission-refusal-writer

Conversation

@thegdsks

Copy link
Copy Markdown
Member

Follow-up to #219, which merged before this commit landed. SonarCloud failed #219 on new duplicated lines (8.6% against a 3% threshold), mostly the identical refusal-writing middleware in the Express and NestJS adapters. This moves the response writing into core as writeRefusal, leaving a five line middleware in each adapter.

No behavior change. Express (56) and NestJS (19) adapter tests pass against a rebuilt core.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your first pull request. CI will run shortly. If the change touches package source, please add a changeset with pnpm changeset.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
18.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/core/src/adapter-admit.ts 0.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@thegdsks
thegdsks merged commit d303a84 into main Oct 13, 2026
12 of 13 checks passed
@thegdsks
thegdsks deleted the refactor/admission-refusal-writer branch October 13, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant