Skip to content

Automation: Direction #117

@github-actions

Description

@github-actions

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, push on master
  • matrix: python-version: [ "3.10", "3.11", "3.12" ] (or align to project policy if older required)
  • steps:
    1. actions/checkout@v4
    2. actions/setup-python@v5 with cache poetry (or pip + ~/.cache/pypoetry)
    3. Install Poetry (pinned) and deps:
      • pipx install poetry==<pin> (recommend pin like 1.8.3)
      • poetry install --no-interaction
    4. Run fast sanity checks already present:
      • poetry run python -m compileall cdp generator examples test
      • poetry run python test_import.py
    5. Run your existing test entrypoints (keep it simple; don’t invent new harness):
      • poetry run python minimal_test.py
      • poetry run python simple_test.py
      • poetry run python comprehensive_test.py (if this requires Chrome, gate it behind env/skip; see risks)
    6. 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 .gitignore to include (at least):
    • *.sqlite
    • .bish-index
    • .bish.sqlite
    • **/.bish-index
    • **/.bish.sqlite
    • *.jar (or at least bfg-*.jar if 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.sqlite files across repo
    • consider deleting bfg-1.15.0.jar from the repo root (it’s huge and not part of runtime)
  • Add a CI step in ci.yml:
    • git status --porcelain must 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 ci runs: install check (optional), unit tests, generation drift check
  • make generate runs generator
  • make test runs current test scripts
    Suggested file edits:
  • Makefile: add targets generate, test, ci
  • Optionally add scripts/ci.sh (POSIX shell) to avoid Make portability issues on Windows.

Risks/unknowns

  • Generator prerequisites unclear: generator/generate.py may 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.py might 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.toml pins Python compatibility, align the matrix accordingly.

Suggested tests

Add/ensure these are run in CI (and can be run locally):

  1. Import sanity
  • poetry run python test_import.py
  1. Basic behavioral tests
  • poetry run python minimal_test.py
  • poetry run python simple_test.py
  1. Comprehensive tests (gated if needed)
  • poetry run python comprehensive_test.py
    • If Chrome required: run only when RUN_E2E=1 and add a separate workflow e2e.yml scheduled nightly.
  1. Generator determinism / drift
  • poetry run python generator/generate.py
  • git diff --exit-code

Verification checklist (quick)

  • New .github/workflows/ci.yml runs on PRs and master
  • CI fails if regenerated output differs
  • .bish-* and other local artifacts no longer appear in git status
  • make ci (or scripts/ci.sh) matches CI behavior locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    automationAutomation-generated direction and planning

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions