Conversation
This reverts commit 4ebeae4.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (46)
📝 WalkthroughWalkthroughMove OpenShell integrations into a new adapter layout: update import paths across many modules and tests to ChangesOpenShell Adapter Module Restructuring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
## Summary Move pure CLI/domain helper modules out of the flat `src/lib/` directory into `src/lib/domain/**` so parser, action, and domain boundaries are visible in paths. ## Stack Navigation - Position: 54 of 60 - Previous PR: [#2970 — refactor(cli): split oclif commands by command tree](#2970) - Next PR: [#2985 — refactor(cli): group openshell adapters](#2985) ## Changes - Moved lifecycle option normalizers to `src/lib/domain/lifecycle/options.ts`. - Moved duration parsing, maintenance image/upgrade helpers, sandbox destroy/log helpers, sandbox log options, and policy/channel arg helpers under `src/lib/domain/**`. - Moved helper tests with their modules and updated imports from actions, command adapters, and tests. - Kept behavior unchanged; this PR is a structural move plus import updates. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] `npx prek run --all-files --stage pre-push` passes - [x] `npm run build:cli` - [x] `npm run typecheck:cli` - [x] Domain/helper targeted tests pass - [x] No secrets, API keys, or credentials committed - [ ] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [ ] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Internal module structure reorganized to improve code organization and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
prekshivyas
left a comment
There was a problem hiding this comment.
LGTM. Same #2967/#2984-pattern PR — pure file-organization, 44 files / +86 / -83.
Four OpenShell adapter modules (client, runtime, resolve, timeouts) moved to src/lib/adapters/openshell/. 39 consumer files have one-line import-path updates. Slightly larger consumer diffs (sandbox-destroy-action.ts +6/-6, sandbox-status-action.ts +5/-2, etc.) are files that import multiple openshell adapters at once. scripts/check-legacy-migrated-paths.ts update is the migration-guard list — required for the move.
Verification checklist explicitly cites ts-migration:guard — strong signal nothing escaped the move.
CI: pr.yaml mostly green (lint/dco/check-hash/legacy-path-guard/changes PASS); macos-e2e/wsl-e2e/checks + pr-self-hosted builds still in flight at review time. No failures.
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
## Summary Add a narrow layer-boundary guard for the new CLI directory structure before moving action/state/adapter modules further. ## Stack Navigation - Position: 56 of 60 - Previous PR: [#2985 — refactor(cli): group openshell adapters](#2985) - Next PR: [#2987 — refactor(cli): group sandbox actions](#2987) ## Changes - Added `scripts/check-layer-import-boundaries.ts` to validate initial import-boundary rules. - Added a Vitest smoke test that runs the guard without source-shape assertions. - Enforces domain purity, no oclif imports from actions, no command/action imports from adapters, and one registered oclif command class per production command file. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] `npx prek run --all-files --stage pre-push` passes - [x] `npx tsx scripts/check-layer-import-boundaries.ts` - [x] `npx vitest run test/layer-import-boundaries.test.ts` - [x] `npm run source-shape:check` - [x] No secrets, API keys, or credentials committed - [ ] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [ ] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated pre-commit hook to improve formatting behavior during commits. * Added automated validation to enforce code architecture layer boundaries and prevent unintended cross-layer imports. * **Tests** * Added an automated test to verify the new layer-boundary validation runs successfully and reports passing status. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Move OpenShell-facing adapter modules out of the flat
src/lib/directory intosrc/lib/adapters/openshell/**so process/runtime boundaries are visible in paths.Stack Navigation
Changes
src/lib/adapters/openshell/client.ts.src/lib/adapters/openshell/runtime.ts.resolve.tsandtimeouts.ts.Type of Change
Verification
npx prek run --all-files --stage pre-pushpassesnpm run build:clinpm run typecheck:clinpm run ts-migration:guard -- --base origin/refactor/layer-domain-helpers --head HEADmake docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Release Notes