Skip to content

fix(lint): move knownAgentIds out of the session host - #26648

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

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

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 8, 2026 •

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

ELI5

Main's lint is red again: src/main/native-chat/agent-session-wire/structured-agent-session-host.ts went one line over the 300-line limit when #26416 added the startup-expiry and option-revision wiring. Every PR shows the failure, and merging main into a branch is blocked because the commit hook lints the incoming file. This moves one small piece of logic out of that file. Nothing changes for users.

What Changed

  • The host's knownAgentIds (every agent this runtime registered, plus any agent a saved chat names) is now a plain function, knownAgentIds(deps), in the existing structured-agent-session-provider-support.ts, beside the other "which agents can this host serve" checks.
  • The host method calls it. Same result, same callers.

Why

The host class is already split into collaborators and sits at its line budget; this is a pure function of the host's dependencies, so it belongs with the other agent-support checks rather than in the class. Raising the limit or disabling the rule isn't allowed.

Linked Issue

None. Fixes main's max-lines lint failure introduced by #26416.

Visual Proof

N/A: code move only, no behavior or UI change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

The existing restart-resume suite that exercises knownAgentIds (7 tests) passes unchanged. oxlint and oxfmt pass on both files. orca-ci-checks (lint, code-quality and typecheck): 23/23 passed, including the typecheck.

Review

Self-reviewed: a pure move with no logic edits.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No platform, SSH, mobile or compatibility impact.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

#26416 pushed structured-agent-session-host.ts one line over the 300-line limit,
so main's oxlint is red and merges from main fail the commit hook. Move the
pure knownAgentIds logic into structured-agent-session-provider-support.ts
beside the other agent-support checks.
@coderabbitai

coderabbitai Bot commented Oct 8, 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: 2566dfda-e971-4b2c-9190-08d70603aa38
📥 Commits

Reviewing files that changed from the base of the PR and between 04ac6d6 and 06ca4d6.

📒 Files selected for processing (2)
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-support.ts

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


📝 Walkthrough

Walkthrough

The provider support module now returns distinct agent IDs from registered definitions and saved session record providers. StructuredAgentSessionHost.knownAgentIds delegates to this helper.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 06ca4

Agent ID lookup behavior remains unchanged after the extraction; no merge-blocking concern is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, reason, testing, scope, and checklist items. However, the required Linked Issue section states "None" and does not include an actual issue link. Add the actual linked issue reference in the Linked Issue section, using the required issue-link format such as "Fixes #12345".
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that the knownAgentIds logic moved out of the session host to address a lint-related change.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

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