Skip to content

style: format the resume and transcript files main left unformatted - #30137

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/format-resume-create-files
Oct 18, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/format-resume-create-files

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 18, 2026 •

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

ELI5

Three files on main have lines longer than the repo's formatter allows. Every branch that merges main has the pre-commit hook reformat them, and two of them then come out past the 300-line file limit, so CI fails on files the branch never meant to touch. This formats them properly and keeps them under the limit.

What Changed

  • structured-session-create-support.ts, structured-agent-session-create-adoption.ts and transcript-opencode-sqlite-query.ts are formatted with the repo's formatter (oxfmt 0.73, 100 columns). On main, oxfmt --check fails on all three.
  • Formatted, two of them would go past 300 lines. To keep them under:
    • The bounded SQLite row readers (rowsOf, rowsWithinBudget) move from the OpenCode transcript query into their own file, transcript-opencode-row-budget.ts.
    • Building the resume adopt payload moves from the create intent into structuredAgentSessionAdoptAttach, in the module that already owns resume adoption.
  • No behavior change for users: the code is the same, only moved and reformatted.

Why

Before: a branch that merges current main gets these files reformatted by the pre-commit hook. Its CI then fails max-lines (302 and 306 lines) on files it doesn't otherwise change, so the branch either compacts main's code to fit or can't go green. After: main's files already match the formatter, so a merge leaves them unchanged.

The alternatives were to have each branch squeeze main's code itself, or to skip the hook. The first spreads unrelated edits across PRs; the second is not allowed.

Linked Issue

N/A: found while merging main into another branch. The unformatted lines came in through #29124 and #28595.

Visual Proof

Remote Electron QA on M4Air compared current main with exact head 9784b3ce512596be173b46d00b0c958ed98fa2b7, resuming the same existing real Codex CLI conversation into chat. Saved messages, provider identity, model, status and notices matched. The production resume launcher was invoked directly because the isolated profile could not discover the external account through Session History; the menu click and a further native turn were not tested. No OpenCode transcript was available.

Main showed an extra empty automatic Terminal 1 tab; branch did not. A bounded trace found identical startup guards and a setup script that did not await default-tab seeding. Scheduling is a plausible explanation, but causality is unproven; this remains a deferred QA concern, not a claim of complete window parity.

Main:

Main: existing CLI conversation resumed as chat

Branch:

Branch: same existing CLI conversation resumed as chat

Testing

  • The pre-commit hook (oxlint, the react-doctor config and oxfmt) passed on the staged files.
  • oxfmt --check passes on all four files at both 0.71 and 0.73.
  • CI covers typecheck and the test suite; the full PR workflow passed on 9784b3ce512596be173b46d00b0c958ed98fa2b7.

Review

Author X: @BrennanKB5

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Cross-platform, SSH and mobile: no runtime change.

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 (or N/A)
  • The full PR workflow passed static analysis, typecheck, tests and packaging on the reviewed head.

Review scope and plan

Light review was explicitly requested for this verified formatting and equivalent code motion. Keep all runtime behavior unchanged, compare the moved row-reader bodies exactly, verify adoption fields for every registered agent, then compare the rendered resume flow on main and this head with a real agent.

  • Size: four production files; 115 additions and 62 deletions include moved and reformatted existing code (177 physical changed lines, somewhat above the approximate 150-line guideline).
  • Risk: the files participate in session creation and transcript reads, but the review found no change to lifecycle, ownership, saved data, ordering, protocol, process behavior or defaults.
  • History: no reverted formatting extraction was found; the followed file history does include an older account-profile revert. The light scope is the requested behavior-preserving extraction, rather than a claim that the module history is incident-free.
  • Effect: one pure payload builder and two unchanged row-reader functions move into cohesive modules. No user-facing difference is intended or source-proven.

Two merged changes left lines past the formatter's 100-column width in
structured-session-create-support.ts, structured-agent-session-create-adoption.ts
and transcript-opencode-sqlite-query.ts. Any branch that merges main gets them
reformatted by the pre-commit hook, which pushes two of them past the 300-line
limit and fails CI. Format them, and keep them under the limit by moving the
bounded row readers and the resume adopt payload into the modules that own them.
No behavior change.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 18, 2026 00:36
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1afa1b57-6fa2-402a-9537-00ed159d9958
📥 Commits

Reviewing files that changed from the base of the PR and between ce2d608 and 9784b3c.

📒 Files selected for processing: 4
  • src/main/native-chat/transcript-opencode-row-budget.ts
  • src/main/native-chat/transcript-opencode-sqlite-query.ts
  • src/main/runtime/session-tabs/structured-session-create-support.ts
  • src/main/runtime/structured-agent-session-create-adoption.ts

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

📝 Walkthrough

The change adds shared SQLite row-budget helpers and uses them in the transcript query module. It also adds a helper that builds structured session adoption attachment data and updates session creation support to call it. Other reported changes reformat existing expressions without changing their behavior.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 9784b

This change reformats files and moves helper code without intended behavior changes. No concrete merge-blocking risk was found, and CI should confirm typecheck and tests.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 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 identifies the primary change: formatting the resume and transcript files that remained unformatted on main. It is concise and relevant.
Description check Passed The description is complete and covers the change, reason, scope, visual evidence, testing, review scope, and compatibility considerations. It also identifies the source pull requests despite marking …
Full details: Description check

Explanation

The description is complete and covers the change, reason, scope, visual evidence, testing, review scope, and compatibility considerations. It also identifies the source pull requests despite marking the linked issue as not applicable.

  • Fix all pre-merge checks with AI
✨ 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.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Three files on main exceeded the formatter's 100-column width. Formatting them during another branch's pre-commit hook pushed two past the 300-line limit, causing unrelated CI failures. This PR formats them and moves the bounded row readers and resume payload builder into cohesive modules. Users should see the same conversations and transcript behavior.

Review completed on 9784b3ce512596be173b46d00b0c958ed98fa2b7; no code fixes were needed.

  • Correctness: inspected git diff --color-moved and compared both row-reader bodies byte-for-byte, excluding their new export prefixes. They match. The adoption object preserves key presence, values and order for every agent: Pi still uses the transcript path as native identity; agents with false/undefined handleNamesTranscript still use the provider conversation ID. Replay and non-resume paths remain unchanged.
  • Performance/readiness: fresh adversarial review and a separate performance pass found no proven regressions. No dependency, saved-data, protocol, process or default changes. No implementation-mirroring tests added. The full PR workflow, including static analysis/typecheck, tests, packaging and the aggregate gate, passed on this exact head. The PR is non-draft, CLEAN and has no unresolved review threads.
  • Scope: light review follows the explicitly requested equivalent formatting/code-motion scope. Ordinary criteria have caveats: 177 physical changed lines across four production files, lifecycle module locations and an older account-profile revert in followed history. This does not claim incident-free module history or authorize a semantic lifecycle fix.
  • Real Electron QA: M4Air through qa-gate, Codex driving CDP after Grok was not signed in. Main and branch resumed the same existing real Codex CLI conversation with matching saved messages, provider identity, model, Done status and notices. The production native-resume launcher was invoked directly because the throwaway profile could not discover the external account through Session History. Menu discovery and a further native turn were not tested. OpenCode had no available transcript. The initial Windows baseline failed in its environment before a changed-flow verdict.
  • Deferred observation: main shows an extra empty automatic Terminal 1 tab; branch shows only the selected Codex Chat. One bounded trace found byte-identical startup guards and a harness that did not await default-terminal seeding. Scheduling is plausible, but actual gate order was not captured, so attribution is unproven. No unrelated fix was made; these screenshots do not establish complete window parity.
  • QA cleanup/audit: owned processes stopped, ports clear and tickets released. Real Codex configuration/auth/hooks hashes stayed unchanged. An unrelated real Claude configuration hash changed during shared activity; attribution is unknown and this task launched no Claude. Universal real-config hash parity is not claimed.

For Brennan's review

Main:

Main: existing CLI conversation resumed as chat

Branch:

Branch: same existing CLI conversation resumed as chat

The two review spots are the unchanged row and byte limits and the agent-dependent adoption identity.

@brennanb2025
brennanb2025 merged commit b6325ef into main Oct 18, 2026
60 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/format-resume-create-files branch October 18, 2026 18:17
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