From 43c1f2ceef2e18697c8e6b656facea6092c8a6f4 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 4 Nov 2026 09:56:14 +0000 Subject: [PATCH 1/2] ci: review pull requests against the API client, Crawlee and the JS SDK `.github/review-references.yaml` names apify-client-python, crawlee-python and apify-sdk-js as the repositories the apify-factory review compares a pull request with, and what to compare in each. The stub pins the ai-developer branch that drafts the feature while it is evaluated. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_017ocuAL43YR6VPaBRrRfBbL --- .github/review-references.yaml | 34 +++++++++++++++++++++++++++ .github/workflows/factory_review.yaml | 5 ++++ .rules.md | 4 ++++ 3 files changed, 43 insertions(+) create mode 100644 .github/review-references.yaml diff --git a/.github/review-references.yaml b/.github/review-references.yaml new file mode 100644 index 00000000..c3cfb7c2 --- /dev/null +++ b/.github/review-references.yaml @@ -0,0 +1,34 @@ +# Cross-repository references for the apify-factory review (apify/ai-developer, `review-references`). +version: 1 + +instructions: | + This repository is the Apify SDK for Python, the library for building Actors in Python. It is built + on the Python API client and on Crawlee for Python, and it mirrors the Apify SDK for JavaScript. For + every behaviour the pull request adds or changes, check three things: that it uses the API client's + methods, models and exceptions as they are (the SDK defines none of its own), that it fits the + Crawlee interface it builds on, and that it matches what the JS SDK does for the same operation + (ignore differences caused by different language idioms and style). Back every finding with the + reference file and line; the review links them to the commit it read. + +references: + - repository: apify/apify-client-python + instructions: | + The API client this SDK calls. Resource clients live under `src/apify_client/_resource_clients/`, + the request pipeline in `src/apify_client/http_clients/`, exceptions in `src/apify_client/errors.py` + and the response models in `src/apify_client/_models.py`. Compare every client call the pull + request makes or changes with the method it calls: parameters, defaults, return shape, exceptions. + - repository: apify/crawlee-python + instructions: | + The framework this SDK extends. `Configuration` is in `src/crawlee/configuration.py`, the storage + client interfaces in `src/crawlee/storage_clients/_base/` with their models in + `src/crawlee/storage_clients/models.py`, storages in `src/crawlee/storages/`, events in + `src/crawlee/events/`, request loaders in `src/crawlee/request_loaders/`, the service locator in + `src/crawlee/_service_locator.py`. Compare what the pull request implements or overrides with the + interface or base class it builds on. + - repository: apify/apify-sdk-js + instructions: | + The JS SDK this one mirrors: `src/actor.ts`, `src/configuration.ts`, `src/charging.ts`, + `src/child_run_tracker.ts`, `src/proxy_configuration.ts`, `src/platform_event_manager.ts` and the + storage backends `src/apify_*_backend.ts` and `src/smart_apify_storage_backend.ts`. Compare the + changed Python behaviour with its JS counterpart: parameters and defaults, what it returns, and how + it handles errors. diff --git a/.github/workflows/factory_review.yaml b/.github/workflows/factory_review.yaml index f7552195..d6195e29 100644 --- a/.github/workflows/factory_review.yaml +++ b/.github/workflows/factory_review.yaml @@ -3,6 +3,9 @@ name: apify-factory review (AI review, and auto-approval) # Calls the apify-factory review and auto-approval pipeline (apify/ai-developer, wired up in # apify/workflows). Approvals additionally need the repository's `factory_auto_approve` custom # property set to true. +# +# `.github/review-references.yaml` names the repositories the reviewer compares a pull request with +# (the Python API client, Crawlee for Python, the JS SDK); the pipeline reads it from the base branch. on: # Taken from the default branch, never from the pull request, so a pull request cannot rewrite # its own review pipeline. Pull request code is never checked out or executed. @@ -25,6 +28,8 @@ jobs: # Paths never auto-approved here, on top of the pipeline's defaults. Proposed from the # repository's layout when this workflow was added; edit them like any other code. with: + # The draft of the cross-repository references, under evaluation. Back to `main` once it lands. + ai-developer-ref: claude/review-references policy: | { "denyGlobs": [ diff --git a/.rules.md b/.rules.md index a91d9d86..092892f5 100644 --- a/.rules.md +++ b/.rules.md @@ -27,3 +27,7 @@ Don't introduce a shared Pydantic base model to centralize `model_config`. Each - **Events** — `ApifyEventManager` receives platform events over a WebSocket. - **Errors** — `apify.errors` only re-exports the exceptions from `apify_client.errors`; the SDK defines no error classes of its own, and API calls raise the client exceptions unchanged. - Response and data models (`Run`, pricing info, webhook representations) come from `apify-client`; the SDK doesn't define its own. The platform env-var enums (`ApifyEnvVars`, `ActorEnvVars`) live in `apify._consts`. + +### Additional context + +The code in this repository is based on and integrated with code from other repositories. The most important references are defined in [review references](./.github/review-references.yaml). From 0bbee2569944fe0941696a9fc04bf1ceb48b6064 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 4 Nov 2026 10:47:50 +0000 Subject: [PATCH 2/2] ci: drop the location hints from the review references Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_017ocuAL43YR6VPaBRrRfBbL --- .github/review-references.yaml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/review-references.yaml b/.github/review-references.yaml index c3cfb7c2..0df75a0c 100644 --- a/.github/review-references.yaml +++ b/.github/review-references.yaml @@ -13,22 +13,14 @@ instructions: | references: - repository: apify/apify-client-python instructions: | - The API client this SDK calls. Resource clients live under `src/apify_client/_resource_clients/`, - the request pipeline in `src/apify_client/http_clients/`, exceptions in `src/apify_client/errors.py` - and the response models in `src/apify_client/_models.py`. Compare every client call the pull - request makes or changes with the method it calls: parameters, defaults, return shape, exceptions. + The API client this SDK calls. Compare every client call the pull request makes or changes with + the method it calls: parameters, defaults, return shape, exceptions. - repository: apify/crawlee-python instructions: | - The framework this SDK extends. `Configuration` is in `src/crawlee/configuration.py`, the storage - client interfaces in `src/crawlee/storage_clients/_base/` with their models in - `src/crawlee/storage_clients/models.py`, storages in `src/crawlee/storages/`, events in - `src/crawlee/events/`, request loaders in `src/crawlee/request_loaders/`, the service locator in - `src/crawlee/_service_locator.py`. Compare what the pull request implements or overrides with the - interface or base class it builds on. + The framework this SDK extends: configuration, storage clients and their models, storages, events, + request loaders, the service locator. Compare what the pull request implements or overrides with + the interface or base class it builds on. - repository: apify/apify-sdk-js instructions: | - The JS SDK this one mirrors: `src/actor.ts`, `src/configuration.ts`, `src/charging.ts`, - `src/child_run_tracker.ts`, `src/proxy_configuration.ts`, `src/platform_event_manager.ts` and the - storage backends `src/apify_*_backend.ts` and `src/smart_apify_storage_backend.ts`. Compare the - changed Python behaviour with its JS counterpart: parameters and defaults, what it returns, and how - it handles errors. + The JS SDK this one mirrors. Compare the changed Python behaviour with its JS counterpart: + parameters and defaults, what it returns, and how it handles errors.