Repository navigation
ci: add an AI changelog impact review to the framework release watch #1067
Description
Part of #1065.
Summary
Add an ai-review job to framework-release-watch.yml. For each new release it reads the upstream release notes against the adapter code that release could affect, and produces a short impact summary: which symbols, kwargs and classes we touch that the release changes, deprecates or removes, a risk rating, and a recommended action. The alert job embeds the summary in the framework-release issue.
Motivation
The isolated tests from #1066 answer "does it break us today?". They don't catch deprecations that will break us one release later, or behaviour changes our tests don't cover. Every shallow adapter is only signature-confirmed (BG §1.8, section 8 of docs/verified-apis.md), so a changelog read is the cheapest early warning available.
Depends on
- ci: detect new framework releases and test each one in isolation against the PR lock #1066 — the workflow, matrix and issue body this job plugs into
Current behavior (verified)
- No workflow calls an LLM. No workflow uses
anthropics/claude-code-actionor anANTHROPIC_API_KEYsecret. - What a given adapter touches is defined by:
- its module,
python/src/donkey_kit/integrations/<fw>.py - its
FRAMEWORKSrow (verify_frameworks.py:70) - its rows in
docs/verified-apis.mdsection 8 (verified-apis.md:649), §8.1 (:682) and section 8.2 (:715)
- its module,
Proposal
-
Job shape: a new
ai-reviewjob, one leg per release in ci: detect new framework releases and test each one in isolation against the PR lock #1066'sdetectmatrix. It runs in parallel withevaluate, withfail-fast: falseandtimeout-minutes: 15. -
Action and model:
anthropics/claude-code-action, pinned by full commit SHA (in line with ci(security): harden the Actions supply chain — SHA pins, Dependabot, CODEOWNERS, least-privilege Pages #757), usingclaude-sonnet-5-5. -
Prompt inputs:
- the package and both versions
release_notes_urland the GitHub compare URL (<repo>/compare/v<locked>...v<latest>when the source is on GitHub)- the adapter module, its
FRAMEWORKSrow, and its section 8, §8.1 and 8.2 rows
-
Output: a fixed markdown block:
- Risk (
none/low/high) - Affected symbols (each with an upstream citation)
- Recommended action (
bump/adapt adapter/record §8.1/watch) - Confidence
The block is uploaded as an artifact, and
alertfrom ci: detect new framework releases and test each one in isolation against the PR lock #1066 embeds it under "Impact review (AI, advisory)". - Risk (
-
Prompt-injection hardening. Release notes are untrusted input.
permissions: contents: readonly, and no token with write access in the job.- Allowed tools:
Read,Grep,Glob,WebFetch. NoBash, no edit or write tools. - The prompt tells the model to treat fetched content as data.
- The job never comments or writes itself; only
alertwrites.
-
§0.3: the summary is advisory. It never flips a section 8 row and never counts as verification. The issue body says so.
-
Secret scoping: a dedicated
ai-reviewenvironment. The key lives as an environment secret, not a repository secret, so only the job that declaresenvironment: ai-reviewcan read it. This mirrors howlive-sandboxscopes the proxy credentials (live-contract-check.yml).- Create the environment
ai-reviewwith a deployment branch policy that allows onlydevelop, the default branch, wherescheduleandworkflow_dispatchruns execute. This is the same rulelive-sandboxuses. - Move the secret. Add
ANTHROPIC_API_KEYas an environment secret onai-review, then delete the repository-levelANTHROPIC_API_KEYthat was set on 2026-10-10 as a stopgap, so no other workflow can read it. - The job declares
environment: ai-reviewand runs only onscheduleandworkflow_dispatch(if: github.event_name != 'pull_request'). PR dry runs skip it instead of being rejected by the branch policy, and PR-authored workflow changes can never reach the key. - No reviewer gate. Leave required reviewers unset, so the daily scheduled run isn't blocked waiting for approval.
- Create the environment
-
Secret handling: if the secret is missing, or the action fails, the job emits a notice and
alertwrites "impact review unavailable"; the watch itself stays green. -
Cost bound: at most one review per (package, version), with results cached by artifact name, so a re-run of an unchanged release doesn't call the model again.
Cross-surface impact
- core/llm/registry/tools/integrations: not affected. It reads adapter code; it doesn't change it.
- TypeScript parity (planned): not affected. The same job can review npm releases once the TS port exists.
- CLI: not affected.
- Nextra docs site: not affected.
- docs/verified-apis.md: read only, never edited (§0.3).
- Repo settings: a new
ai-reviewenvironment (develop-only branch policy) holdingANTHROPIC_API_KEY, with the stopgap repository secret removed. The repository Actions policy already allows the third-party action.
Out of scope
- Letting the model open PRs or edit code.
- Reviewing non-framework dependencies (dev tools,
openaion its own). Add them later if useful.
Acceptance criteria
- The action is pinned by SHA, and the job has only
contents: readand the read-only tool allowlist. - A dispatch run on a release with a documented break produces
Risk: highand names the right symbols. Use the openai 3.0.0 or anthropic 1.0.0 change recorded in §8.1. - A dispatch run on a patch release with no API change produces
Risk: noneorlow. -
ANTHROPIC_API_KEYexists only as anai-reviewenvironment secret.gh secret list --repo Donkey-Development-Kit/donkey-development-kitno longer shows it at repository level, andgh secret list --env ai-reviewdoes. -
ai-reviewdeclaresenvironment: ai-review, is skipped onpull_request, and the environment's branch policy allows onlydevelop. - Add a test to
tests/unit/test_ci_workflows.py:ai-reviewis the only job in any workflow that declaresenvironment: ai-review, and it never runs onpull_request. - With the secret removed, the watch run is still green and the issue says "impact review unavailable".
- The
docs/ci.mdsection from ci: detect new framework releases and test each one in isolation against the PR lock #1066 documents the job, the secret and the advisory status.
Activity
tommasobolis commentedon Oct 10, 2026
Prerequisites done (2026-10-10):
ANTHROPIC_API_KEYrepository secret is set (updated 2026-10-10T20:51Z).allowed_actions: all, soanthropics/claude-code-actionis allowed. Still pin it by full SHA, per ci(security): harden the Actions supply chain — SHA pins, Dependabot, CODEOWNERS, least-privilege Pages #757.The job should still skip cleanly when the secret is missing (forks, and any future rotation gap), as the acceptance criteria require.
tommasobolis commentedon Oct 11, 2026
Scope change: the key moves from a repository secret to a dedicated
ai-reviewenvironment, restricted todevelop(the same pattern aslive-sandbox), so only theai-reviewjob can read it. The repository-levelANTHROPIC_API_KEYset on 2026-10-10 is a stopgap and gets deleted once the environment secret exists. Proposal and acceptance criteria are updated.tommasobolis commentedon Oct 11, 2026
Secret setup is done (2026-10-11):
ai-reviewenvironment exists, with a branch policy that allows onlydevelop(same aslive-sandbox) and no required reviewers.ANTHROPIC_API_KEYis anai-reviewenvironment secret (updated 2026-10-11T11:51Z).ANTHROPIC_API_KEYis deleted. The repo now has no repository secrets.Repo settings for this issue are complete. Implementation can start once #1066 lands.
tommasobolis commentedon Oct 12, 2026
Fixed by #1112 (merged as f88dbe8).