-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Last generated: 2026-01-13T06:38:57.410Z
Provider: openai
Model: gpt-5.2
Summary
This repo recently gained a large set of org-synced GitHub workflows, but it still lacks a clear, repo-specific “automation contract” for: (1) how code is generated, (2) what CI must run and gate merges, and (3) how to keep generated output and protocol versions reproducible. Direction: tighten and simplify automation around generation + minimal CI gates, while reducing noise/cost from duplicated/overlapping workflows.
Direction (what and why)
-
Make generation reproducible and verifiable in CI
- This repository’s core artifact is generated (
cdp/fromgenerator/). The main source of toil and drift is “generated code not matching the generator inputs/protocol version”. - Add a single, deterministic “regen check” job that fails if
git diffshows unstaged changes after running generation.
- This repository’s core artifact is generated (
-
Establish minimal merge gates (fast + stable)
- Current repo has many automation workflows synced from elsewhere; they don’t necessarily guarantee basic health (install, import, typecheck) on the actual supported Python versions.
- Add/ensure a small, stable CI matrix:
poetry install,python -m compileall,pytest(or existing tests),mypyif used.
-
Reduce workflow overlap and runtime cost
- There are multiple playwright loop workflows and auto-review workflows; these can generate noise and burn Actions minutes.
- Keep the org-required ones, but add repo-level guardrails: path filters, concurrency, and explicit “CI” workflow as the authoritative gate.
Plan (next 1–3 steps)
1) Add a repo-specific automation contract + make generation check explicit
Add AUTOMATION.txt at repo root with:
- Supported Python versions for CI
- Canonical commands for:
- install:
poetry install - generate:
poetry run python generator/generate.py(or whatever is correct) - tests:
poetry run pytest(orpython -m unittestif that’s what’s used) - typecheck:
poetry run mypy ...if applicable
- install:
- “Generated code must be up to date” policy (regen check in CI)
Concrete file: AUTOMATION.txt
2) Create a single “ci.yml” that gates merges and includes regen drift detection
Add a workflow that runs on PRs and pushes to master, with:
actions/checkout@v4actions/setup-python@v5for a small matrix (e.g.3.10,3.11,3.12)- Install via Poetry (cache enabled)
- Run:
poetry run python -m compileall cdp generatorpoetry run python -m pip check(optional but quick)poetry run python generator/generate.pythengit diff --exit-code(regen check)poetry run pytest -q(or run existing test scripts if pytest isn’t used)poetry run mypy -p cdp(only if mypy is part of current expectations;mypy.iniexists)
Concrete file: .github/workflows/ci.yml
Also add concurrency to prevent redundant runs:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true3) Add path filters / guardrails to reduce noisy automation runs
For heavy or non-essential workflows (especially the playwright loop variants), add:
on.pull_request.pathsfilters so they don’t run when only docs/markdown change- or
if:guards so they only run on schedule / manual dispatch
Concrete targets (pick the worst offenders first):
.github/workflows/auto-copilot-org-playwright-loop*.yml*.github/workflows/auto-copilot-playwright-auto-test.yml.github/workflows/auto-copilot-test-review-playwright.yml
If you can’t modify org-synced workflows safely, add a repo-level convention: only the new ci.yml is required for branch protection, and the rest are informational.
Risks/unknowns
- Generator command/options: I’m assuming
generator/generate.pyis the canonical entrypoint and writes tocdp/. If it requires inputs (e.g., protocol JSON download), the regen check must pin versions and/or cache artifacts. - Test framework: There’s a
test/folder and multiple*_test.pyscripts at root; may not be pytest-ready. If pytest isn’t used, CI should run the existing scripts deterministically (e.g.,python test_import.py,python minimal_test.py). - Poetry vs pip:
pyproject.toml+poetry.locksuggests Poetry is canonical; ensure CI uses Poetry consistently (not both pip and poetry). - Large binary in repo:
bfg-1.15.0.jaris big; can slow checkouts and scans. Not an automation blocker, but worth revisiting.
Suggested tests
Run locally and in CI:
-
Install + import sanity
poetry installpoetry run python -c "import cdp; print('ok')"
-
Generation drift check
poetry run python generator/generate.pygit diff --exit-code
-
Existing repo tests
- If pytest is viable:
poetry run pytest -q - Otherwise run the existing scripts:
poetry run python test_import.pypoetry run python minimal_test.pypoetry run python simple_test.py- (optional)
poetry run python comprehensive_test.pyif stable
- If pytest is viable:
-
Static checks
poetry run python -m compileall cdp generatorpoetry run mypy -p cdp(only if it passes today; otherwise add incrementally)
Progress verification checklist
-
AUTOMATION.txtexists and matches actual commands used by contributors -
.github/workflows/ci.ymlruns on PRs and is set as a required status check - CI fails if generated code is out of date (regen drift)
- CI completes in a predictable time (path filters/concurrency reduce redundant runs)
- At least one test/import check runs successfully across the chosen Python matrix