Skip to content

feat!: v1 transition - #252

Open
metalwarrior665 wants to merge 32 commits into
masterfrom
ccr-86660633-vf05vg
Open

metalwarrior665 wants to merge 32 commits into
masterfrom
ccr-86660633-vf05vg

Conversation

@metalwarrior665

@metalwarrior665 metalwarrior665 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Collects the breaking changes and fallback removals for v1 of the package and the workflows. Draft until the open items below are done. Master is frozen for the launch and fully merged in here. Merge this one last, then release 1.0.0 right away (see "Merge and release").

Supersedes #183. Closes #149, #35, #44, #111.

Consumer repos migrate with docs/migrating-to-v1.md.

Done so far

  • The CLI requires lib 1.0.0 (feat(cli-test)!). test no longer writes the Actor IDs a second time as actorName/actorId, sets RUN_PLATFORM_TESTS or removes RUN_ALL_PLATFORM_TESTS. The report reads a run's Actor only from meta.actorId. A repository whose installed lib is older than OLDEST_SUPPORTED_LIB_VERSION (now 1.0.0) fails with an error. Pre-releases like 1.0.0-beta.3 pass. The old-lib dev dependency aliases and their tests are gone. test/bundle/old-libs.test.ts checks that the bundle refuses 0.11.0 and runs 1.0.0.

  • The lib has an exports map (feat(lib)!). Only . (dist/index.js) and ./package.json are exported, so RunTestResult is reachable at runtime, it, testTestActor and _private aren't public, and deep imports of dist/... stop working. run({ input }) is typed as T instead of Omit<T, 'actorName'>.

  • The CLI calls itself apify-test-tools in its help instead of public-actors-utils.

  • workflows-v1 (ci!). MAJOR_TAG is workflows-v1, and the usage examples in the README, docs and workflows name it.

  • The config requires "mode": "grouped" (feat(config)!). The legacy mode is removed, and a config without mode fails the parser's own check.

  • tokenEnvVar is now buildTokenEnvVar (feat(config)!), on groups and Actors, so it reads apart from testTokenEnvVar, which defaults to it. get-actor-configs prints the new name. A config that still has tokenEnvVar fails with tokenEnvVar is renamed to buildTokenEnvVar, so an Actor's own token can't be dropped silently in favour of its group's. The Slack tokenEnvVar of notify is unrelated and stays.

  • fetchServer(path, init?) (feat(lib)!), formerly callServerInterface: a fetch for the Actor's server interface. It takes fetch's own options and returns the Response, so a test can send any method, query string, body or header, with nothing new to learn. It resolves the path against the server interface's URL and, unless init sets them, adds Authorization with the Actor's test token and X-Actor-Build with the build under test (none on the default build).

  • The CLI rejects unknown flags and arguments (feat(cli)!), instead of ignoring a flag a later version renamed or removed.

  • The test report names a run's Actor actorFullName (feat(cli)!), instead of actorId, which held the full name anyway. The report's version is 2, which notify requires.

  • testTokenEnvVar is required on every group (feat(config)!), with no default to the build token. An Actor can still override it. The two tokens need different permissions, so each repo now chooses what its test code holds. A group without it fails with testTokenEnvVar is required. See the token permissions in the README: ….

    • The README has a new Token permissions section. buildTokenEnvVar needs a full-permission token, for now. For testTokenEnvVar, server interface tests need a full-permission token of the owner or of an account with write access, since a scoped token can't get write access to an Actor on its own. Other tests can use a scoped token with run access to the repo's Actors.
    • The sentence on who can call a server interface on a build other than the default one is in bold, in the README and in the migration guide.
    • The migration guide's step 3 is now Choose the test token: the owner's token, as in the converted config, or TESTER_APIFY_TOKEN as before. It has the same permissions section and a troubleshooting row for the new error.
  • The tokens come only from CONFIG_SECRETS (feat(workflows)!). The token wrapper no longer falls back to the workflow's other secrets, so secrets: inherit doesn't pass the build and test tokens any more. The build, test and delete-old-builds steps get CONFIG_SECRETS alone instead of toJSON(secrets), so no other secret of the workflow reaches them. The migration guide drops the secrets: inherit path: every job lists its secrets by name. A caller can still pack its own toJSON(secrets) into CONFIG_SECRETS, which the docs keep as an opt-in with its trade-off.

  • Tests name their Actor by full name only (feat!).

    • testActor and testStandbyActor throw on anything but owner/name, so a test naming its Actor by raw ID fails its file instead of being skipped without a word. The lib matches ACTOR_BUILDS by actorFullName only.
    • test takes its Actors by full name only and looks up no raw IDs. The lib gets actorFullName, buildId, buildNumber and testTokenEnvVar.
    • The full-name regex moved into lib/consts.ts, and the config parser re-exports it.
  • vitest 5 (feat(lib)!).

    • The peer range is vitest >=5.0.0, and engines is ^22.12.0 || ^24.0.0 || >=26.0.0, the Node.js versions vitest 5 runs on.
    • The soft expect wrapper and the matcher typings are ported from chore(vitest): update to vitest 5 #183.
    • This repo runs its tests on vitest 5.0.5. That needed esbuild 0.28.2 (still pinned exactly), which vite 8 requires.
    • Vitest doesn't exclude dist by default, and test's folder filters matched a compiled dist/test/platform/*.test.js copy, which then ran too. I checked this on vitest 5. test passes --exclude=**/dist/** on top of the repo's own excludes, and the fixture in test-cli.test.ts has a dist copy that must not run.
  • The docs, comments and error messages describe only the v1 behaviour (docs:). No mentions of workflows-v0, earlier config formats or lib versions, except in the migration guide.

  • Master merged in, with feat: add per-Actor test tokens support - enables server mode testing #240, fix: use actor.json links for change detection and changelogs #232, fix(test/cli-compile): handle SIGTERM SIGINT etc without leaving trash behind #250 and feat(workflows): skip rebuilds for test-only changes on PRs #241.

    • withTestTokens hands each Actor the env var of its test token, with the same warnings, but looks up no raw IDs. So it makes no API calls, and test/helpers/fake-apify-api.ts is gone.
    • The actorBuildsVersion check and the apifyTestTools field in package.json are dropped. The 1.0.0 minimum covers it: every lib 1.0.0 or newer reads testTokenEnvVar.
    • feat(workflows): skip rebuilds for test-only changes on PRs #241 added no shims for older libs. Its stored builds keep actorRawId, only to check that a reused build belongs to its Actor.
  • Master merged in again, with feat: target standby builds directly with X-Actor-Build #233, feat(workflows): record who humanizes new investigate-and-fix issues #253, fix(get-affected-actors): accept refs such as HEAD~1 in --since #258, fix(get-affected-actors): match file entries in overrideActorContext #259, ci: read the service account token from a repository environment #261 and feat(lib): rename standby to server interface #263.

  • No TESTER_APIFY_TOKEN fallback (feat!).

    • The lib runs an Actor's tests only with the token in the env var ACTOR_BUILDS names for it. It fails only that Actor's tests when it names none or the variable isn't set.
    • describe runs when ACTOR_BUILDS lists any Actors. test warns that the tests of an Actor without its token will fail.
    • public_pr-build-test.yaml and public_platform-tests.yaml no longer declare or pass TESTER_APIFY_TOKEN: the test tokens come in CONFIG_SECRETS.
    • The Claude investigation workflow keeps its own TESTER_APIFY_TOKEN secret, which it uses to read and re-run the failed run.
    • Also fixed the README link to testStandbyActor, whose anchor changed with actorFullName.
  • toFinishWith (feat(lib)!).

    • The statistics checks read every crawler's statistics by default: every record under SDK_CRAWLER_STATISTICS_ or CRAWLEE_CRAWLER_STATISTICS_ (the first 1,000 keys under each prefix), summed, so an adaptive crawler or several crawlers need no setting. statisticsKeys still picks records explicitly. A run without any record fails the checks that need them, naming both prefixes, so an Actor without crawler statistics must set failedRequests: null; the README, the lib docs and the migration guide say so. The statistics are only fetched when a check needs them.
    • getStatistics(keys?) reads them the same way: summed over every crawler's record, or only the keys given, undefined for a run without any. It returns the counters that add up across crawlers (requestsFinished, requestsFailed, requestsRetries, the merged requestRetryHistogram, maxRetriesPerRequest, the total durations), not the raw record, and throws MissingStatisticsError for a given key the run lacks.
    • duration and requestsRetries have no default: they're checked only when set.
    • forbiddenLogs take strings and regular expressions, matched per log line. The defaults, /\bReferenceError: / and /\bTypeError: /, match the error the way JavaScript prints it, not the word in prose or in a longer name. A failure quotes up to three offending lines.
    • chargedEventCounts checks only the events listed, and an event that was never charged counts as 0, so 0 asserts it wasn't. strictChargedEventCounts: true also fails on any charged event that isn't listed.
  • Migration guide (docs:). docs/migrating-to-v1.md takes a repo through the change in one PR:

    • the packages;
    • the grouped config, with before and after;
    • the workflow tag and secrets, with before and after;
    • the tests: full Actor names, root imports and toFinishWith;
    • the CLI, for those who run it themselves;
    • a table of the errors to expect, each with its fix.

    The README links it.

Still to do here

  • After feat: target standby builds directly with X-Actor-Build #233 lands: merge master in. Done, together with feat(lib): rename standby to server interface #263.
  • After each master merge, check that it didn't bring back mentions of workflows-v0 or of earlier behaviour outside the migration guide.
  • apify-store/testing-repo-for-github-actions: its e2e/base and e2e/feature branches now commit a grouped config with buildTokenEnvVar and testTokenEnvVar: one commit on e2e/base, with the fixture commit of e2e/feature rebased on top. E2E passes.
  • delete-old-builds no longer deletes a devel-tagged build after 7 days: it gets the same 30 days as any other non-default, unprotected build. So whether an Actor still has the tag no longer matters.

After the launch, these would break workflows-v1 callers, so each needs to keep working for them or wait for workflows-v2:

Not v1-gated, because they add things without breaking anything: #128/#129, #138, #159, #137, #243, #245, #136. #245 makes the same main/exports change as this PR, so its rebase drops that part. #251 isn't needed: this PR replaces it with full-name-only.

Merge and release

  1. Merge this PR. The master push moves workflows-v1 to it.
  2. Right away, run Stable release with major to publish 1.0.0. Until then, @workflows-v1 refuses every published lib, but no repository calls it yet.
  3. Migrate each consumer repo in one PR, following docs/migrating-to-v1.md.

Testing

  • npm test on vitest 5, after the last master merge and the later changes: 662 passed, 1 expected fail (the existing it.fails for jsonc), 3 skipped, with the pre-commit hook (typecheck, lint, format, bundle) passing.
  • New tests:
    • the bundled test refuses lib 0.11.0 and runs 1.0.0;
    • the config rejects tokenEnvVar on a group and on an Actor, naming buildTokenEnvVar;
    • the config rejects a group without buildTokenEnvVar or testTokenEnvVar, and the test token never falls back to the build token;
    • a test that names its Actor by raw ID fails its file through the real lib;
    • a dist copy of the tests doesn't run;
    • the per-Actor token tests from feat: add per-Actor test tokens support - enables server mode testing #240, by full name and without the fallback. An Actor with no token, or whose token isn't set, fails only its own tests;
    • checkRun:
      • one or several statistics records, or a missing one;
      • finding every statistics record under both prefixes and summing them, and failing when there's none;
      • no statistics fetch when no check needs it;
      • the default forbidden logs against prose and longer names;
      • quoting of the offending lines;
      • the event checks with and without strict mode.
  • Checked by hand that import 'apify-test-tools' resolves through the exports map and apify-test-tools/dist/lib/lib.js is refused with ERR_PACKAGE_PATH_NOT_EXPORTED.
  • The e2e suite was not run locally: it needs the sandbox token.

https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu


Generated by Claude Code

…shims

`test` no longer writes the Actor IDs a second time as `actorName`/`actorId`, sets `RUN_PLATFORM_TESTS` or
removes `RUN_ALL_PLATFORM_TESTS`, and the report reads the Actor of a run only from its `meta.actorId`. A
repository whose installed lib is older than 1.0.0 now fails with an error instead of a warning, because an
older lib could skip every test while the run passes. `workflows-v0` keeps the shims for those repositories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
`main` pointed at `dist/lib/lib.js` while `types` pointed at `dist/index.d.ts`, so at runtime the package
exported `it`, `testTestActor` and `_private`, and `RunTestResult`, documented as exported, wasn't reachable.
The package now exports `.` from `dist/index.js` only, so deep imports of `dist/...` stop working. Also drops
the `it` alias of `testActor`, types `run({ input })` as the Actor's input type without omitting
`actorName`, and gives the package a description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
…-actors-utils

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
Master pushes now move `workflows-v1`, and `workflows-v0` freezes at the last commit before this one, with the
CLI that still supports libs older than 1.0.0. The usage examples in the README, docs and workflows name the
new tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
A config is read only as `"mode": "grouped"`. The flat format, a top-level `actors` array with no `mode`, fell
back to the `legacy` strategy. It now fails with an error that points at the grouped format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
`testActor` and `testStandbyActor` take the Actor's full name, `owner/name`. Any other ID, like a raw Actor ID,
throws when the test is defined, so its file fails to load instead of the test being skipped without a word.
The lib matches `ACTOR_BUILDS` by `actorFullName` only.

`test` takes its Actors by full name only. It no longer looks up the raw ID of each Actor with
`TESTER_APIFY_TOKEN`, so `bin/actor-ids.ts` is gone, and it passes the lib only `actorFullName`, `buildId` and
`buildNumber`. The full-name regex moved into the lib, and the config parser re-exports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
The lib's peer range is `vitest >=5.0.0` and the package needs the Node.js versions vitest 5 runs on (22.12+, 24
or 26+). Ports the soft `expect` wrapper and the matcher typings to vitest 5's `Assertion` from #183. The repo's
own tests run on vitest 5.0.5, with esbuild 0.28.2, which vite 8 needs.

Vitest 4 and newer no longer exclude `dist` by default, and `test`'s folder filters match a compiled copy like
`dist/test/platform/a.test.js` too, so `test` passes `--exclude=**/dist/**`, on top of the repository's own
excludes. This repo's vitest config excludes `dist` and the CLIs compiled for its tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
Drops the mentions of `workflows-v0`, of the config format and lib versions before 1.0, and of what vitest
used to exclude, from the docs, comments and error messages. A config without `mode` gets the parser's own
error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
claude and others added 16 commits November 16, 2026 18:31
Brings in per-Actor test tokens (#240), actor.json links for change detection (#232) and the CLI compile
cleanup (#250). Resolved for v1:

- `test` hands each Actor its test token, but looks up no raw IDs: tests name their Actor by full name only.
  `withTestTokens` makes no API calls, so the fake Apify API the tests used is gone.
- The `actorBuildsVersion` check and the `apifyTestTools` field in package.json are dropped: `test` refuses
  any lib older than 1.0.0, which reads `testTokenEnvVar`.
- The legacy config mode stays removed, and the old-lib tests #240 extended stay replaced.
- The lib keeps the `TESTER_APIFY_TOKEN` fallback for now. The docs describe it without the "for now" and
  "as before" wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
Removes the `TESTER_APIFY_TOKEN` fallback. The lib runs an Actor's tests with the token in the env var
`ACTOR_BUILDS` names for it, and fails only that Actor's tests when it names none or the variable isn't
set. `describe` runs when `ACTOR_BUILDS` lists any Actors. `test` warns that those tests will fail.

The PR and scheduled test workflows no longer declare or pass `TESTER_APIFY_TOKEN`: the test tokens come
in `CONFIG_SECRETS`. The Claude investigation workflow keeps its own `TESTER_APIFY_TOKEN` secret, which
reads and re-runs the failed run.

Also fixes the README link to `testStandbyActor`, whose anchor changed with `actorFullName`.

Closes #149

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
Brings in skipping rebuilds for test-only changes on PRs (#241). Only the CLI bundle conflicted, rebuilt.
A comment on the stored builds no longer mentions an older format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
- `statisticsKeys` names the key-value store record, or records, with the crawler statistics, by default
  `SDK_CRAWLER_STATISTICS_0`. With several, e.g. for an adaptive crawler or a run with more than one
  crawler, the checks read their sum. A missing record fails the checks that need it and names the key.
  The statistics are only fetched when a check needs them. `getStatistics(key?)` reads any record.
- `duration` and `requestsRetries` have no default: they are checked only when set.
- `forbiddenLogs` take strings and regular expressions, matched per log line. The defaults match a
  `ReferenceError` or `TypeError` the way JavaScript prints one, not the word in prose or in a longer
  name. A failure quotes up to three offending lines.
- `chargedEventCounts` checks only the events listed, and an event that was never charged counts as 0.
  `strictChargedEventCounts: true` also fails on any charged event that isn't listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
docs/migrating-to-v1.md walks a repository from `@workflows-v0` and a library before 1.0 to v1, in one PR:
the packages, the grouped config, the workflow tag and secrets, the tests (full Actor names, root imports,
`toFinishWith`), the CLI for those who run it themselves, and a table of the errors to expect with their
fixes. The README links it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
Internal repositories pass `secrets: inherit`, so the guide leads with it: the tag is the only workflow change,
the repository needs a secret under each name the config uses, and a leftover `TESTER_APIFY_TOKEN` does no harm.
It also covers the catch: the investigation workflow then gets the repository's `TESTER_APIFY_TOKEN`, which must
be of the account the tests ran with. Secrets listed by name stay as the second way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
A new section says that before v1 every test ran with `TESTER_APIFY_TOKEN`, and that v1 runs each Actor's
tests with its `tokenEnvVar` by default, so the runs move to the owner's account without any error. It shows
how to keep `TESTER_APIFY_TOKEN`: `testTokenEnvVar` on every group, plus the secret in `CONFIG_SECRETS` when the
secrets are listed by name. It replaces the shorter "on purpose" subsection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
Brings in #233, #253, #258, #259 and #261. testStandbyActor takes the
Actor's full name, its docs drop the note about temporary tasks, and the
migration guide covers the standby changes. The e2e test that runs the
oldest supported lib with raw IDs stays removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
Brings in #263. testServerInterfaceActor takes the Actor's full name, and
the deprecated testStandbyActor alias is removed for v1, with its e2e
test. The migration guide shows the rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
…ilds

A build tagged devel is now deleted after 30 days like any other
non-default, unprotected build. The PR workflows stopped building under
devel long ago.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
The token that builds an Actor now reads apart from testTokenEnvVar,
which defaults to it. The config takes buildTokenEnvVar on groups and
Actors, and get-actor-configs prints it. A config that still has
tokenEnvVar fails with an error naming the new field, so an Actor's own
token is never dropped in favour of its group's. The migration guide
covers the rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
The test token no longer defaults to the build token. The two need
different permissions: the build token a full-permission one, the test
token only run access to the repo's Actors, unless the tests call a
server interface on a PR build. Requiring it makes each repo choose what
its test code holds. A group without it fails with an error that points
to the new Token permissions section of the README. The migration guide
covers the choice, and both stress who can call a server interface on a
build other than the default one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
The token wrapper no longer falls back to the workflow's other secrets,
so secrets: inherit doesn't pass the build and test tokens any more.
The build, test and delete-old-builds steps pass CONFIG_SECRETS alone
instead of toJSON(secrets), so no other secret of the workflow reaches
those steps. The migration guide drops the secrets: inherit path: every
job lists its secrets by name, with the tokens in CONFIG_SECRETS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
…oken

The token permissions lead with the requirement instead of an exception:
server interface tests need a full-permission token of the owner or of an
account with write access, other tests can use a scoped one. The config
table, the lib docs and the migration guide's TESTER_APIFY_TOKEN option
say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
Without statisticsKeys, the statistics checks list the run's key-value
store under SDK_CRAWLER_STATISTICS_ and CRAWLEE_CRAWLER_STATISTICS_, the
first 1,000 keys under each, and sum every record found. A run with
several crawlers, e.g. an adaptive one, needs no setting any more.
statisticsKeys still picks the records explicitly. A run without any
record fails the checks that need them, naming both prefixes, and the
docs say that an Actor without crawler statistics must set
failedRequests: null. RunTestResult gets getStatisticsKeys().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
@metalwarrior665
metalwarrior665 marked this pull request as ready for review November 26, 2026 19:36
The CLI only rejected unknown commands, so a flag a later version renamed
or removed was ignored without a word. Every command now fails on an
unknown flag or extra argument, with its help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
…port

The report's run.actorId held the Actor's full name. It is actorFullName
now, in the vitest task meta too, and the report's version is 2, which
notify requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
…nishWith does

getStatistics(keys?) sums the statistics of every record under
SDK_CRAWLER_STATISTICS_ and CRAWLEE_CRAWLER_STATISTICS_, or of the keys
given, and is undefined for a run without any. It returns the counters
that add up across crawlers, with the merged retry histogram and the
most retries per request, and throws MissingStatisticsError naming the
given keys the run lacks. toFinishWith reads the statistics through it.
getStatisticsKeys is internal again, and lists each key once even when
the listing ignores its prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
…e path, query and body

The function sends an HTTP request rather than calling an Actor, so its
name says that. It takes the request's path, query parameters, body,
method and headers instead of an input that was always the JSON body of
a POST. An object body goes as JSON; a string, Buffer, typed array,
ArrayBuffer, Blob, FormData or URLSearchParams as it is. The method is
POST with a body and GET without. The raw response text is now text,
so it doesn't read like the request's body. The e2e test sends JSON, a
raw body and a GET to the sandbox Actor's server interface.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
… the server interface

fetchServer(path, init?) takes fetch's own options and returns the
Response, instead of a request and response shape of its own. It keeps
what a test can't safely do itself: it resolves the path against the
server interface's URL, authenticates with the Actor's test token
unless init sets Authorization, and always selects the build under
test with X-Actor-Build, replacing one init sets, or sends none on the
default build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
…ization

Both headers are defaults now: the Actor's test token and the build
under test, which init can set itself. A test that sets X-Actor-Build
runs against that build, also on the default build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQsmuUu7Tv9c7DSAr1v
Stacked on #252: merge that first, then this one (or retarget it to
`master` once #252 is in). Docs only, no code changes.

The README and the four docs it links were checked claim by claim
against the code and the workflows, made simpler, and brought in line
with the Apify style guide.

## README

- The PR workflow needs only the `lint` and `test` scripts.
`build-check` is optional, with `tsc --noEmit` otherwise.
- A platform test runs when `test` passes its Actor: the PR build, or
the default build. There's no "all tests" mode.
- Only the affected Actors' tests run, and the CLI also tests what it
builds.
- The default version isn't `latest`, which is a build tag.
- The release and scheduled examples set `report-slack-channel`. Without
it they post nothing to Slack.
- The example PR workflow is `pr-test.yaml` with the job `buildAndTest`,
since "devel" is gone.
- The orchestrator note sits under its example, and the config table is
shorter.

## docs/lib.md

- An Actor not in `ACTOR_BUILDS` doesn't run. Only the entry's missing
`buildNumber` means the default build.
- Only `duration`, `failedRequests`, `requestsRetries` and
`maxRetriesPerRequest` take `null`. `forbiddenLogs: []` turns that check
off.
- `maxRetriesPerRequest` takes a number, not a range.
- `getStatistics` also returns the `keys` it summed, and throws for
missing keys.
- The `ACTOR_BUILDS` description is a small field table.

## docs/cli.md

- `--actors` and `--ignore` exist only on the commands that select
Actors.
- Unknown flags and arguments are errors.
- `notify` has `--dry-run`, and only a dry run checks the Slack token
with Slack.
- Change detection lists its steps in the order the code applies them.
- Smaller fixes to `build`, `build-from-local`, `test`, and
`delete-old-builds`.

## docs/workflows.md

- `SLACK_BOT_TOKEN` is only needed with `report-slack-channel`.
- Only the jobs using the setup action pin Node.js 24, and pnpm repos
install with pnpm.
- Corrected the review and `@claude` triggers.
- The build and test workflows declare every secret optional. The doc
says what happens when one is missing.
- Fixed a sentence that was cut off.

## docs/migrating-to-v1.md

- The `test` command excludes `**/dist/**`, not the workflow.
- The troubleshooting table quotes the errors as the code prints them.
The parser messages were checked by running it.
- The conversion and the workflow switch are numbered steps.

"Actor tokens" are "build tokens" throughout, to match
`buildTokenEnvVar`.

## To check

- The troubleshooting row for a leftover `TESTER_APIFY_TOKEN` quotes
GitHub's message, `Invalid secret, TESTER_APIFY_TOKEN is not defined in
the referenced workflow`. It's from memory, not from a run.
- `README.md` still tells consumers to set `target` and `module` to
`ES2022` in `tsconfig.json`. That still works with the new `exports`
map, since `types` is set too, but someone who knows the consumer repos
should say whether it's still the advice we want.

## Testing

- Every relative link with an anchor in the README, CONTRIBUTING and
`docs/` resolves to a heading.
- Prettier, and the pre-commit hook with the full test suite, pass.

---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants