Repository navigation
fix(native-chat): pass the clock to a recorded option pick - #28571
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Author
1 of 2 tasks
This was referenced Oct 14, 2026
nwparker
added a commit
that referenced
this pull request
Oct 14, 2026
brennanb2025
added a commit
that referenced
this pull request
Oct 15, 2026
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.
Summary
Main's typecheck fails (TS2741 in
structured-agent-session-message-options.ts): #28268 made the option-intent writer readctx.now, and #27826's message-options context doesn't pass it. Every open PR's typecheck is red until this lands.Before / after
Before:
tscfails on main; the fourstructured-agent-session-permission-mode.test.tscases fail (a recorded pick has no clock).After: typecheck passes for this file and those tests pass. No behavior change beyond the pick being stamped with the session's clock, as #28268 intended.
Mechanism
Adds
now: context.nowto the context objectwriteStructuredAgentSessionOptionbuilds — the same clock itspersistOptionsalready uses.Why this approach
It's the one-line join of the two PRs; the callee's contract (
Pick<AgentSessionTurnContext, … | 'now'>) is what #28268 intended.Testing
tsc -p config/tsconfig.node.json: the TS2741 is gonevitest src/main/native-chat/agent-session-wire/structured-agent-session*: permission-mode tests now pass; two other failures (subscriber-journal-retention,unnamed-stop-races) fail identically without this change on this machine