Skip to content

fix(native-chat): move the start-refusal table out so Lint passes on main - #28083

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-failure-words-max-lines
Oct 12, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-failure-words-max-lines

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 12, 2026 •

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

ELI5

Main fails Lint: src/shared/agent-session-failure-words.ts is now 304 lines, over the 300-line limit. Two PRs each added a few lines to it and passed on their own (#26684 and #27946), but together they push it over. Every open PR's static-analysis check fails until main is fixed.

What Changed

START_REFUSAL_RESUMABLE, the table of which refused starts leave a chat something to restart from, moves unchanged into its own file, src/shared/agent-session-start-refusal-resumable.ts. Only agent-session-failure-words.ts uses it, and it now imports it from there. No behaviour change.

Why

This is the smallest cohesive piece of the file to move out (it has its own doc comment and one reader), so the file goes back under the limit without touching any sentence logic. It follows the same precedent as #26079.

Linked Issue

Maintainer fix for main (no issue).

Visual Proof

N/A: no user-visible change; a constant moves between files.

Testing

  • oxlint and oxfmt --check pass on both files.
  • Automated tests added/updated: not needed, since nothing behaves differently. CI runs the existing tests.

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 security, 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)

@coderabbitai

coderabbitai Bot commented Oct 12, 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: a90ed92d-0db2-41da-9c11-bdbcb0258865

📥 Commits

Reviewing files that changed from the base of the PR and between 974b78d and 1040dc4.


📒 Files selected for processing (2)
  • src/shared/agent-session-failure-words.ts
  • src/shared/agent-session-start-refusal-resumable.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

Walkthrough

The refusal-code resumability mapping moved from agent-session-failure-words.ts to the new agent-session-start-refusal-resumable.ts module. The new module exports an exhaustive mapping. Failure-word logic imports it to determine whether a refused start offers a retry or directs the user to start a new chat.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 1040d

The extraction preserves refusal wording behavior; no issue identified here prevents merging after normal checks.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: moving the start-refusal table so lint passes on main.
Description check Passed The description is complete and aligned with the template. It explains the problem, change, rationale, testing, lack of behavior or visual changes, compatibility impact, and checklist status. The main…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.

✨ Finishing Touches
📝 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 aa5be32 into main Oct 12, 2026
32 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/fix-failure-words-max-lines branch October 12, 2026 23:44
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