Skip to content

fix: report the real Actor name length limit - #1484

Open
l2ysho wants to merge 2 commits into
masterfrom
claude/vigorous-noyce-e99c7a
Open

l2ysho wants to merge 2 commits into
masterfrom
claude/vigorous-noyce-e99c7a

Conversation

@l2ysho

@l2ysho l2ysho commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Note

Lets test apify-factory auto approve on this PR.

What changed

validateActorName in src/lib/utils.ts:

  • Max-length message: The Actor name must be a maximum of 30 characters long. → `The Actor name must be at most ${ACTOR_NAME.MAX_LENGTH} characters long.`
  • Min-length message: hard-coded 3 → ${ACTOR_NAME.MIN_LENGTH}

Why

ACTOR_NAME.MAX_LENGTH from @apify/consts is 63, not 30. A user with a 40-character name was rejected by a message that told them a limit the code does not enforce. The min-length value was correct but carried the same drift risk, so both now read from the constants.

Notes for the reviewer

  • No test or doc asserted either literal — grep -rn "characters long" hits only these two lines.
  • Pre-existing bug, not introduced by apify/apify-cli#1479. Found while reviewing that PR, because the new apify init --yes failure path surfaces these messages more often.
  • pnpm run lint && pnpm run format && pnpm run build && pnpm run test:local all pass (687 passed, 4 skipped).
  • No update-docs run needed: no flag, arg, description, or command changed.

🤖 Generated with Claude Code

The max-length error said "a maximum of 30 characters" while the check
compares against ACTOR_NAME.MAX_LENGTH, which is 63. Both length messages
now interpolate the constants so they cannot drift again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@l2ysho
l2ysho requested a review from DaveHanns as a code owner October 9, 2026 06:23
@l2ysho l2ysho added bug Something isn't working. adhoc Ad-hoc unplanned task added during the sprint. t-builders Issues owned by the Builders team. labels Oct 9, 2026

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

adhoc Ad-hoc unplanned task added during the sprint. bug Something isn't working. t-builders Issues owned by the Builders team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants