协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
serpapi-ci-integration【开发与工程】Gate SerpAPI code with sanitized fixtures and isolate optional live searches behind trusted CI environments and allowance controls. Use when adding integration tests to automation. Trigger with "add SerpAPI CI".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Make parsing and policy gates deterministic on every change while restricting live search to a separately approved, trusted workflow.
Use Read, Glob, and Grep to inspect tests and workflows, WebFetch to verify current client behavior, Write or Edit for fixtures, tests, and CI, and Bash(gh:*) only to inspect or operate the approved GitHub workflow.
Offline fixture tests require no SerpAPI credential or search allowance. A live search is external, variable, and potentially billable; untrusted pull-request code must not receive SERPAPI_KEY, including through unsafe workflow-trigger patterns.
Store SERPAPI_KEY only in a protected CI environment. Never expose it to fork PRs, logs, artifacts, command traces, caches, or fixture updates. Give live jobs read-only repository permissions unless a documented need proves otherwise.
Do not add secrets, approve a fork workflow, change required checks, or enable allowance-consuming schedules without repository and account-owner approval.
Return the trigger/permission matrix, fixture test results, live-job boundary and budget, secret-flow proof, fork test evidence, required/advisory decision, and rollback owner.
| Condition | Response |
|---|---|
| Fork code can reach the secret | Block the workflow and redesign the event boundary. |
| Fixture job attempts network | Fail CI and replace the client dependency. |
| Live check returns 429 | Stop the job and classify throughput versus allowance via Account API. |
| Provider is unavailable | Preserve deterministic gates and report the live lane separately. |
permissions:
contents: read
jobs:
fixture-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install -r requirements.lock
- run: python -m pytest tests/serpapi -q
Exercise the fork path and protected live lane, then document which evidence is release-blocking.