Skip to content

refactor(chat): give the start-refusal resumable table its own module - #28085

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/split-start-refusal-resumable
Oct 12, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/split-start-refusal-resumable

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator
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

Two PRs merged a minute apart (#27946 and #26684) each added lines to src/shared/agent-session-failure-words.ts. Each was under the 300-line lint limit alone; together they put it at 304. Every PR that merges main now fails lint, and the pre-commit hook rejects the merge commit. This moves one self-contained table into its own file.

What Changed

  • START_REFUSAL_RESUMABLE, which records whether a refused start can be resumed for each wire refusal code, moves unchanged to src/shared/agent-session-start-refusal-resumable.ts.
  • agent-session-failure-words.ts imports it from there and drops its now-unused AgentSessionWireRefusalCode import. Nothing else referenced the table.

Why

The table is a standalone classification with its own doc comment and one reader, so it splits cleanly. Moving it avoids a max-lines disable, which AGENTS.md forbids, and leaves the sentence-building code as it is.

Linked Issue

Fixes the main lint break from #27946 + #26684 (agent-session-failure-words.ts at 304 lines, max-lines 300).

Visual Proof

N/A: no behaviour change; a constant moves to its own module.

Testing

  • oxlint --deny-warnings, the anti-slop config and oxfmt --check pass on both files.

  • tsc -p config/tsconfig.node.json reports nothing in either file. This checkout couldn't build @orca/process-host, so other files show unrelated module-resolution errors, and CI covers the full typecheck.

  • I manually tested these changes locally

  • Automated tests added/updated (behaviour unchanged; existing failure-words tests cover the table's reader)

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • 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: a shared constant moved, no runtime change

#27946 and #26684 together put agent-session-failure-words.ts at 304 lines,
over max-lines, which fails lint and the pre-commit hook on every merge of
main. The refusal-code table is standalone with one reader, so it moves out.
@OrcaWin
OrcaWin merged commit 50cc50d into main Oct 12, 2026
brennanb2025 pushed a commit that referenced this pull request Oct 12, 2026
…#28085)

#27946 and #26684 together put agent-session-failure-words.ts at 304 lines,
over max-lines, which fails lint and the pre-commit hook on every merge of
main. The refusal-code table is standalone with one reader, so it moves out.

Co-authored-by: Orca Worker <orca-worker@localhost>
brennanb2025 added a commit that referenced this pull request Oct 12, 2026
…27875)

* fix(browser): annotation card and outline follow the selected element

The grab overlay keeps re-measuring the picked element after the click
(scroll in any box, resize, element size changes), and the isolated
viewport bridge reports that live box so the pending card follows it,
including page zoom. The card's side pick uses its measured height.

* fix(browser): bind annotation card to selected element

* fix(browser): keep document annotation card on selection

* fix(ci): point the main sync-spawn ratchet at the shared ratchet library (#28054)

#27756's script imported baseline helpers from check-focus-read-ratchet.mjs
after #27788 had moved them into ratchet-baseline.mjs, so it crashed on start
and failed every PR that merges main. Use the library's helpers, and record the
two daemon-process launches from #27769 that the broken check never saw.

Co-authored-by: Orca Worker <orca-worker@localhost>

* fix(browser): follow selected element outer-box size

* refactor(chat): give the start-refusal resumable table its own module (#28085)

#27946 and #26684 together put agent-session-failure-words.ts at 304 lines,
over max-lines, which fails lint and the pre-commit hook on every merge of
main. The refusal-code table is standalone with one reader, so it moves out.

Co-authored-by: Orca Worker <orca-worker@localhost>

---------

Co-authored-by: OrcaWin <alpha-eng@stably.ai>
Co-authored-by: Orca Worker <orca-worker@localhost>
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