-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Last generated: 2026-02-21T06:48:09.407Z
Provider: openai
Model: gpt-5.2
Summary
This repo has a lot of automation scaffolding synced from a centralized .github repo, but it’s missing the most valuable “repo-local” automation: a single, authoritative CI workflow that (a) runs the project’s real checks (generator + import/tests + typing/formatting), (b) caches Poetry, and (c) produces artifacts (generated cdp/ diffs) to reduce maintainer toil. Current state also shows committed .bish-* databases and a stray editor backup file, which are automation noise and can destabilize PRs.
Direction (what and why)
- Add a repo-owned CI pipeline focused on this library’s correctness (generation + tests + packaging sanity), instead of relying on generic org workflows.
Why: prevents drift, catches breakage earlier, and makes failures actionable for maintainers. - Make “codegen drift” explicit: CI should fail if generated
cdp/output is out of date, and should upload the regenerated output as an artifact for easy review.
Why: this repo’s core risk is mismatched protocol specs vs generated Python. - Remove/ignore automation byproducts (
.bish-*,*~) and stop them from reappearing.
Why: reduces churn and accidental commits; improves signal in diffs.
Plan (next 1–3 steps)
1) Add a canonical GitHub Actions workflow for this repo
Create: .github/workflows/ci.yml with:
- Triggers:
pull_request,pushonmaster, andworkflow_dispatch. - Matrix: Python
3.9, 3.10, 3.11, 3.12(align as needed withpyproject.tomlclassifiers). - Steps (concrete):
actions/checkout@v4actions/setup-python@v5withcache: "pip"(or Poetry cache below)- Install Poetry (pin version, e.g.
pipx install poetry==1.8.5) - Cache Poetry + venv:
- Cache
~/.cache/pypoetry - Cache
.venvif you use in-project venvs (or rely on Poetry’s default)
- Cache
poetry install --no-interaction- Run quick health checks already present in repo:
poetry run python -m compileall cdp generatorpoetry run python test_import.py
- Run unit/regression tests:
- If using pytest:
poetry run pytest -q - If not, run existing scripts:
poetry run python minimal_test.pyandpoetry run python comprehensive_test.py
- If using pytest:
- (Optional but recommended) type check if configured:
poetry run mypy -p cdp(only ifmypy.iniis meaningful and passes today)
- Packaging sanity:
poetry build
- Add concurrency:
concurrency: { group: ci-${{ github.ref }}, cancel-in-progress: true }
2) Add a “generated code is up-to-date” check + artifact
Extend .github/workflows/ci.yml (or add .github/workflows/codegen.yml) with a dedicated job:
- Run generator:
poetry run python generator/generate.py(adjust args if required bygenerator/generate.py)
- Then fail on diff:
git diff --exit-code cdp
- Upload artifact if diff exists (helps reviewers):
- Always upload
cdp/as artifact from the generation step (or upload only on failure viaif: failure()but ensure the artifact still exists).
- Always upload
This makes PRs self-service: contributors can download the “expected” generated output.
3) Stop committing .bish-* and editor backups; clean existing noise
- Update
.gitignoreto include:**/.bish-index**/.bish.sqlite**/*~
- Remove committed files in a single cleanup PR:
- Top-level:
.bish-index,.bish.sqlite - Under
.github/,cdp/,docs/,examples/,generator/,test/,.github/workflows/ - Remove
.github/copilot-instructions.md~
- Top-level:
- Add a small guard in CI to prevent reintroduction:
- Step:
test -z "$(git ls-files '**/.bish-index' '**/.bish.sqlite' '*~')"
- Step:
Risks/unknowns
- Generator invocation details:
generator/generate.pymay require downloading protocol JSON or specific args/environment; CI might need a pinned Chrome protocol source. If generation is non-deterministic or depends on network, the diff check could be flaky. - Test harness ambiguity: there’s no obvious
pytestlayout at top-level; tests may be script-based. The CI plan assumesminimal_test.py/comprehensive_test.pyare reliable and non-flaky in CI. - Python version support: without inspecting
pyproject.toml, the matrix could include unsupported versions; align matrix to what the project promises. - Org-synced workflows: some existing
.github/workflows/*may already run overlapping checks. Addingci.ymlcould duplicate work unless you disable/adjust triggers on the generic ones.
Suggested tests
Run locally (and in CI) in roughly this order:
- Dependency + import sanity
poetry installpoetry run python test_import.py
- Core functional scripts
poetry run python minimal_test.pypoetry run python comprehensive_test.py
- Codegen drift
poetry run python generator/generate.pygit diff --exit-code cdp
- Packaging
poetry build
Verification checklist (for the first PR implementing this direction):
-
ci.ymlruns on PRs and onmasterpushes - A failing script/test produces a clear log and non-zero exit
- Codegen job fails when
cdp/changes and uploadscdp/artifact -
.bish-*and*~are ignored and CI blocks them if reintroduced -
poetry buildsucceeds on at least one Python version (ideally all in matrix)