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(backend): import defining owners and extract ACP startup - #39417
Import orchestration and session types/functions from the files that define them, and give ACP startup and messaging validation real implementation owners.
Files
Added
Deleted
Net
Test
721
$\color{#1a7f37}{\Huge{\mathbf{+}}}$6396
$\color{#cf222e}{\Huge{\mathbf{−}}}$7588
$\color{#cf222e}{\Huge{\mathbf{−}}}$1192
Prod
971
$\color{#1a7f37}{\Huge{\mathbf{+}}}$5421
$\color{#cf222e}{\Huge{\mathbf{−}}}$4369
$\color{#1a7f37}{\Huge{\mathbf{+}}}$1052
What Changed
Remove 50 redundant forwarding exports and identity aliases across the backend owners; update consumers directly.
Replace the generic orchestration schemas module with four substantive messaging owners. Colocate the federation input type with its defining shared schema and retire its empty forwarding shell.
Extract the ACP session-start implementation, preserving acquisition, abort, refusal, cleanup and exit classification. Preserve main's newer session-specific option lookup.
Remove redundant schema/mock/work-count test cases and assertions. Retain the persisted cold-delivery witness and actual refusal, retry, disposal, asynchronous setup and replay safety cases.
Why
Forwarding shells obscure the actual dependencies. These changes make ownership explicit without adding barrels, wrappers or compatibility shims.
Linked Issue
Continuation of the module-layout cleanup tracker.
Visual Proof
N/A: backend ownership and test maintenance; no UI change.
Testing
Current head 8e4df96ff639 is rebased onto the actual merged host commit 23808bb73f04 and targets main. Current node typecheck and changed-code quality across 74 source files pass; normal push passed.
The actual-parent whole-entry proof preserves 85 authored and 183 incoming paths with zero contacts, including all 29 upstream deletions. All 1,103 incoming requests and five bindings into authored owners resolve. This is root evidence; the new independent SOURCE/BOUNDARY reviews remain gates.
Original independent implementation/test-policy audits and sealed root replays remain scoped to their exact pins and initialization qualifications. Historical focused coverage includes 40 tests across six refinement files, 11 tests across three ACP files and 122 tests across 13 original files; overlapping counts are not summed as current coverage.
Fresh exact-head full PR CI, independent actual-parent reviews, latest-main composition and authenticated actual squash parent/tree remain required before merge. No previous-head CI is transferred.
Risk
Medium: direct imports can change isolated initialization timing, and startup extraction must retain cleanup/error precedence. Audits preserve the actual bodies, schema input/output types, 197 explicit bare admissions, singleton owners and production composition. Narrower standalone graphs and test initialization changes are explicitly qualified. There is no persisted-data migration or intended wire behavior change.
Review
The real cold-history helper was not dead: its first-completed-frame delivery witness remains in the existing command test. Genuine relational identity, active/disposed callback delivery, foreign-target refusal and external replay side-effect guards remain. Tests do not gain new production exports or test hooks.
Detailed tracker, reports and reproducible evidence remain local and ignored.
Agent skill upstream boundary
This change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
The pull request extracts ACP structured-session startup into a dedicated helper. It moves orchestration constants, RPC parameter types, and message-processing helpers to shared or dedicated modules. It updates imports and removes selected re-exports. Crew and orchestration tests are revised, and a restored-session Crew stream test replaces cold-load cost-profile coverage.
Merge Risk: Minimal · up to 8e4df
This refactor reorganizes imports and extracts session startup without an intended behavior change. Only minor test-quality points remain, so merge-readiness risk is minimal.
Pre-merge checks: 4 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Docstring Coverage
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.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title describes the direct imports and ACP startup extraction.
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 covers the main changes, rationale, testing, and risks. It should add reviewer test steps, tested platforms, and rollback guidance. If the author is an outside contributor, it must als…
Full details: Description check
Explanation
The description covers the main changes, rationale, testing, and risks. It should add reviewer test steps, tested platforms, and rollback guidance. If the author is an outside contributor, it must also link an issue.
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 50 files. (24 skipped: 24 over the file limit.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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.
Replace randomUUID() with fixed constants in the new test.
The test builds session IDs (Line 572) and operationId (Line 596) from randomUUID(). Non-deterministic inputs make failures hard to reproduce. The PR also states that restored sessions are seeded with one fixed operation clock. Use hardcoded UUIDs. The operationId can then be ${fixtureNow}-<fixed hex> or derived from the index.
Based on learnings: "In test code, avoid using current system time (e.g., now()) or randomly generated IDs/UUIDs as inputs. Use fixed, hardcoded constants instead."
Restore the nextCommands assertion for the outcome-unknown case.
The test now checks only failedStage. The removed check covered the recovery commands that operators use to recover from an unknown outcome. A regression in nextCommands no longer fails this test. Keep a minimal assertion that nextCommands is non-empty.
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: ebfcf6ff-1cdb-4b6f-a9bb-d79def6e0a3e
Commits
Reviewing files that changed from the base of the PR and between b0dd73e and 8e4df96.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 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
Import orchestration and session types/functions from the files that define them, and give ACP startup and messaging validation real implementation owners.
What Changed
Why
Forwarding shells obscure the actual dependencies. These changes make ownership explicit without adding barrels, wrappers or compatibility shims.
Linked Issue
Continuation of the module-layout cleanup tracker.
Visual Proof
N/A: backend ownership and test maintenance; no UI change.
Testing
8e4df96ff639is rebased onto the actual merged host commit23808bb73f04and targetsmain. Current node typecheck and changed-code quality across 74 source files pass; normal push passed.Risk
Medium: direct imports can change isolated initialization timing, and startup extraction must retain cleanup/error precedence. Audits preserve the actual bodies, schema input/output types, 197 explicit bare admissions, singleton owners and production composition. Narrower standalone graphs and test initialization changes are explicitly qualified. There is no persisted-data migration or intended wire behavior change.
Review
The real cold-history helper was not dead: its first-completed-frame delivery witness remains in the existing command test. Genuine relational identity, active/disposed callback delivery, foreign-target refusal and external replay side-effect guards remain. Tests do not gain new production exports or test hooks.
Detailed tracker, reports and reproducible evidence remain local and ignored.
Agent skill upstream boundary