fix: tighten actor.json version regex to match platform admission#655
Draft
DaveHanns wants to merge 1 commit into
Draft
fix: tighten actor.json version regex to match platform admission#655DaveHanns wants to merge 1 commit into
DaveHanns wants to merge 1 commit into
Conversation
The `.version` pattern in `actor.schema.json` is currently looser than
the platform's actual `MAJOR_MINOR_VERSION_REGEX` (in apify-core).
External tooling that validates against this published schema (apify-cli
project linting, IDE plugins, third-party SDKs, agent loops) gets a
false-positive valid signal on 3-part SemVer like `1.0.0` and unbounded
two-part values like `100.0`, only for the platform to reject them at
the version-creation admission gate `POST /v2/acts/{id}/versions`.
Changes:
- `packages/json_schemas/schemas/actor.schema.json`: tighten pattern
from `^([0-9]+)\.([0-9]+)(\.[0-9]+){0,1}$` (accepts 3-part SemVer
and unbounded segments) to
`^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$`, matching the platform's
exact `MAJOR_MINOR_VERSION_REGEX` from
apify-core/src/packages/simple-schema/src/regexs.ts:2 (each segment
0-99).
After this lands, every downstream consumer (apify-cli, apify-worker,
IDE extensions, etc.) fails-fast on invalid version strings at lint
time instead of failing late at platform admission.
Empirical confirmation of platform behavior (2026-06-21, throwaway
Actor `vXEV76d7g0dyKXdPB`): `POST /v2/acts/{id}/versions` with
`versionNumber: "1.0.0"` returns HTTP 400 schema-validation error.
Refs: chocholous/apify-evals F36, F12, F22.
Draft
3 tasks
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.
Summary
Tighten the
.versionregex inpackages/json_schemas/schemas/actor.schema.jsonso it matches the platform's actualMAJOR_MINOR_VERSION_REGEX(apify-core/src/packages/simple-schema/src/regexs.ts:2). Currently the published JSON schema is looser than what the platform actually accepts — third-party tooling (linters, IDE plugins, agent loops, future SDKs) reads the schema, sees1.0.0or100.0as valid, and only finds out at platform admission that it isn't.The diff
Old pattern matches:
1.0,1.0.0,100.0,00.01,001.02.New pattern matches:
0.0,1.0,99.99— strict 2-part, each segment 0–99.Empirical confirmation of platform behavior
Tested 2026-06-21 against the live platform against throwaway Actor
vXEV76d7g0dyKXdPB:POST /v2/acts/{id}/versionswithversionNumber: "1.0"→ 403 (semantic conflict, valid format)POST /v2/acts/{id}/versionswithversionNumber: "1.0.0"→ 400versionNumber must be MAJOR.MINOR, where MAJOR and MINOR is a number in range from 0 to 99.POST /v2/acts/{id}/versionswithversionNumber: "100.0"→ 400 same errorThe Console build path uses the same endpoint and the same
Act2SourceVersionSchema— there is no separate path that would still accept the loose form.Test plan
@apify/json_schemasconsumers (apify-cli, apify-worker, IDE extensions) is a downstream concern — they'll get the strictness on their next dependency refreshRefs
🤖 Generated with Claude Code