Repository navigation
feat!: v1 transition - #252
Open
metalwarrior665 wants to merge 32 commits into
Open
metalwarrior665 wants to merge 32 commits into
metalwarrior665 wants to merge 32 commits into
Conversation
…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
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
marked this pull request as ready for review
November 26, 2026 19:36
metalwarrior665
requested review from
JuanGalilea and
ruocco-l
as code owners
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)!).testno longer writes the Actor IDs a second time asactorName/actorId, setsRUN_PLATFORM_TESTSor removesRUN_ALL_PLATFORM_TESTS. The report reads a run's Actor only frommeta.actorId. A repository whose installed lib is older thanOLDEST_SUPPORTED_LIB_VERSION(now1.0.0) fails with an error. Pre-releases like1.0.0-beta.3pass. The old-lib dev dependency aliases and their tests are gone.test/bundle/old-libs.test.tschecks that the bundle refuses 0.11.0 and runs 1.0.0.The lib has an
exportsmap (feat(lib)!). Only.(dist/index.js) and./package.jsonare exported, soRunTestResultis reachable at runtime,it,testTestActorand_privatearen't public, and deep imports ofdist/...stop working.run({ input })is typed asTinstead ofOmit<T, 'actorName'>.The CLI calls itself
apify-test-toolsin its help instead ofpublic-actors-utils.workflows-v1(ci!).MAJOR_TAGisworkflows-v1, and the usage examples in the README, docs and workflows name it.The config requires
"mode": "grouped"(feat(config)!). Thelegacymode is removed, and a config withoutmodefails the parser's own check.tokenEnvVaris nowbuildTokenEnvVar(feat(config)!), on groups and Actors, so it reads apart fromtestTokenEnvVar, which defaults to it.get-actor-configsprints the new name. A config that still hastokenEnvVarfails withtokenEnvVar is renamed to buildTokenEnvVar, so an Actor's own token can't be dropped silently in favour of its group's. The SlacktokenEnvVarofnotifyis unrelated and stays.fetchServer(path, init?)(feat(lib)!), formerlycallServerInterface: afetchfor the Actor's server interface. It takesfetch's own options and returns theResponse, 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, unlessinitsets them, addsAuthorizationwith the Actor's test token andX-Actor-Buildwith 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 ofactorId, which held the full name anyway. The report'sversionis 2, whichnotifyrequires.testTokenEnvVaris 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 withtestTokenEnvVar is required. See the token permissions in the README: ….buildTokenEnvVarneeds a full-permission token, for now. FortestTokenEnvVar, 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.TESTER_APIFY_TOKENas 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, sosecrets: inheritdoesn't pass the build and test tokens any more. The build, test anddelete-old-buildssteps getCONFIG_SECRETSalone instead oftoJSON(secrets), so no other secret of the workflow reaches them. The migration guide drops thesecrets: inheritpath: every job lists its secrets by name. A caller can still pack its owntoJSON(secrets)intoCONFIG_SECRETS, which the docs keep as an opt-in with its trade-off.Tests name their Actor by full name only (
feat!).testActorandtestStandbyActorthrow on anything butowner/name, so a test naming its Actor by raw ID fails its file instead of being skipped without a word. The lib matchesACTOR_BUILDSbyactorFullNameonly.testtakes its Actors by full name only and looks up no raw IDs. The lib getsactorFullName,buildId,buildNumberandtestTokenEnvVar.lib/consts.ts, and the config parser re-exports it.vitest 5 (
feat(lib)!).vitest >=5.0.0, andenginesis^22.12.0 || ^24.0.0 || >=26.0.0, the Node.js versions vitest 5 runs on.expectwrapper and the matcher typings are ported from chore(vitest): update to vitest 5 #183.distby default, andtest's folder filters matched a compileddist/test/platform/*.test.jscopy, which then ran too. I checked this on vitest 5.testpasses--exclude=**/dist/**on top of the repo's own excludes, and the fixture intest-cli.test.tshas adistcopy that must not run.The docs, comments and error messages describe only the v1 behaviour (
docs:). No mentions ofworkflows-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.
withTestTokenshands 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, andtest/helpers/fake-apify-api.tsis gone.actorBuildsVersioncheck and theapifyTestToolsfield inpackage.jsonare dropped. The 1.0.0 minimum covers it: every lib 1.0.0 or newer readstestTokenEnvVar.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.
testServerInterfaceActor(feat: target standby builds directly with X-Actor-Build #233, renamed in feat(lib): rename standby to server interface #263) takesactorFullName. Its docs no longer mention temporary tasks.testStandbyActoralias from feat(lib): rename standby to server interface #263 is removed (callStandbywith it), and so is its e2e test. v1 exports onlytestServerInterfaceActor.Content-Type,bodyand thedataof a non-JSON response. Troubleshooting maps the missingtestStandbyActorexport to the rename.No
TESTER_APIFY_TOKENfallback (feat!).ACTOR_BUILDSnames for it. It fails only that Actor's tests when it names none or the variable isn't set.describeruns whenACTOR_BUILDSlists any Actors.testwarns that the tests of an Actor without its token will fail.public_pr-build-test.yamlandpublic_platform-tests.yamlno longer declare or passTESTER_APIFY_TOKEN: the test tokens come inCONFIG_SECRETS.TESTER_APIFY_TOKENsecret, which it uses to read and re-run the failed run.testStandbyActor, whose anchor changed withactorFullName.toFinishWith(feat(lib)!).SDK_CRAWLER_STATISTICS_orCRAWLEE_CRAWLER_STATISTICS_(the first 1,000 keys under each prefix), summed, so an adaptive crawler or several crawlers need no setting.statisticsKeysstill picks records explicitly. A run without any record fails the checks that need them, naming both prefixes, so an Actor without crawler statistics must setfailedRequests: 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,undefinedfor a run without any. It returns the counters that add up across crawlers (requestsFinished,requestsFailed,requestsRetries, the mergedrequestRetryHistogram,maxRetriesPerRequest, the total durations), not the raw record, and throwsMissingStatisticsErrorfor a given key the run lacks.durationandrequestsRetrieshave no default: they're checked only when set.forbiddenLogstake 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.chargedEventCountschecks only the events listed, and an event that was never charged counts as 0, so0asserts it wasn't.strictChargedEventCounts: truealso fails on any charged event that isn't listed.Migration guide (
docs:).docs/migrating-to-v1.mdtakes a repo through the change in one PR:toFinishWith;The README links it.
Still to do here
workflows-v0or of earlier behaviour outside the migration guide.apify-store/testing-repo-for-github-actions: itse2e/baseande2e/featurebranches now commit agroupedconfig withbuildTokenEnvVarandtestTokenEnvVar: one commit one2e/base, with the fixture commit ofe2e/featurerebased on top. E2E passes.delete-old-buildsno longer deletes adevel-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-v1callers, so each needs to keep working for them or wait forworkflows-v2:public_platform-tests-claude-investigate-and-fix.yamland drops itsNPM_TOKENsecret.Not v1-gated, because they add things without breaking anything: #128/#129, #138, #159, #137, #243, #245, #136. #245 makes the same
main/exportschange as this PR, so its rebase drops that part. #251 isn't needed: this PR replaces it with full-name-only.Merge and release
workflows-v1to it.majorto publish 1.0.0. Until then,@workflows-v1refuses every published lib, but no repository calls it yet.docs/migrating-to-v1.md.Testing
npm teston vitest 5, after the last master merge and the later changes: 662 passed, 1 expected fail (the existingit.failsfor jsonc), 3 skipped, with the pre-commit hook (typecheck, lint, format, bundle) passing.testrefuses lib 0.11.0 and runs 1.0.0;tokenEnvVaron a group and on an Actor, namingbuildTokenEnvVar;buildTokenEnvVarortestTokenEnvVar, and the test token never falls back to the build token;distcopy of the tests doesn't run;checkRun:import 'apify-test-tools'resolves through the exports map andapify-test-tools/dist/lib/lib.jsis refused withERR_PACKAGE_PATH_NOT_EXPORTED.https://claude.ai/code/session_016XtpQw9Dj33AVeATjriAiu
Generated by Claude Code