Repository navigation
fix(message): preserve event timestamps and validate rules - #53
Open
rayrayraykk wants to merge 1 commit into
Open
rayrayraykk wants to merge 1 commit into
rayrayraykk wants to merge 1 commit into
Conversation
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.
Linked Issues
Description
The review of #52 identified three regressions in message event handling and wire validation. This PR fixes only those findings:
created_atwhen reconstructing content blocks, including nested tool-result blocks. This restores deterministic replay of delayed streams.ToolCallBlock.suggested_rulesas permission rules instead of accepting arbitrary values from serialized payloads.usagebefore the Desktop React state updater applies aMODEL_CALL_ENDevent, so repeated updater calls do not mutate or double-count the previous state.The existing streaming test now keeps its clock fixed while replaying events, and a focused parser test covers valid and invalid permission rules. No new public API, dependency, generated artifact, or development document is added to the repository.
Verification:
pnpm --filter @agentscope-ai/agentscope build pnpm --filter @agentscope-ai/agentscope exec jest --runInBand --silent pnpm build:desktopCore: 19 suites, 129 tests passed. The Core ESM/CJS/declaration build and Desktop typecheck/build passed. Changed files passed ESLint, Prettier, and
git diff --check. A local double-invocation check confirmed the Desktop updater leaves the previoususageobject unchanged.Checklist
pnpm testequivalent shown above)