feat: flatten tool call records#25
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bdefcebf6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
🦋 Changeset detectedLatest commit: 7c8a2a6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af0755c3cb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…b.com/MoonshotAI/kimi-code into codex/flatten-toolcall-wire-migration
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41e2f348f5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (isLegacyToolCall(v)) { | ||
| value[key] = migrateToolCall(v); | ||
| } else { | ||
| migrate(v); |
There was a problem hiding this comment.
Restrict v1.0 tool-call migration to known record fields
The migration currently rewrites any object matching { type: 'function', id: string, function: object } anywhere in a record tree, so replaying a v1.0 session can silently mutate unrelated user payloads (for example context.append_loop_event.event.args when a tool argument happens to use those keys). Because replay then rewrites the log to v1.1, this becomes permanent data corruption; the transform should be scoped to known tool-call containers (e.g. message.toolCalls) instead of recursive global replacement.
Useful? React with 👍 / 👎.
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Related Issue
N/A
Description
--output-format stream-jsonoutput compatible.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Validation
pnpm --filter @moonshot-ai/migration-legacy testpnpm --filter @moonshot-ai/kimi-code test -- test/cli/run-prompt.test.tspnpm exec changeset status --since origin/main