You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(native-chat): move the start-refusal table out so Lint passes on main - #28083
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)
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 · 5
Passed checks (5 passed)
Check name
Status
Explanation
Title check
The title clearly identifies the primary change: moving the start-refusal table so lint passes on main.
Description check
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
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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.
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
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.
ELI5
Main fails Lint:
src/shared/agent-session-failure-words.tsis 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. Onlyagent-session-failure-words.tsuses 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
oxlintandoxfmt --checkpass on both files.Agent skill upstream boundary
Notes
No security, platform, SSH, mobile or compatibility impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)