Skip to content

chore: stop nightly live tests from running on a daily schedule#478

Merged
0xmariowu merged 1 commit into
mainfrom
claude/daily-auto-test-issue-GOxWD
May 30, 2026
Merged

chore: stop nightly live tests from running on a daily schedule#478
0xmariowu merged 1 commit into
mainfrom
claude/daily-auto-test-issue-GOxWD

Conversation

@0xmariowu
Copy link
Copy Markdown
Owner

@0xmariowu 0xmariowu commented May 29, 2026

Problem

The Nightly — Live Integration Tests workflow fired a failure email nearly every day. Root cause: it hits ~14 real public free endpoints (arxiv, reddit, dblp, pubmed, ddgs…) from a shared CI datacenter IP and asserts every one returns results. Public services routinely rate-limit (429), block datacenter traffic (403), or return transient 5xx — so at least one of the 14 fails on essentially every run. These are upstream conditions, not regressions in AutoSearch.

Reproduced locally: arxiv 429, reddit 403, dblp 500.

Change

Remove the daily cron trigger from nightly.yml. workflow_dispatch is kept, so the suite can still be run on demand from the Actions tab, where a human can read the result. When run, the job still fails loudly on any real regression — no test behaviour is changed.

This is the minimal change that stops the daily false-alarm emails.

Note on scope: an earlier revision of this PR also added skip-on-transient logic to the live tests. Per review feedback (Codex/CodeRabbit correctly noted it could mask genuine parse/auth/method regressions) and since the suite is now manual-only, that logic was dropped — a manual run should surface every problem. The PR is now just the schedule removal.

Trade-off

No daily auto-run means no automatic alert if a platform genuinely breaks our parsing. Run the workflow manually (or add a weekly cron later) when you want that regression check.

Workflow edit authorized by the repo owner (@0xmariowu) in lieu of an automated approval gate.

https://claude.ai/code/session_01WJdXSEnHXZ8bhuV33vBN1R

Copilot AI review requested due to automatic review settings May 29, 2026 06:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

📝 Walkthrough

Walkthrough

This PR adds resilient transient-error handling to live integration tests. A new _search_or_skip helper catches upstream rate limits and temporary failures, converting them to test skips instead of failures. All 14 live test functions are updated to use this helper, and the nightly workflow is reconfigured to run manually only while reporting skip reasons.

Changes

Transient Upstream Failure Handling

Layer / File(s) Summary
Transient error classification and helper
tests/integration/test_free_channels_live.py
Imports are expanded to include RateLimited, TransientError, ChannelAuthError, and MethodUnavailable from autosearch.channels.base. A _TRANSIENT_UPSTREAM tuple classifies these four exception types. A new async helper _search_or_skip(ch, text) wraps channel search calls: on transient upstream exceptions it skips the test; on other exceptions it propagates.
Live test functions using _search_or_skip
tests/integration/test_free_channels_live.py
All 14 live test functions (test_arxiv_live, test_pubmed_live, test_dockerhub_live, test_hackernews_live, test_wikipedia_live, test_ddgs_live, test_package_search_live, test_openalex_live, test_crossref_live, test_dblp_live, test_reddit_live, test_google_news_live, test_discourse_forum_live, test_tieba_live) are updated to call _search_or_skip(ch, ...) instead of ch.search(...) for their primary queries.
Nightly workflow scheduling and test reporting
.github/workflows/nightly.yml
Cron-based daily schedule is removed, making the workflow manual-only via workflow_dispatch. The pytest command removes the -x stop-on-first-failure flag and adds -ra to report skip reasons in the summary. Inline comments clarify that transient upstream conditions are handled and skipped by the tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Upstream flickers? No fuss!
Skip the flaky, ship robust.
Nightly tests run when you say,
Transient blips just skip away! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title accurately summarizes the main change: removing the daily schedule trigger from the nightly workflow while keeping manual dispatch capability.
Description check ✅ Passed The description provides clear problem statement, change rationale, and trade-offs. It addresses the template's What/Why sections thoroughly, though doesn't strictly follow the checkbox format.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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 and usage tips.

Comment thread tests/integration/test_free_channels_live.py Fixed
@github-actions
Copy link
Copy Markdown
Contributor

@copilot please address the blocking signals on this PR and push a fix commit.

Trigger: blocking-review
Details: Review by @github-advanced-security[bot]: (no body)

Follow the PR's .github/copilot-instructions.md hard rules. Do not suppress lints, skip tests, or weaken CI.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/nightly.yml:
- Around line 3-8: You removed the scheduled trigger and weakened CI in the
workflow by replacing the daily cron with only workflow_dispatch; revert the
change in the .github/workflows/nightly.yml so the original 'on:' schedule
(cron/daily) and original fail-fast/CI behavior are restored, or if the change
is required, add an explicit approval gate (e.g., require a repo
owner/maintainer sign-off in the PR description or add a manual approval step)
and document that approval in the PR; locate the change around the 'on:' block
and the workflow_dispatch entry to restore the original trigger and CI settings
or to add the required approval metadata before merging.

In `@tests/integration/test_free_channels_live.py`:
- Around line 216-218: Docstring and query use non-English text; replace the
Chinese docstring and the Chinese search query with English-only text. Update
the module-level docstring that currently reads the Baidu Tieba live test
description to an English equivalent (e.g., "Baidu Tieba live test — high
captcha/rate-limit risk; run outside default live."), and change the search
invocation where _get_channel("tieba") is used with _search_or_skip(...) to pass
an English query string instead of "AI 编程助手" (e.g., "AI coding assistant").
Ensure you only modify the string literals in the docstring and the call to
_search_or_skip while keeping function names _get_channel and _search_or_skip
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85922237-1192-43d3-a0ae-8f0e62a547bf

📥 Commits

Reviewing files that changed from the base of the PR and between 9769da5 and 8b80aa1.

📒 Files selected for processing (2)
  • .github/workflows/nightly.yml
  • tests/integration/test_free_channels_live.py

Comment thread .github/workflows/nightly.yml
Comment thread tests/integration/test_free_channels_live.py Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b80aa1503

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/integration/test_free_channels_live.py Outdated
Comment thread tests/integration/test_free_channels_live.py Outdated
Comment thread tests/integration/test_free_channels_live.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

@copilot please address the blocking signals on this PR and push a fix commit.

Trigger: blocking-review
Details: Review by @chatgpt-codex-connector[bot]:

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b80aa1503

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Follow the PR's .github/copilot-instructions.md hard rules. Do not suppress lints, skip tests, or weaken CI.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces false-alarm failures from the live “free channels” integration suite by treating upstream/transient errors as skips and by changing the GitHub Actions workflow to run only on manual dispatch.

Changes:

  • Add a _search_or_skip() helper in the live integration tests to skip on specific typed upstream/transient exceptions.
  • Update the nightly workflow to remove the scheduled cron trigger and improve pytest reporting (-ra, no -x).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tests/integration/test_free_channels_live.py Routes live searches through a skip-on-transient wrapper and updates exception handling imports.
.github/workflows/nightly.yml Removes the daily schedule and adjusts pytest flags for clearer manual-run output.

Comment thread tests/integration/test_free_channels_live.py Outdated
Comment thread tests/integration/test_free_channels_live.py Outdated
Comment thread tests/integration/test_free_channels_live.py
Comment thread .github/workflows/nightly.yml
The Nightly live channel suite hits ~14 real public endpoints from a shared
CI datacenter IP and asserts each returns results. Public services routinely
rate-limit (429), block datacenter traffic (403) or return transient 5xx, so
at least one fails on nearly every nightly run -- producing a daily false-alarm
failure email with no actionable signal.

Remove the daily cron trigger; keep workflow_dispatch so the suite can still be
run on demand from the Actions tab, where a human can read the result. The job
still fails loudly on any real regression when run.

Authorized by the repo owner (0xmariowu) in lieu of an automated approval gate.

https://claude.ai/code/session_01WJdXSEnHXZ8bhuV33vBN1R
@0xmariowu 0xmariowu force-pushed the claude/daily-auto-test-issue-GOxWD branch from 320d2b9 to 3363c76 Compare May 29, 2026 06:34
@0xmariowu 0xmariowu changed the title fix: stop daily false-alarm failures from nightly live channel tests chore: stop nightly live tests from running on a daily schedule May 29, 2026
@0xmariowu 0xmariowu merged commit c32d316 into main May 30, 2026
17 checks passed
@0xmariowu 0xmariowu deleted the claude/daily-auto-test-issue-GOxWD branch May 30, 2026 06:43
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.

3 participants