Skip to content

fix(native-chat): keep the session host under its line limit - #29869

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-session-host-max-lines
Oct 16, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-session-host-max-lines

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 16, 2026 •

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

Problem

Static analysis fails on main, and so on every open PR: src/main/native-chat/agent-session-wire/structured-agent-session-host.ts has 302 countable lines, over the 300-line limit. Two PRs each added lines to this file and passed CI on their own: #27925 (wait for agent readiness) and #29121 (keep pending chat decisions available outside loaded history). Merged together, they pushed it over the limit. #29121 was merged without first re-running CI on a main that already had #27925.

What changes

Nothing a user sees. The two delegates that settle a late dispatch and release unanswered dispatches move from the session host class into structuredAgentSessionMutationDelegates, which already builds the other mutation delegates from the same mutation context. The host keeps the same public names (settleLateDispatch, releaseUnansweredDispatches), so callers don't change. The host drops to 297 lines and the mutations file goes to 270. No line-limit check is disabled.

Notes

Author: @BrennanKB5

#29121 and #27925 each added lines to structured-agent-session-host.ts and passed CI on their own; together they left it at 302 countable lines, so static analysis fails on main. Move the late-dispatch and unanswered-dispatch delegates into the mutation delegates that already wrap the same context.
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc99e9dd-6eba-4401-9ced-32805a30411a
📥 Commits

Reviewing files that changed from the base of the PR and between c4c03e8 and b61744c.

📒 Files selected for processing: 2
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-mutations.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

StructuredAgentSessionHost now delegates late-dispatch settlement and unanswered-dispatch release to mutation delegates. Each delegate forwards its input and the current mutation context to the corresponding helper.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b6174

Late and unanswered dispatch operations continue to use the current session context, and the host remains within the configured line limit. No material merge risk is evident.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the problem and implementation, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof or N/A, Testing, AI Disclosure, Review, boundary … Complete the required template sections. Add the linked issue, testing details and platform coverage, visual proof or an N/A explanation, AI disclosure if applicable, review notes, agent skill boundary declaration, and checklist confirmatio…
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: keeping the native-chat session host within its line limit.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem and implementation, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof or N/A, Testing, AI Disclosure, Review, boundary declaration, and checklist confirmations.

Resolution

Complete the required template sections. Add the linked issue, testing details and platform coverage, visual proof or an N/A explanation, AI disclosure if applicable, review notes, agent skill boundary declaration, and checklist confirmations.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • 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.

@brennanb2025
brennanb2025 merged commit 39cf870 into main Oct 16, 2026
30 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/fix-session-host-max-lines branch October 17, 2026 00:47
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