Repository navigation
test: fix the two CI failures #25751 left on main - #25937
Closed
brennanb2025 wants to merge 1 commit into
Closed
brennanb2025 wants to merge 1 commit into
brennanb2025 wants to merge 1 commit into
Conversation
- structured-agent-session-live-turn.test.ts: pass the host turn source ({ items }) the module
now takes; without latestTurn it reads the rows, so each assertion keeps its meaning.
- use-mobile-native-chat-turn-disclosure.test.tsx was over mobile's 800-line limit. The
mid-turn-send describe moves whole to its own file under the same outer describe, and the
shared harness moves to a test-support module. The harness now renders a component instead of
a host-element string, so both files typecheck and the original leaves the tests-typecheck
baseline.
Contributor
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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's #25751 left two test files that fail CI checks, so every pull request opened against main now shows red, whatever it changes. Main's own runs skip those checks, so main itself looks green. This PR fixes both test files. Nothing in the app changes.
What Changed
The problem. Every PR that CI checks against current main (128d154 or later) fails three checks, and none of the failures are in the PR's own files:
mobile/src/session/use-mobile-native-chat-turn-disclosure.test.tsxhas grown to 816 counted lines (875 in total), over mobile's 800-line limit.pnpm build:cli:src/shared/structured-agent-session-live-turn.test.ts:42and:44fail with TS2741, "Property 'items' is missing in type 'AgentJournalRenderItem[]'". fix(native-chat): a long reply keeps its Working bar and Stop after a reload, from the host's turn #25751 changedisStructuredAgentSessionThinkingto take the host's turn source,{ items, latestTurn? }. Two calls in the test fix(native-chat): reasoning rows with a real open/finished state, and readable Claude thinking #19221 added still pass a bare array.Because "static analysis" fails first, CI skips every PR's unit shards, cross-version and package jobs. Main's own push runs don't run these checks, so main looks green.
For users: nothing changes. This is a test-only PR.
The change:
structured-agent-session-live-turn.test.ts: the two calls pass{ items: [...] }, the shape every other call in that file already uses. LeavinglatestTurnout keeps the old meaning: the function reads the rows, so each assertion still checks a reasoning row's own running/completed state.use-mobile-native-chat-turn-disclosure.test.tsx: split by concern, with no lint disable and no per-file limit bump.use-mobile-native-chat-turn-disclosure-mid-turn-send.test.tsx, under the same outer describe name, so every test's full name is unchanged.userMessagebuilder both files use move touse-mobile-native-chat-turn-disclosure.test-support.tsx, so neither file copies them.DisclosureResultcomponent instead of the host-element string'result', the pattern other mobile tests use. A string isn't anElementType, so the original file had always been on the mobile tests-typecheck baseline, the list of test files that don't typecheck yet. The split copy failed that check as a new file. Both files now typecheck, and the original leaves the baseline (127 entries, was 128).Why
A split by describe block keeps every test as written, under the same name, and keeps the file limit as it is. Raising or disabling the limit would only hide the next file that outgrows it.
Linked Issue
None. This fixes CI failures on main.
Visual Proof
N/A: test-only change.
Testing
structured-agent-session-live-turn.test.ts: 17 passed (root vitest config).Both mobile test files, with the mobile runner: 21 passed.
vitest listof main's original file and of the two new files gives the same 21 full test names.tc:cliandtc:nodepass through tc-gate. Mobiletsc --noEmitandscripts/check-tests-typecheck-ratchet.mjs, run inmobile/the way CI runs them, both pass. The ratchet reports 923 test files in the program and the stale baseline entry pruned.oxlint on the changed files (root and mobile config) is clean, and so is oxfmt. The max-lines ratchet passes with no new suppressions.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Author: @BrennanKB5. Test-only: no impact on the app, cross-platform behaviour, SSH, mobile behaviour or compatibility.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)