Skip to content

fix(ci): bring agent-session-failure-words.ts back under the line limit - #28086

Closed
brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/main-fix-failure-words-lines
Closed

brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/main-fix-failure-words-lines

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Problem

Main's static-analysis check fails on every PR right now. src/shared/agent-session-failure-words.ts is over the 300-line max-lines limit (304 counted lines):

src/shared/agent-session-failure-words.ts:365:2: File has too many lines (304). eslint(max-lines)

Two PRs each touched the file while it was under the limit, and each was green on its own: #27946 (name the agent when it refuses a message) and #26684 (require Codex 0.136.0 for chats). Merged one after the other, they took it over.

What changes for users

Nothing. This only moves code.

Mechanism

START_REFUSAL_RESUMABLE moves from agent-session-failure-words.ts to agent-session-wire-refusals.ts, unchanged. It's the table that says whether a refused agent start can be retried, or only a new chat can continue. It is keyed by the wire refusal codes, which that file defines, so a new code fails to compile right beside its definition. The failure-words file now imports the table instead of the code type.

Why this approach

The table classifies refusal codes rather than wording any sentence, so the refusal-code file is its natural home. Moving it brings the failure-words file back under the limit without squeezing lines or raising the limit.

Testing

  • oxlint passes on both files.
  • tc:node, tc:web and tc:cli pass.
  • agent-session-failure-words tests pass (84).
  • orca-ci-checks --no-typecheck: everything passes except the local-only bun typecheck:ci runner ("Script not found check"), which fails the same way on main on this machine.

Two PRs that were each under the limit together took agent-session-failure-words.ts past the 300-line max-lines rule on main. The table classifies wire refusal codes, so it belongs beside them.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Main fixed this in #28085 first, so this one is a duplicate.

@brennanb2025
brennanb2025 deleted the brennanb2025/main-fix-failure-words-lines branch October 12, 2026 21: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