Repository navigation
fix(cron): reject oversized prompts - #297
Merged
tt-a1i merged 2 commits intoAug 30, 2026
Merged
Conversation
SSK988I
force-pushed
the
codex/issue-296-cron-prompt-limit
branch
from
August 30, 2026 04:31
c2d269e to
edaa4ee
Compare
SSK988I
force-pushed
the
codex/issue-296-cron-prompt-limit
branch
from
August 30, 2026 04:34
edaa4ee to
0898e0a
Compare
tt-a1i
approved these changes
Aug 30, 2026
tt-a1i
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed exact head e046451 after updating onto main 63a05c8. The change replaces silent truncation of cron prompts with an explicit fail-closed 2000-character limit for one-shot and recurring schedules. Boundary and no-job-created tests cover 2000/2001 characters. Local full validation passed: bun run check, 1052 Node tests passed with 1 platform skip, and 30/30 Vitest tests. Fresh required CI passed on Node 22.19.0, Node 24, and Windows. No blocking findings.
agnitum2009
pushed a commit
to agnitum2009/openpi
that referenced
this pull request
Sep 3, 2026
Co-authored-by: tt-a1i <[email protected]>
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.
Problem
/cron in和/cron every对超过 2000 字符的 Prompt 使用.slice(0, 2000)静默截断,但仍提示调度成功。用户看到的任务与实际保存、执行的内容不一致。Fixes #296
Value
超长 Prompt 现在会立即得到明确错误,不会创建内容已被悄悄修改的定时任务。这使调度结果可预测,也避免长 Prompt 的尾部约束在用户不知情时丢失。
Approach
trim()后若超过CRON_PROMPT_MAX_CHARS,返回明确的帮助错误并拒绝创建任务。in、every两种模式补充 2000/2001 字符边界测试。Validation
tsc --noEmit:通过。biome lint . --error-on-warnings:通过。biome format .在当前 Windows checkout 中因既有 CRLF 文件报错;本 PR 的三个修改文件均已单独通过格式检查。Impact