Repository navigation
feat(core): add Goal v3 worker tools #7729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
4271805
e85b026
f67e627
bbbe160
eebac98
9597bf2
110a600
a0581d2
70f977b
6ef0893
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,8 @@ | |
| */ | ||
|
|
||
| export const GOAL_STATE_VERSION = 2 as const; | ||
| export const GOAL_PROPOSAL_REASON_MAX_CHARACTERS = 8_000; | ||
| export const GOAL_PROPOSAL_REASON_MAX_BYTES = 16_000; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] Keep valid inputs within the verifier request budget A valid 24,000-byte delivered-output evidence record is serialized both in — Codex GPT-5 via Qwen Code /review
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已修复 验证证据:commit a0581d2 用 currentTurnId 标识当前轮 delivered_output,移除 evidence content 的重复序列化;24,000-byte evidence + 16,000-byte reason 的回归用例通过,Goal 回归 280/280、build/typecheck 通过。 |
||
|
|
||
| export const PAUSED_GOAL_SYSTEM_REMINDER = | ||
| '<system-reminder>\nThe Goal is paused. Do not continue its objective unless the user resumes it. Treat this message as ordinary conversation.\n</system-reminder>'; | ||
|
|
@@ -99,6 +101,19 @@ export interface GoalTerminalProposal { | |
| blockerKind?: 'authority' | 'external' | 'repeated'; | ||
| } | ||
|
|
||
| export function validateGoalProposalReason(reason: string): string | null { | ||
| if (!reason.trim()) return 'Goal proposal reason must not be empty'; | ||
| if ([...reason].length > GOAL_PROPOSAL_REASON_MAX_CHARACTERS) { | ||
| return `Goal proposal reason exceeds ${GOAL_PROPOSAL_REASON_MAX_CHARACTERS} characters`; | ||
| } | ||
| if ( | ||
| new TextEncoder().encode(reason).byteLength > GOAL_PROPOSAL_REASON_MAX_BYTES | ||
| ) { | ||
| return `Goal proposal reason exceeds ${GOAL_PROPOSAL_REASON_MAX_BYTES} UTF-8 bytes`; | ||
| } | ||
| return null; | ||
| } | ||
|
|
||
| export type GoalStateCause = | ||
| | 'create' | ||
| | 'replace' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] Cover the inclusive reason boundaries
The tests exercise short valid values and values just over these limits, but not exactly 8,000 characters or 16,000 UTF-8 bytes. An accidental
>to>=change would reject documented maximum-sized reasons while the current tests still pass. Add exact-boundary acceptance cases for both limits.— Codex GPT-5 via Qwen Code /review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修复
验证证据:commit a0581d2 新增 8,000 字符与 16,000 UTF-8 字节精确边界接受用例;Goal 回归 280/280 通过。