Skip to content

🐛 fix: type errors in oidc http-adapter test breaking CI lint#15499

Merged
AmAzing129 merged 1 commit into
canaryfrom
fix/oidc-adapter-test-types
Jun 5, 2026
Merged

🐛 fix: type errors in oidc http-adapter test breaking CI lint#15499
AmAzing129 merged 1 commit into
canaryfrom
fix/oidc-adapter-test-types

Conversation

@AmAzing129

Copy link
Copy Markdown
Contributor

💻 Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • ✅ test
  • 📝 docs
  • 🔨 chore

🔗 Related Issue

Introduced by #15478 (merged with a red Test Database check).

🔀 Description of Change

src/libs/oidc-provider/http-adapter.test.ts (added in #15478) fails type-check with two errors, which breaks the Lint step of the Test Database job for every PR since the merge (PR CI runs against the merge result with canary):

http-adapter.test.ts(78,44): error TS7016: Could not find a declaration file for
  module 'oidc-provider/lib/shared/selective_body.js'
http-adapter.test.ts(92,23): error TS2339: Property 'body' does not exist on type '{}'

Note: canary itself still looks green because push runs skip test jobs via the duplicate-run check.

Fix:

  • Add src/libs/oidc-provider/selective-body.d.ts declaring the untyped oidc-provider deep import (@types/oidc-provider doesn't cover internal lib/ paths), modeled on the actual middleware contract in selective_body.js.
  • Type the mock ctx with the exported SelectiveBodyContext and drop the now-redundant inline as cast (which didn't suppress TS7016 anyway).

No runtime behavior change — type-only fix.

🧪 How to Test

  • bunx tsgo --noEmit → exit 0 (2 errors before this fix)

  • bunx vitest run src/libs/oidc-provider/http-adapter.test.ts → 3 passed

  • bunx eslint on both files → 0 errors

  • Tested locally

  • Added/updated tests

  • No tests needed

📝 Additional Information

The remaining red on recent PRs' Test Web App is a separate issue: the E2E scenario agent-scroll.feature:19 (用户消息应固定在聊天列表顶部, expected ≤150px got 643px) fails in ~75% of runs since 2026-06-04 — needs its own investigation (possible real regression in the pin-to-top behavior).

Declare the untyped oidc-provider deep import (selective_body.js) and
type the mock ctx so type-check passes again. Introduced by #15478.

@sourcery-ai sourcery-ai Bot 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.

Sorry @AmAzing129, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Jun 5, 2026 4:57pm

Request Review

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 5, 2026
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.82%. Comparing base (95a0cf1) to head (3ebd247).
⚠️ Report is 2 commits behind head on canary.

Additional details and impacted files
@@             Coverage Diff             @@
##           canary   #15499       +/-   ##
===========================================
- Coverage   88.56%   70.82%   -17.75%     
===========================================
  Files         819     3259     +2440     
  Lines       91994   321750   +229756     
  Branches     7682    28450    +20768     
===========================================
+ Hits        81476   227877   +146401     
- Misses      10336    93691    +83355     
  Partials      182      182               
Flag Coverage Δ
app 61.52% <ø> (?)
database 92.54% <ø> (?)
packages/agent-manager-runtime 49.69% <ø> (ø)
packages/agent-runtime 81.08% <ø> (ø)
packages/builtin-tool-lobe-agent 18.52% <ø> (ø)
packages/context-engine 84.19% <ø> (ø)
packages/conversation-flow 91.29% <ø> (ø)
packages/device-gateway-client 90.51% <ø> (ø)
packages/eval-dataset-parser 95.15% <ø> (ø)
packages/eval-rubric 76.11% <ø> (ø)
packages/fetch-sse 85.57% <ø> (-1.72%) ⬇️
packages/file-loaders 87.89% <ø> (ø)
packages/memory-user-memory 74.99% <ø> (ø)
packages/model-bank 99.99% <ø> (ø)
packages/model-runtime 84.22% <ø> (ø)
packages/prompts 72.51% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/types 35.38% <ø> (ø)
packages/utils 84.98% <ø> (ø)
packages/web-crawler 88.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 68.53% <100.00%> (∅)
Services 54.77% <ø> (∅)
Server 71.85% <100.00%> (∅)
Libs 55.69% <ø> (∅)
Utils 81.71% <ø> (-18.29%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AmAzing129 AmAzing129 merged commit ab7cb07 into canary Jun 5, 2026
39 of 40 checks passed
@AmAzing129 AmAzing129 deleted the fix/oidc-adapter-test-types branch June 5, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant