You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no .github/workflows/ in this repo — zero CI — despite a real, offline-runnable pytest suite (tests/test_query.py) that mocks pinecone.Pinecone and google.genai.Client at import time and needs no network access or API keys. Without CI, a dependency bump or code change can silently break query.py's request-shape assumptions with nothing catching it before merge.
Solution
Add .github/workflows/ci.yml, triggered on push and pull_request, that:
installs from requirements.txt plus pytest
runs pytest tests/test_query.py only (not test_live.py, which hits the real Pinecone/Gemini index and requires live credentials this repo does not provision for CI — it is explicitly documented as excluded from CI in its own docstring)
declares an explicit least-privilege permissions: contents: read
Verification
Ran the target suite locally offline (no PINECONE_API_KEY/GOOGLE_API_KEY set): pytest tests/test_query.py -v → all 10 tests pass. The workflow mirrors this exact command, so the same clean-checkout run that passes locally will pass in CI, and a future assertion-breaking change will fail the job.
Follow-ups
Not in scope here (each is a separate, existing or potential issue):
The bundle file is available in the agent artifact in the workflow run linked above.
To create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 30909654254 -n agent -D /tmp/agent-30909654254
# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-30909654254/aw-pinecone-io-bird-search-example-agent-maintenance-issue-11.bundle refs/heads/agent/maintenance/issue-11:refs/bundles/create-pr-agent-maintenance-issue-11-ff22a3db3c95bdaa-df8a0c14
git update-ref refs/heads/agent/maintenance/issue-11-ff22a3db3c95bdaa refs/bundles/create-pr-agent-maintenance-issue-11-ff22a3db3c95bdaa-df8a0c14
git checkout agent/maintenance/issue-11-ff22a3db3c95bdaa
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-agent-maintenance-issue-11-ff22a3db3c95bdaa-df8a0c14
# Push the branch to origin
git push origin agent/maintenance/issue-11-ff22a3db3c95bdaa
# Create the pull request
gh pr create --title 'chore: add CI workflow for offline test suite' --base main --head agent/maintenance/issue-11-ff22a3db3c95bdaa --repo pinecone-io/bird-search-example
Problem
There is no
.github/workflows/in this repo — zero CI — despite a real, offline-runnable pytest suite (tests/test_query.py) that mockspinecone.Pineconeandgoogle.genai.Clientat import time and needs no network access or API keys. Without CI, a dependency bump or code change can silently breakquery.py's request-shape assumptions with nothing catching it before merge.Solution
Add
.github/workflows/ci.yml, triggered onpushandpull_request, that:requirements.txtpluspytestpytest tests/test_query.pyonly (nottest_live.py, which hits the real Pinecone/Gemini index and requires live credentials this repo does not provision for CI — it is explicitly documented as excluded from CI in its own docstring)permissions: contents: readVerification
Ran the target suite locally offline (no
PINECONE_API_KEY/GOOGLE_API_KEYset):pytest tests/test_query.py -v→ all 10 tests pass. The workflow mirrors this exact command, so the same clean-checkout run that passes locally will pass in CI, and a future assertion-breaking change will fail the job.Follow-ups
Not in scope here (each is a separate, existing or potential issue):
pytest tests/fails entirely on a clean checkout without API keys, contradicting conftest.py's documented behavior #12 —pytest tests/(the full directory, includingtest_live.py) still aborts with a collection error when API keys are absent; this PR does not touch that path since issue No CI workflow runs the offline test suite on push/PR #11 explicitly scopes CI totest_query.pyonly.Closes #11
Note
This was originally intended as a pull request, but the git push operation failed.
Original error: The process '/usr/bin/git' failed with exit code 128
Workflow Run: View run details and download bundle artifact
The bundle file is available in the
agentartifact in the workflow run linked above.To create a pull request with the changes: