You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: group Pi provider modules by owner - #41162
Pi's integration now groups its existing code by managed extensions, RPC sessions and transcripts. Callers import each operation from its defining module.
Files
Added
Deleted
Net
Test
63
$\color{#1a7f37}{\Huge{\mathbf{+}}}$112
$\color{#cf222e}{\Huge{\mathbf{−}}}$2545
$\color{#cf222e}{\Huge{\mathbf{−}}}$2433
Prod
73
$\color{#1a7f37}{\Huge{\mathbf{+}}}$263
$\color{#cf222e}{\Huge{\mathbf{−}}}$284
$\color{#cf222e}{\Huge{\mathbf{−}}}$21
What Changed
Move 81 files into concrete domains; retain three substantive provider definition/metadata/registration owners at the root.
Remove seven borrowed exports and redirect 17 binding slots to defining owners, including the titlebar service's safety alias.
Keep captured RPC recordings with their consumers. Repair TypeScript includes, runtime smoke entries, workflow history triggers and exact baseline/timing/admission selectors.
Apply repository test policy: retire 43 complete registrations across 17 whole Programs and partial suites (23 own / 20 required external); preserve 53 registrations (33 own / 20 external). Remove exact retired metadata rows and newly unused fixture bindings. Keep the canonical-provider early-exit case unchanged: its dispatch count observes the public provider boundary.
Why
The flat provider directory mixed emitted agent extensions, live RPC controllers, launch/options/history/prompt handling and transcript import. Domain owners make those responsibilities visible without new barrels or compatibility aliases.
Linked Issue
Maintainer-requested module layout cleanup.
Visual Proof
N/A — production visual and interaction behavior is preserved.
Testing
Full typecheck, formatting and basic lint pass. The existing regexp-style warning in the moved prompt owner remains outside changed-code diagnostics.
On actual main f820fdf8, all 28 retained owning suites and 77 examples pass in 9.52 seconds with two workers, per-file isolation and background launch. This includes the restored public-provider early-exit case. Two existing rendered E2E registrations are retained and were not run locally.
CLI and production Electron builds pass on macOS.
All ten JSONL recordings retain exact bytes. Ten actual generated extension/bridge variants and emitted filename constants exactly match native 8ae4823; the actual embedded smoke-tool stdin entry bundles successfully.
Source/initialization and independent candidate audits preserve generated-source composers, defining-owner bindings, runtime metadata identity, lazy adapter creation and canonical state owners. The actual Electron/Orcad graph keeps implementation owners; standalone imports shed incidental pure initialization, as reviewed.
Final pnpm check:changed --timeout=3 --maxWorkers=2 passes all 33 non-test checks. The broad related-test selection times out at three minutes without reported assertion/collection failures; this is incomplete test evidence, not a pass. The focused 28-suite run above passes on the exact rebased candidate.
Rebased onto actual CI-repair squash f820fdf8. Independent whole-tree carry preserves every accepted Pi file/resource and the native deletions/metadata unions. Prior typecheck/build/generated-output evidence applies to byte-identical production source; fresh hosted checks remain required before merge.
Risk
Level: Low for production. Import/resource/selector mistakes could break provider startup, generated extension installation or Pi/OMP/Prime reporting. Exact resource/generated-source comparisons, concrete binding audits, builds and existing public behavior tests cover these boundaries. A plain revert restores the previous layout.
Test retirement intentionally reduces coverage. Several retired cases mixed forbidden copy, internal counts or derived oracles with useful checks for retry recovery, launch identity, prompt/image handling, titlebar lifecycle and PTY integration. No equivalent replacement coverage is claimed; retained callbacks and setup are reconciled individually without assertion surgery.
Review
Original Pi scope provenance is explicit: all 48 original production identities and nine original recordings survive; historical test absences receive no new authored retirement credit. Original and native-added current identities remain individually accounted for.
Agent skill upstream boundary
Not applicable: no upstream skill-installer material copied or translated.
Pi managed-extension and RPC imports now match their nested module paths. The change updates related build, workflow, test, and CI configuration paths. It adds focused tests for RPC launch validation and prompt rejection cases. It also removes selected tests across PTY, Pi, agent-session, and end-to-end areas, with corresponding test-inventory updates.
Merge Risk: Low · up to f5b8e
This is a file-layout refactor with no runtime logic changes shown. Some regression coverage for the PTY early-exit registration path was removed, and the broader test run did not complete, so owners should be aware before merging.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: grouping Pi provider modules by owner.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is mostly complete. It includes ELI5, change scope, rationale, testing evidence, visual-proof status, risk, review context, and the agent-skill boundary. The Notes and Checklist sectio…
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. 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 0 functions across 50 files. (39 skipped: 5 unsupported, 34 over the file limit.)
Full details: Description check
Explanation
The description is mostly complete. It includes ELI5, change scope, rationale, testing evidence, visual-proof status, risk, review context, and the agent-skill boundary. The Notes and Checklist sections are missing, and the Linked Issue section does not contain an issue reference; however, the stated maintainer context may permit omitting a new issue.
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.
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Restore the early-exit registration test.
The removed test checked that an owner exiting before the spawn reply is not registered and that its pending registration is cancelled. The PR reports no equivalent replacement. Retain this test to protect the admission and cancellation sequence.
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: 36ff1d85-84fc-453c-ad7d-070f7ee6ffd2
Commits
Reviewing files that changed from the base of the PR and between 8ae4823 and f5b8edd.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
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
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
Pi's integration now groups its existing code by managed extensions, RPC sessions and transcripts. Callers import each operation from its defining module.
What Changed
Why
The flat provider directory mixed emitted agent extensions, live RPC controllers, launch/options/history/prompt handling and transcript import. Domain owners make those responsibilities visible without new barrels or compatibility aliases.
Linked Issue
Maintainer-requested module layout cleanup.
Visual Proof
N/A — production visual and interaction behavior is preserved.
Testing
f820fdf8, all 28 retained owning suites and 77 examples pass in 9.52 seconds with two workers, per-file isolation and background launch. This includes the restored public-provider early-exit case. Two existing rendered E2E registrations are retained and were not run locally.8ae4823; the actual embedded smoke-tool stdin entry bundles successfully.pnpm check:changed --timeout=3 --maxWorkers=2passes all 33 non-test checks. The broad related-test selection times out at three minutes without reported assertion/collection failures; this is incomplete test evidence, not a pass. The focused 28-suite run above passes on the exact rebased candidate.f820fdf8. Independent whole-tree carry preserves every accepted Pi file/resource and the native deletions/metadata unions. Prior typecheck/build/generated-output evidence applies to byte-identical production source; fresh hosted checks remain required before merge.Risk
Level: Low for production. Import/resource/selector mistakes could break provider startup, generated extension installation or Pi/OMP/Prime reporting. Exact resource/generated-source comparisons, concrete binding audits, builds and existing public behavior tests cover these boundaries. A plain revert restores the previous layout.
Test retirement intentionally reduces coverage. Several retired cases mixed forbidden copy, internal counts or derived oracles with useful checks for retry recovery, launch identity, prompt/image handling, titlebar lifecycle and PTY integration. No equivalent replacement coverage is claimed; retained callbacks and setup are reconciled individually without assertion surgery.
Review
Original Pi scope provenance is explicit: all 48 original production identities and nine original recordings survive; historical test absences receive no new authored retirement credit. Original and native-added current identities remain individually accounted for.
Agent skill upstream boundary