AGENTQL REPOSITORY ANALYSIS & BUG REPORT REPORT
================================================================================
Repository: https://github.com/tinyfish-io/agentql.git
Total Files Audited: 105+ (Python, JavaScript, Google Colab, GitHub Workflows, Templates)
- TOP 5 IDENTIFIED BUGS SUMMARY
-
[HIGH] CI/CD Failure in .github/workflows/python-precommit.yml
- Issue: Case-sensitive path mismatch (
examples/Python vs examples/python), non-existent Pylint targets (application_examples examples), and invalid working-directory keyword on action step.
- Impact: Python CI checks never trigger on PRs on Linux runners and fail when run manually.
-
[HIGH] Colab Crash in examples/python/run_script_online_in_google_colab/main.ipynb
- Issue: Typo import
from google.colab import user_data (with underscore) followed by userdata.get(...) without underscore, plus missing await on browser.new_page().
- Impact: Fatal
ImportError and NameError crash on Cell 6 for all Google Colab users.
-
[MEDIUM] Runtime AttributeError in .templates/python/template_async.py
- Issue: Query defines
search_btn, but code executes await response.search_button.click().
- Impact: Any new project started with this async template crashes on the first run.
-
[MEDIUM] Broken Pagination & Infinite Loop in examples/js/collect-paginated-ecommerce-data/main.js & examples/python/collect_paginated_ecommerce_listing_data/main.py
- Issue: In JS,
paginationInfo is an Array, so paginationInfo.hasNextPage is undefined, causing infinite scraping of page 2. In Python, missing break when has_next_page is False.
- Impact: Wastes API credits and fills datasets with duplicate items.
-
[MEDIUM] ESM/CommonJS Mismatches in examples/js/perform-sentiment-analysis/main.js & examples/js/use-remote-browser/main.js
- Issue: CommonJS
require('openai/index.mjs') throws ERR_REQUIRE_ESM, and use-remote-browser uses ES module syntax in a CommonJS package.
- Impact: Scripts fail to run directly under standard Node.js runtime.
================================================================================
2. COMPLETE GITHUB ISSUE & PR SUBMISSION TEMPLATE (BUG 1)
A. GITHUB ISSUE TITLE
fix(ci): resolve Linux path casing and invalid lint targets in python-precommit.yml
B. GITHUB ISSUE BODY
🐛 Bug Description
The Python CI workflow in .github/workflows/python-precommit.yml currently fails or silently skips checks on pull requests due to three issues:
-
Linux Path Casing Mismatch (examples/Python vs examples/python):
The workflow defines path filters and working directories as examples/Python (with a capital P). Because GitHub Actions runs on ubuntu-latest (case-sensitive Linux ext4 filesystem) and the actual repository folder is examples/python, the workflow never triggers on PR changes and fails with Directory not found if executed.
-
Non-Existent Pylint Targets:
Line 43 runs pylint --disable=R,C application_examples examples. Neither application_examples nor examples exists in examples/python, causing Pylint to immediately crash with exit code 2 (Cannot find 'application_examples').
-
Misconfigured Step Properties:
working-directory is placed under uses: isort/isort-action@master, which is invalid syntax for action steps. Running lint and format checks via poetry run ensures the correct virtual environment is used.
🔍 Steps to Reproduce
- Push a commit modifying any file in
examples/python/.
- Notice that the GitHub Actions path trigger
examples/Python/** fails to match on case-sensitive Linux runners.
- Running
pylint application_examples examples locally inside examples/python fails immediately:
pylint: error: Cannot find 'application_examples'
🛠️ Proposed Solution / Code Diff
--- a/.github/workflows/python-precommit.yml
+++ b/.github/workflows/python-precommit.yml
@@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, synchronize, reopened]
paths:
jobs:
python-pre-commit:
@@ -34,23 +34,22 @@ jobs:
# ----- install dependencies -----
#----------------------------------------------
- name: Install dependencies
-
working-directory: ./examples/Python
-
working-directory: ./examples/python
run: |
poetry install --no-interaction --no-root --with dev
- name: Lint check
-
working-directory: ./examples/Python
-
run: pylint --disable=R,C application_examples examples
-
working-directory: ./examples/python
-
run: poetry run pylint --disable=R,C $(git ls-files '*.py')
- name: Code style check
-
working-directory: ./examples/Python
-
-
working-directory: ./examples/python
run: poetry run black . --check
- name: Imports sort check
-
working-directory: ./examples/Python
-
uses: isort/isort-action@master
-
working-directory: ./examples/python
-
run: poetry run isort --check-only .
- name: Static check
-
working-directory: ./examples/Python
-
working-directory: ./examples/python
uses: jakebailey/pyright-action@v2
📄 Full Fixed Workflow File (.github/workflows/python-precommit.yml):
name: Python Pre-commit checks
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "examples/python/**"
jobs:
python-pre-commit:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: false
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------------------
# ----- install dependencies -----
#----------------------------------------------
- name: Install dependencies
working-directory: ./examples/python
run: |
poetry install --no-interaction --no-root --with dev
- name: Lint check
working-directory: ./examples/python
run: poetry run pylint --disable=R,C $(git ls-files '*.py')
- name: Code style check
working-directory: ./examples/python
run: poetry run black . --check
- name: Imports sort check
working-directory: ./examples/python
run: poetry run isort --check-only .
- name: Static check
working-directory: ./examples/python
uses: jakebailey/pyright-action@v2
continue-on-error: true
with:
pylance-version: latest-release
C. GITHUB PULL REQUEST (PR) TITLE
fix(ci): fix python-precommit path casing and lint targets (#issue_number)
D. GITHUB PULL REQUEST (PR) DESCRIPTION
Summary of Changes
- Fixed Path Casing: Changed
examples/Python to examples/python so that GitHub Actions triggers and executes properly on case-sensitive Linux (ubuntu-latest) runners.
- Fixed Pylint Target Paths: Replaced non-existent directory arguments (
application_examples examples) with $(git ls-files '*.py') executed through Poetry.
- Unified Tooling with Poetry: Configured
black, isort, and pylint to run consistently via poetry run using the dependencies defined in examples/python/pyproject.toml.
================================================================================
================================================================================
Repository: https://github.com/tinyfish-io/agentql.git
Total Files Audited: 105+ (Python, JavaScript, Google Colab, GitHub Workflows, Templates)
[HIGH] CI/CD Failure in
.github/workflows/python-precommit.ymlexamples/Pythonvsexamples/python), non-existent Pylint targets (application_examples examples), and invalidworking-directorykeyword on action step.[HIGH] Colab Crash in
examples/python/run_script_online_in_google_colab/main.ipynbfrom google.colab import user_data(with underscore) followed byuserdata.get(...)without underscore, plus missingawaitonbrowser.new_page().ImportErrorandNameErrorcrash on Cell 6 for all Google Colab users.[MEDIUM] Runtime AttributeError in
.templates/python/template_async.pysearch_btn, but code executesawait response.search_button.click().[MEDIUM] Broken Pagination & Infinite Loop in
examples/js/collect-paginated-ecommerce-data/main.js&examples/python/collect_paginated_ecommerce_listing_data/main.pypaginationInfois an Array, sopaginationInfo.hasNextPageisundefined, causing infinite scraping of page 2. In Python, missingbreakwhenhas_next_pageisFalse.[MEDIUM] ESM/CommonJS Mismatches in
examples/js/perform-sentiment-analysis/main.js&examples/js/use-remote-browser/main.jsrequire('openai/index.mjs')throwsERR_REQUIRE_ESM, anduse-remote-browseruses ES module syntax in a CommonJS package.================================================================================
2. COMPLETE GITHUB ISSUE & PR SUBMISSION TEMPLATE (BUG 1)
A. GITHUB ISSUE TITLE
fix(ci): resolve Linux path casing and invalid lint targets in python-precommit.yml
B. GITHUB ISSUE BODY
🐛 Bug Description
The Python CI workflow in
.github/workflows/python-precommit.ymlcurrently fails or silently skips checks on pull requests due to three issues:Linux Path Casing Mismatch (
examples/Pythonvsexamples/python):The workflow defines path filters and working directories as
examples/Python(with a capitalP). Because GitHub Actions runs onubuntu-latest(case-sensitive Linux ext4 filesystem) and the actual repository folder isexamples/python, the workflow never triggers on PR changes and fails withDirectory not foundif executed.Non-Existent Pylint Targets:
Line 43 runs
pylint --disable=R,C application_examples examples. Neitherapplication_examplesnorexamplesexists inexamples/python, causing Pylint to immediately crash with exit code 2 (Cannot find 'application_examples').Misconfigured Step Properties:
working-directoryis placed underuses: isort/isort-action@master, which is invalid syntax for action steps. Running lint and format checks viapoetry runensures the correct virtual environment is used.🔍 Steps to Reproduce
examples/python/.examples/Python/**fails to match on case-sensitive Linux runners.pylint application_examples exampleslocally insideexamples/pythonfails immediately:pylint: error: Cannot find 'application_examples'
🛠️ Proposed Solution / Code Diff
--- a/.github/workflows/python-precommit.yml
+++ b/.github/workflows/python-precommit.yml
@@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, synchronize, reopened]
paths:
jobs:
python-pre-commit:
@@ -34,23 +34,22 @@ jobs:
# ----- install dependencies -----
#----------------------------------------------
- name: Install dependencies
📄 Full Fixed Workflow File (
.github/workflows/python-precommit.yml):name: Python Pre-commit checks
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "examples/python/**"
jobs:
python-pre-commit:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
C. GITHUB PULL REQUEST (PR) TITLE
fix(ci): fix python-precommit path casing and lint targets (#issue_number)
D. GITHUB PULL REQUEST (PR) DESCRIPTION
Summary of Changes
examples/Pythontoexamples/pythonso that GitHub Actions triggers and executes properly on case-sensitive Linux (ubuntu-latest) runners.application_examples examples) with$(git ls-files '*.py')executed through Poetry.black,isort, andpylintto run consistently viapoetry runusing the dependencies defined inexamples/python/pyproject.toml.================================================================================