Skip to content

fix(native-chat): pass the clock to a recorded option pick - #28571

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-option-intent-now
Oct 14, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-option-intent-now

Conversation

@nwparker

@nwparker nwparker commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

Summary

Main's typecheck fails (TS2741 in structured-agent-session-message-options.ts): #28268 made the option-intent writer read ctx.now, and #27826's message-options context doesn't pass it. Every open PR's typecheck is red until this lands.

Before / after

Before: tsc fails on main; the four structured-agent-session-permission-mode.test.ts cases 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.now to the context object writeStructuredAgentSessionOption builds — the same clock its persistOptions already 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 gone
  • vitest 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

#27826 and #28268 crossed: the option-intent writer now needs `now`, and the
message-options context didn't supply it, breaking main's typecheck.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 76f4d0db-2c24-4511-999e-2d4263a82baf
📥 Commits

Reviewing files that changed from the base of the PR and between 9b1e83a and 4fd2369.

📒 Files selected for processing: 1
  • src/main/native-chat/agent-session-wire/structured-agent-session-message-options.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker

Copy link
Copy Markdown
Contributor Author

Same fix as #28570 (opened by the author of the change). Whichever lands first; I'll close this one if #28570 merges first.

@nwparker
nwparker merged commit 069bbaa into main Oct 14, 2026
32 checks passed
nwparker added a commit that referenced this pull request Oct 14, 2026
#28571 and #28577 both added the clock; oxlint fails on the duplicate key.

Co-Authored-By: Claude <noreply@anthropic.com>
nwparker added a commit that referenced this pull request Oct 14, 2026
…28599)

#28571 and #28577 both added the clock; oxlint fails on the duplicate key.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant