Skip to content

fix(native-chat): keep the session record file within the length limit - #36056

Merged
brennanb2025 merged 4 commits into
mainfrom
brennanb2025/fix-main-claude-flag-support-test
Oct 29, 2026
Merged

brennanb2025 merged 4 commits into
mainfrom
brennanb2025/fix-main-claude-flag-support-test

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3

Main's "static analysis and typecheck" job fails with src/shared/agent-session-record.ts: File has too many lines (301) after #34653 added the kill-delivered death-evidence kind. Every open PR's CI inherits it through its merge ref.

Change: the death-evidence guard reuses the existing isNonNegativeSafeInteger (same check: number, safe integer, at least 0) for observedAt, ownerFence and lastProvenAliveAt, which brings the file back under the limit. The guard accepts and rejects exactly the same records as before.

The other current main type errors: the flag-support test was fixed by #36052; the structured session fixtures are tracked in #36058. This PR touches neither. Main's static job goes green only once both land.

Plan / light path: one file, a few lines; no saved-data shape or behavior change; no repeat; local effect.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

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: f2cf81dd-4332-4aa6-92f1-580c22b312bb
Commits

Reviewing files that changed from the base of the PR and between 7a43945 and 877e866.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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: cea081db-ae50-4f17-bee3-106624e292d8
Commits

Reviewing files that changed from the base of the PR and between 91efcc4 and 86075d0.

Files selected for processing: 2
  • src/main/claude/claude-cli-flag-support.test.ts
  • src/shared/agent-session-record.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.

Walkthrough

The CLI flag test now uses the shared supports helper for both prefix checks. Death-evidence validation now uses isNonNegativeSafeInteger for observedAt, optional ownerFence, and optional lastProvenAliveAt. The existing constraint that lastProvenAliveAt must not exceed observedAt remains.

Priority: Low

Merge Risk: Minimal · previous review 7a439

Merge Risk: ⚪ Minimal · up to 7a439

The changes are limited to a test helper correction and equivalent numeric validation, with no actionable merge-blocking risk identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the production guard change and the CI context, but it is incomplete and conflicts with the pull request contents. It states that the flag-support test is not touched, while t… Update the description to accurately document both changed files, remove the claim that the flag-support test is untouched, add the required linked issue, testing results, and visual-proof entry (N/A with a reason if applicable), and comp…
Passed Passed checks: 3 passed
Check name Status Explanation
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.
Title check Passed The title clearly describes the primary production change: keeping the session record file within the length limit. It is concise and related to the changeset.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. 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.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description explains the production guard change and the CI context, but it is incomplete and conflicts with the pull request contents. It states that the flag-support test is not touched, while the pull request changes that test file. It also omits the required template sections for the linked issue, visual proof, testing, review, notes, and checklist.

Resolution

Update the description to accurately document both changed files, remove the claim that the flag-support test is untouched, add the required linked issue, testing results, and visual-proof entry (N/A with a reason if applicable), and complete the review, notes, and checklist sections.

Finishing Touches: 💡 1
📝 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

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; the shorter checks preserve saved-session behavior.

Summary

Reuses isNonNegativeSafeInteger for three checks in the saved session record, shortening the file without changing which records it accepts.

  • Session records use one shared check for death-evidence numbers.

Reviews (3) · Last reviewed commit: "Merge branch 'main' into brennanb2025/fi..." · Reviewed by Greptile

@brennanb2025 brennanb2025 changed the title test(claude): fix main typecheck in flag-support test fix: restore main's static checks (flag-support test, session record length) Oct 29, 2026
@brennanb2025 brennanb2025 changed the title fix: restore main's static checks (flag-support test, session record length) fix(native-chat): keep the session record file within the length limit Oct 29, 2026
@brennanb2025
brennanb2025 merged commit 14676d1 into main Oct 29, 2026
46 of 50 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/fix-main-claude-flag-support-test branch October 29, 2026 20:16
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