Skip to content

fix(runtime): bring runtime-identity-state back under the size cap - #36852

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-main-runtime-identity-lines
Nov 1, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-main-runtime-identity-lines

Conversation

@nwparker

@nwparker nwparker commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​14 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9

ELI5

Main's lint is failing because one file grew two lines past the 300-line limit, so every PR off main fails static analysis. This moves one small calculation out of that file.

What Changed

#36315 added two lines to src/main/runtime/construction/runtime-identity-state.ts, which was already at the 300-line cap. It's now 302, and main's Lint step fails.

The mobile session snapshot version stamping in storeMobileSessionSnapshot moves, unchanged, into src/main/runtime/mobile-session-snapshot-version.ts (stampMobileSnapshotVersion).

Why

This unblocks static analysis for every PR based on main. It's a pure move with no behavior change.

Linked Issue

N/A (internal).

Visual Proof

N/A: no behavior change.

Testing

  • Full-repo oxlint (CI's Lint step) passes.

  • pnpm tc:node passes.

  • The runtime suites that cover snapshot versions and storeMobileSessionSnapshot pass (164 tests).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

No tests added: it's a pure move.

#36315 added two lines to runtime-identity-state.ts, which was already at
the 300-line cap, so main's Lint step fails (302 lines) and every PR
based on main fails static analysis.

Mobile session snapshot version stamping moves, unchanged, into
mobile-session-snapshot-version.ts.
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: f7ad32f8-3729-424a-8ced-ed0ff5298040
Commits

Reviewing files that changed from the base of the PR and between 2dcb0b7 and 6acc495.

Files selected for processing: 2
  • src/main/runtime/construction/runtime-identity-state.ts
  • src/main/runtime/mobile-session-snapshot-version.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The snapshot storage path now calls stampMobileSnapshotVersion instead of calculating the version inline. The helper retains the incoming version when no existing snapshot is provided or when the incoming version is at least one greater than the existing version. Otherwise, it returns a copy with the version set to one greater than the existing version.

Merge Risk: Minimal · up to 6acc4

The change is a behavior-preserving extraction to satisfy the file-size limit; no merge-blocking risk is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the main change: a fix that brings runtime-identity-state back under the file-size cap. The changeset moves snapshot version stamping out of runtime-identity-state.ts into a new helper…
Description check Passed The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, and Checklist-style checkboxes. The ELI5 and What Changed sections explain th…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a fix that brings runtime-identity-state back under the file-size cap. The changeset moves snapshot version stamping out of runtime-identity-state.ts into a new helper file, which matches the title's intent. The title is specific, under 70 characters, and states the purpose of the change.

Full details: Description check

Explanation

The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, and Checklist-style checkboxes. The ELI5 and What Changed sections explain the before and after and the mechanism (moving stampMobileSnapshotVersion to a new file). The Visual Proof section gives N/A with a reason. The Linked Issue section says N/A (internal) without an issue link, which the template marks as required for outside contributors; this author appears to be an internal maintainer, so the gap is acceptable. Missing items: the Review, Agent skill upstream boundary, and Notes sections are absent, and the Checklist items are not ticked. The AI Disclosure section is also absent, but the template says to skip it for internal team members. The description is mostly complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

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.

Share

@nwparker
nwparker merged commit 48d78de into main Nov 1, 2026
47 checks passed
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