Skip to content

types: trim challenges.d.ts to the public detectBotChallenge surface - #216

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789965548-trim-challenges-dts
Closed

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789965548-trim-challenges-dts

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

types/challenges.d.ts is not in the exports map and types/index.d.ts only re-exports detectBotChallenge from it, so the other declarations (PUBLIC_SEARCH_BLOCK_ADVICE, SEARCH_CHALLENGE_ADVICE, CHALLENGE_BLOCK_WINDOW_MS, CHALLENGE_UNREAD_FRAME_BUDGET, challengeScanNeeded, frameUrlLooksLikeChallenge, isPublicSearchNavigation, and the ChallengeScanState interface only challengeScanNeeded used) described internal helpers of src/challenges.ts no consumer could import. This trims the file to detectBotChallenge + BotChallenge. Runtime code is untouched; the file itself stays because scripts/check-package.ts requires it in the tarball. Dead-code scan finding sfind-119f44ac63044683b9f3a023a1d92e35.

Checklist

  • bun run release:check passes locally — ran test:types, check:package, and lint (see below); full release:check not run.
  • Guard proxy invariant unrelated (declarations only).
  • Secret redaction unrelated (declarations only).
  • Dependency pins untouched.
  • Public API changes update types/*.d.ts in this same commit. No public API changed; only unreachable declarations removed. bun run test:types passes.
  • CI job names unchanged.
  • No unit test imports the worker module.
  • No user-visible behaviour change; CHANGELOG not updated.
  • Nothing private committed.

How it was verified

bun run test:types, bun run check:package (tarball smoke test passed), bun run lint (only pre-existing unrelated warnings).

Link to Devin session: https://app.devin.ai/sessions/445b367e389b4229ae1ea25130a8ff09
Open in Devin Desktop: https://app.devin.ai/desktop/session/445b367e389b4229ae1ea25130a8ff09?variant=devin
Requested by: @CuriosityOS

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Sep 21, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge because it removes only declarations that are inaccessible through supported package exports.

Summary

This PR narrows types/challenges.d.ts to the supported public challenge-detection surface.

  • Retains BotChallenge and detectBotChallenge.
  • Removes declarations for internal constants, state, and helper functions.
  • Leaves runtime behavior and supported package entrypoints unchanged.

Reviews (1) · Last reviewed commit: "types: trim challenges.d.ts to the publi..."

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Starting E2E review of BetterWright/betterwright PR #216 (head 8c4ae6e); checking PR state and prior coverage first.

@CuriosityOS

Copy link
Copy Markdown
Collaborator

Landed on main via #224 (consolidated dead-code cleanup).

@CuriosityOS
CuriosityOS deleted the devin/1789965548-trim-challenges-dts branch September 21, 2026 10:14
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.

1 participant