-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Last generated: 2026-02-12T19:07:10.776Z
Provider: openai
Model: gpt-5.2
Summary
This repo has a lot of “meta” automation synced from a central .github repo, but it lacks repo-specific CI that reliably validates the core deliverable: generated CDP bindings (cdp/) built from the generator + protocol inputs. The current state also suggests accidental committed artifacts (.bish-*, bfg-1.15.0.jar) that add noise and risk.
Direction (what and why)
Direction: Add a minimal, repo-owned CI workflow that (1) installs deps via Poetry, (2) runs formatting/type/lint gates (where configured), (3) runs the existing test scripts, and (4) verifies generated output is up-to-date (no diff after generation). Also, stop tracking accidental/binary artifacts and enforce that via .gitignore + CI.
Why: This reduces maintainer toil (no manual “did you regenerate?” checks), catches breakages early, and makes PRs deterministic even if the repo has many generic automation workflows.
Plan (next 1-3 steps)
1) Add a repo-specific CI workflow focused on correctness + generation drift
Create: .github/workflows/ci.yml with:
- triggers:
pull_request,pushonmaster - matrix:
python-version: [ "3.10", "3.11", "3.12" ](or align to project policy if older required) - steps:
actions/checkout@v4actions/setup-python@v5with cachepoetry(orpip+~/.cache/pypoetry)- Install Poetry (pinned) and deps:
pipx install poetry==<pin>(recommend pin like1.8.3)poetry install --no-interaction
- Run fast sanity checks already present:
poetry run python -m compileall cdp generator examples testpoetry run python test_import.py
- Run your existing test entrypoints (keep it simple; don’t invent new harness):
poetry run python minimal_test.pypoetry run python simple_test.pypoetry run python comprehensive_test.py(if this requires Chrome, gate it behind env/skip; see risks)
- Generation drift check:
poetry run python generator/generate.py(or whatever the canonical generator command is)git diff --exit-code(fails if generation changes tracked files)
If generator/generate.py requires inputs (downloaded CDP JSON), add a step to fetch/pin those (see Risks).
2) Remove/ignore accidental artifacts and enforce cleanliness
Concrete changes:
- Update
.gitignoreto include (at least):*.sqlite.bish-index.bish.sqlite**/.bish-index**/.bish.sqlite*.jar(or at leastbfg-*.jarif you intentionally keep other jars)
- Remove from git history going forward (in a normal PR; don’t rewrite history unless necessary):
- delete tracked
.bish-index/.bish.sqlitefiles across repo - consider deleting
bfg-1.15.0.jarfrom the repo root (it’s huge and not part of runtime)
- delete tracked
- Add a CI step in
ci.yml:git status --porcelainmust be empty at end of run (catches newly created files during tests/generation)
3) Add a single “developer automation” entrypoint to standardize local + CI behavior
Add Makefile targets (or a scripts/ wrapper) so CI and humans do the same thing:
make ciruns: install check (optional), unit tests, generation drift checkmake generateruns generatormake testruns current test scripts
Suggested file edits:Makefile: add targetsgenerate,test,ci- Optionally add
scripts/ci.sh(POSIX shell) to avoid Make portability issues on Windows.
Risks/unknowns
- Generator prerequisites unclear:
generator/generate.pymay need protocol JSON files (download from Chrome repo) or a specific version pin. If it currently reads from committed protocol files, fine; if it fetches from the network, CI will be flaky unless pinned + cached. - Tests may require a running Chrome/Chromium:
comprehensive_test.pymight require launching Chrome. If so, either:- install Chromium in CI and run it headless, or
- mark that test as “extended” and run only on a scheduled workflow, keeping PR CI fast.
- Poetry env: If
pyproject.tomlpins Python compatibility, align the matrix accordingly.
Suggested tests
Add/ensure these are run in CI (and can be run locally):
- Import sanity
poetry run python test_import.py
- Basic behavioral tests
poetry run python minimal_test.pypoetry run python simple_test.py
- Comprehensive tests (gated if needed)
poetry run python comprehensive_test.py- If Chrome required: run only when
RUN_E2E=1and add a separate workflowe2e.ymlscheduled nightly.
- If Chrome required: run only when
- Generator determinism / drift
poetry run python generator/generate.pygit diff --exit-code
Verification checklist (quick)
- New
.github/workflows/ci.ymlruns on PRs andmaster - CI fails if regenerated output differs
-
.bish-*and other local artifacts no longer appear ingit status -
make ci(orscripts/ci.sh) matches CI behavior locally