Skip to content

Skip unreliable Baidu search verification#1006

Open
PeterDaveHello wants to merge 1 commit into
ChatGPTBox-dev:masterfrom
PeterDaveHello:fix-verify-config-baidu-check
Open

Skip unreliable Baidu search verification#1006
PeterDaveHello wants to merge 1 commit into
ChatGPTBox-dev:masterfrom
PeterDaveHello:fix-verify-config-baidu-check

Conversation

@PeterDaveHello

@PeterDaveHello PeterDaveHello commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • stop the scheduled config verifier from fetching Baidu, whose requests consistently reset or hang on GitHub-hosted runners
  • preserve Baidu runtime selectors and live coverage for Bing, Yahoo, and Naver
  • align verifier documentation with the enabled default checks

Validation

Validation skipped: manual browser smoke tests; this change only affects the CI verifier and documentation, not extension runtime behavior.

GitHub-hosted runners consistently reset Baidu search requests or leave
them hanging until the six-hour workflow limit. This keeps the scheduled
config verification red even when selectors are unchanged.

Disable the Baidu live URL in the verifier while retaining its selector
configuration and runtime site adapter. Other reachable search engines
continue to provide live selector coverage.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the documentation in AGENTS.md to move Baidu from the default verification checks to the optional engines list, as it may be blocked by regional or anti-bot measures. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@PeterDaveHello

Copy link
Copy Markdown
Member Author

/gemini review

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Disable Baidu live URL in config verifier to avoid flaky CI hangs

🐞 Bug fix 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Skip Baidu live fetch in the scheduled config verification to prevent CI timeouts.
• Keep Baidu selectors/adapters intact while preserving live coverage for other engines.
• Update verifier documentation to match the enabled default checks.
Diagram

graph TD
  A["Scheduled/Manual verify job"] --> B["verify-search-engine-configs.mjs"] --> C{"URL list"}
  C --> D["Fetch HTML"] --> E["Site adapters"] --> F["Pass/Fail report"]
  C --> G["Baidu URL disabled"]
  subgraph Legend
    direction LR
    _job["CI job"] ~~~ _script["Verifier script"] ~~~ _decision{"Config"}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Skip Baidu only on GitHub-hosted runners
  • ➕ Preserves Baidu live coverage for local/self-hosted environments
  • ➕ Keeps scheduled CI stable without permanently removing coverage everywhere
  • ➖ Adds environment detection/branching logic
  • ➖ Still leaves the main CI signal without Baidu coverage (where it matters most)
2. Add strict per-request timeouts + abort/retry
  • ➕ Could keep Baidu enabled while preventing 6-hour hangs
  • ➕ General hardening for other engines if they become flaky
  • ➖ Doesn't address frequent connection resets; could still be noisy red
  • ➖ More moving parts (timeouts/backoff) to tune and maintain

Recommendation: The PR’s approach (removing Baidu from default live URLs while keeping its selector/adapter configuration) is the best near-term fix because it restores CI reliability with minimal change surface. If Baidu live coverage is still desired, consider re-enabling it conditionally (e.g., non-GitHub runners) plus adding request timeouts to prevent long hangs.

Files changed (2) +8 / -5

Bug fix (1) +5 / -2
verify-search-engine-configs.mjsDisable Baidu live verification URL to prevent flaky CI fetches +5/-2

Disable Baidu live verification URL to prevent flaky CI fetches

• Removes the Baidu search URL from the default live URL set by commenting it out and documenting the GitHub Actions connectivity issues. Keeps the rest of the engine URL configuration intact and slightly generalizes the Accept-Language comment.

.github/workflows/scripts/verify-search-engine-configs.mjs

Documentation (1) +3 / -3
AGENTS.mdAlign verifier docs with default engines (remove Baidu from defaults) +3/-3

Align verifier docs with default engines (remove Baidu from defaults)

• Updates the 'npm run verify' documentation to reflect that default checks target Bing, Yahoo, and Naver (no Baidu). Moves Baidu into the optional engines list and updates the default URL examples accordingly.

AGENTS.md

@PeterDaveHello

Copy link
Copy Markdown
Member Author

/agentic_review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Baidu was removed from the default search verification targets and moved to the optional engines list. The verification script documents the disabled Baidu URL and removes an obsolete header comment.

Changes

Search engine verification

Layer / File(s) Summary
Update verification defaults
.github/workflows/scripts/verify-search-engine-configs.mjs, AGENTS.md
Bing, Yahoo, and Naver remain default checks; Baidu is commented out in the script and documented as optional due to GitHub Actions request behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: josstorer

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: skipping unreliable Baidu verification checks.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the AGENTS.md documentation to move Baidu from the default verification checks list to the optional engines list, as it may be blocked by regional or anti-bot measures. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@kilo-code-bot

kilo-code-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .github/workflows/scripts/verify-search-engine-configs.mjs
  • AGENTS.md

Reviewed by hy3:free · Input: 28.7K · Output: 1.7K · Cached: 98.4K

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Baidu coverage silently removed 🐞 Bug ☼ Reliability
Description
Baidu is no longer verified because its URL list is now empty, and the verifier treats an empty list
as success (no fetches, no selector assertions, no skip notice). Since Baidu remains a runtime site
adapter, selector/parser regressions for Baidu can now land without any verification signal.
Code

.github/workflows/scripts/verify-search-engine-configs.mjs[R100-103]

+  baidu: [
+    /*'https://www.baidu.com/s?wd=hello'*/
+    // GitHub Actions requests are reset or left hanging
+  ],
Evidence
The verifier only validates selectors inside urlArray.map(...), so an empty baidu URL array
results in zero fetches/DOM parses for Baidu and no failures being recorded; meanwhile Baidu is
still configured and initialized as a runtime adapter.

.github/workflows/scripts/verify-search-engine-configs.mjs[90-114]
.github/workflows/scripts/verify-search-engine-configs.mjs[146-185]
src/content-script/site-adapters/index.mjs[32-80]
src/content-script/site-adapters/baidu/index.mjs[1-26]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The verifier currently skips Baidu implicitly by using an empty URL array, which removes verification coverage without reporting that Baidu was skipped.

## Issue Context
Baidu is still present in the shared `config` and is mounted by the runtime site adapter, so losing verification coverage can allow regressions to ship undetected.

## Fix Focus Areas
- .github/workflows/scripts/verify-search-engine-configs.mjs[90-114]
- .github/workflows/scripts/verify-search-engine-configs.mjs[146-185]

## Suggested fix
- Add an explicit skip mechanism (e.g., `SKIP_ENGINES=baidu` or default-skip Baidu when `process.env.GITHUB_ACTIONS` is set) rather than relying on an empty array.
- Log skipped engines (e.g., `console.log('Skipping baidu: disabled in CI')`) so the verifier output reflects reduced coverage.
- Optionally add a fixture-based Baidu check (parse a stored HTML snapshot with JSDOM) so selectors are still validated without making network calls.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +100 to +103
baidu: [
/*'https://www.baidu.com/s?wd=hello'*/
// GitHub Actions requests are reset or left hanging
],

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.

Remediation recommended

1. Baidu coverage silently removed 🐞 Bug ☼ Reliability

Baidu is no longer verified because its URL list is now empty, and the verifier treats an empty list
as success (no fetches, no selector assertions, no skip notice). Since Baidu remains a runtime site
adapter, selector/parser regressions for Baidu can now land without any verification signal.
Agent Prompt
## Issue description
The verifier currently skips Baidu implicitly by using an empty URL array, which removes verification coverage without reporting that Baidu was skipped.

## Issue Context
Baidu is still present in the shared `config` and is mounted by the runtime site adapter, so losing verification coverage can allow regressions to ship undetected.

## Fix Focus Areas
- .github/workflows/scripts/verify-search-engine-configs.mjs[90-114]
- .github/workflows/scripts/verify-search-engine-configs.mjs[146-185]

## Suggested fix
- Add an explicit skip mechanism (e.g., `SKIP_ENGINES=baidu` or default-skip Baidu when `process.env.GITHUB_ACTIONS` is set) rather than relying on an empty array.
- Log skipped engines (e.g., `console.log('Skipping baidu: disabled in CI')`) so the verifier output reflects reduced coverage.
- Optionally add a fixture-based Baidu check (parse a stored HTML snapshot with JSDOM) so selectors are still validated without making network calls.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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