Repository navigation
fix(ci): repair main's line limits and a stale test import - #33675
Conversation
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8f69d582-1595-428a-9880-b6fb03f8f03b
Files selected for processing: 5-
src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-host-test-support.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-host.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-reports.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-child-work.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
|
Main's CI was blocked by two files exceeding their line limits and a rename-migration test importing a module from its former location. This PR splits the startup tests and fixtures, moves identical child-work formatting beside its existing projection, and fixes that test import. User behavior is unchanged. The full review completed one round with independent correctness and architecture reviewers. No new findings or fixes were needed. All 23 original startup test declarations (28 expanded cases), assertions, and fixture behavior are retained. The extracted formatter preserves input reads, property omission, ordering, provider IDs, and usage stripping. No suppression, baseline, configuration, or saved-data/wire change was added. The earlier exported-mock type issue was already fixed, and its outdated review thread is resolved. Nothing is deferred. Verified: 28 startup tests, 48 status-feed tests, and 8 rename-migration tests passed across 11 explicitly named files. The production formatter remains identical to the tested extraction; later test-only commits preserve that evidence. QA is tests-only: no lifecycle, ownership, login, screen appearance, or user flow changes, so no app run or screenshot is required. Final reference comparison and the readiness checklist found no blockers or new scaling work; existing deployment-specific child-work reporting is an intended retained requirement. CI is green on For Brennan's review: the formatting extraction and test import repair. No user-facing design decision is needed. |
|
@brennanb2025 I went ahead and merged this myself to unblock main's CI. |
ELI5
Main's CI fails on every PR for three reasons. Root lint fails because two files exceed their line limits: #32334 grew the startup host test to 824 counted lines against 800, and #31602 grew the status feed to 301 against 300. Typecheck fails because #31602 added a test that imports launch persistence from a path that no longer exists. This PR repairs all three while preserving behavior and test coverage.
What Changed
Moved the child-report suite and current-generation readiness coverage into
structured-agent-session-startup-attempt-reports.test.ts. Both test files reuse one test-support module for mocks, fixture setup, cleanup, and helpers. Every existing test body and assertion is unchanged. The extracted helper reads synchronous status without an unnecessaryawait, and exported mocks have explicitMockannotations so their types remain portable.Moved the status feed's child-work summary formatting into the existing
structured-agent-session-status-child-work.tsmodule. The class method forwards to the extracted helper with the same inputs. The formatting logic, class signatures, and exports visible to callers are unchanged.structured-agent-session-startup-attempt-host.test.tsstructured-agent-session-startup-attempt-reports.test.tsstructured-agent-session-startup-attempt-host-test-support.tsstructured-agent-session-status-feed.tsstructured-agent-session-status-child-work.tslegacy-chat-rename-migration.test.tsxnow importsreadStructuredAgentLaunchRecordfrom@/lib/agent-session/launch/structured-agent-session-launch-persistence, where the module lives; its 8 tests pass.Counts exclude blank and comment-only lines, matching the configured rule. No lint suppression, baseline change, configuration change, or runtime behavior change.
Why
The test split keeps fixtures in one module, and the status extraction places the formatting beside the existing child-work projection. Both files have headroom under their limits.
Linked Issue
Main regressions introduced by #32334 and #31602; no new issue needed for these mechanical repairs.
Visual Proof
N/A — test organization and behavior-preserving helper extraction only; no UI or interaction change.
Testing
tc-gateon macOS: 2 files, 28 tests.tc-gateafter the main sync and extraction: 8 files, 48 tests, including child-work broadcasts, retained names, ownership, stopping, and clock behavior.lint-staged --diff=MERGE_HEAD --concurrent falsechecks.04395e762e53b234b114479d711cb937ff195dae: 1 file, 8 tests. This includes the correction of the third main failure, the stale test import.Agent skill upstream boundary
Checklist