Skip to content

refactor(managed-server): move orcad activation into src/main/managed-server/activation/ - #30320

Merged
nwparker merged 1 commit into
mainfrom
nwparker/r2-m4a-managed-server-activation
Oct 18, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/r2-m4a-managed-server-activation

Conversation

@nwparker

@nwparker nwparker commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 39 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​156 $\color{#cf222e}{\Huge{\mathbf{−}}}$​109 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​47
Prod 61 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​173 $\color{#cf222e}{\Huge{\mathbf{−}}}$​150 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23

ELI5

About 190 files in src/main/ssh aren't SSH code. They're the desktop side of the managed Orca server (orcad) that runs on SSH and WSL hosts. This PR starts moving them into their own folder, src/main/managed-server/, beginning with the 19 activation files. Nothing the app does changes, and nothing on a host changes.

What Changed

  • Moved: every src/main/ssh/orcad-activation-* file and its tests, with git mv, to src/main/managed-server/activation/. File names are unchanged.
  • Rewritten references: imports and vi.mock paths in 75 importers across ssh, wsl and orcad, plus the ci-shard-timings.json keys.
  • CI filters gain the new folder, so the same lanes keep running:
    • ssh-hostile-hosts.yml and ssh-windows-hosts.yml add src/main/managed-server/**. They used to catch these files through src/main/ssh/orcad-*.
    • wsl-orcad-e2e.yml adds the folder, plus its own !…/*.test.ts exclusion.
    • node-server-qualification.mjs's cross-host prefixes add src/main/managed-server/.
    • The remote e2e fallback route from ci(e2e): start the managed-SSH lane for remote product changes no route names #30210 already covers main/managed-server/.
  • Diff shape: git diff -M shows every moved file as a rename. Edits inside the moved files are only their ../ import depth.

Why

This is round 2's folder plan (§4.2, M4; decision D8 names the folder managed-server/). src/main/ssh should hold SSH transport only. M4 turned out to be about 190 files, not the roughly 80 the plan estimated, so it lands as four PRs, one per subfolder: activation, install, lifecycle, host-state. Each stays reviewable and conflicts less with other open work.

Linked Issue

N/A (SSH hardening round 2, S11/M4).

Visual Proof

N/A: a pure file move.

Testing

  • typecheck:ci: clean.
  • Single worker, all pass: src/main/managed-server, every src/main/ssh/orcad-*, managed-server-*, ssh-host-server-on-connect*, ssh-hostile*, src/main/wsl, src/main/orcad, and the orcad e2e change-scope and node-server tests. That is 257 files and 2,648 tests.
    • The exception is the 4 orcad-forked-child-paths cases, which fail on main on macOS too, because of the /private/var tmpdir realpath.
  • The path-literal ratchet passes, so the moved paths and the new workflow globs all resolve.
  • The full local "static analysis and typecheck" job: clean.
  • Codex review (gpt-6.1-sol, high): clean.

…-server/activation/

First slice of the desktop side of managed orcad leaving src/main/ssh. git mv plus import and
path-literal rewrites; host-lane workflow filters and the cross-host prefix list gain the new folder.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Activation-related imports and test mocks now reference modules under managed-server/activation across the activation code, SSH consumers, and WSL consumers. The changes also update workflow path filters, Node server qualification prefixes, and CI timing paths. Runtime logic, test expectations, and recorded timing durations are unchanged in the summaries.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 7b3d3

This change relocates activation modules and updates their imports and CI paths. The remaining shard-balancing cleanup predates this PR, so no new merge risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: moving Orcad activation code into the managed-server activation directory.
Description check Passed The description provides a clear ELI5 summary, detailed changes, rationale, testing results, visual-proof status, and scope context. The Linked Issue field is marked N/A, and the Review, Notes, and Ch…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 5…
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.
Full details: Description check

Explanation

The description provides a clear ELI5 summary, detailed changes, rationale, testing results, visual-proof status, and scope context. The Linked Issue field is marked N/A, and the Review, Notes, and Checklist template sections are not completed, but the description is otherwise sufficiently complete for this focused refactor.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 50 files. (48 skipped: 4 unsupported, 44 over the file limit.)

✨ 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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e5932fbf-e27f-49bf-a5d5-3f6df492fca9
📥 Commits

Reviewing files that changed from the base of the PR and between 2d1ec53 and 7b3d359.

📒 Files selected for processing: 100
  • .github/workflows/ssh-hostile-hosts.yml
  • .github/workflows/ssh-windows-hosts.yml
  • .github/workflows/wsl-orcad-e2e.yml
  • config/scripts/ci-shard-timings.json
  • config/scripts/node-server-qualification.mjs
  • src/main/managed-server/activation/orcad-activation-crash-recovery.test.ts
  • src/main/managed-server/activation/orcad-activation-fence-generation.test.ts
  • src/main/managed-server/activation/orcad-activation-fence-hold.test.ts
  • src/main/managed-server/activation/orcad-activation-fence-hold.ts
  • src/main/managed-server/activation/orcad-activation-fence-scope.ts
  • src/main/managed-server/activation/orcad-activation-gate.test.ts
  • src/main/managed-server/activation/orcad-activation-gate.ts
  • src/main/managed-server/activation/orcad-activation-host-test-harness.ts
  • src/main/managed-server/activation/orcad-activation-lock.ts
  • src/main/managed-server/activation/orcad-activation-outcome-log.ts
  • src/main/managed-server/activation/orcad-activation-record-store.ts
  • src/main/managed-server/activation/orcad-activation-record.test.ts
  • src/main/managed-server/activation/orcad-activation-record.ts
  • src/main/managed-server/activation/orcad-activation-recovery.ts
  • src/main/managed-server/activation/orcad-activation-transaction-schema.ts
  • src/main/managed-server/activation/orcad-activation-transaction-store.ts
  • src/main/managed-server/activation/orcad-activation-transaction-transitions.ts
  • src/main/managed-server/activation/orcad-activation-transaction.test.ts
  • src/main/managed-server/activation/orcad-activation-transaction.ts
  • src/main/orcad/orcad-cross-runtime-daemon-adoption.integration.test.ts
  • src/main/ssh/managed-server-update-check.test.ts
  • src/main/ssh/managed-server-update-check.ts
  • src/main/ssh/orcad-active-readiness.ts
  • src/main/ssh/orcad-candidate-launch-verdict.ts
  • src/main/ssh/orcad-decommission-recovery.ts
  • src/main/ssh/orcad-decommission-released-peer-recovery.test.ts
  • src/main/ssh/orcad-decommission-transaction.test.ts
  • src/main/ssh/orcad-decommission-transaction.ts
  • src/main/ssh/orcad-exited-own-fence-mutation-race.test.ts
  • src/main/ssh/orcad-exited-own-fence.test.ts
  • src/main/ssh/orcad-exited-own-lock.ts
  • src/main/ssh/orcad-fence-lost-classification.test.ts
  • src/main/ssh/orcad-gc-transaction-pins.ts
  • src/main/ssh/orcad-host-version-admission.ts
  • src/main/ssh/orcad-incumbent-recovery.ts
  • src/main/ssh/orcad-installed-activation.ts
  • src/main/ssh/orcad-interrupted-candidate-resume.ts
  • src/main/ssh/orcad-machine-home.ts
  • src/main/ssh/orcad-managed-auto-update.test.ts
  • src/main/ssh/orcad-managed-auto-update.ts
  • src/main/ssh/orcad-managed-launch-session.test.ts
  • src/main/ssh/orcad-managed-launch-session.ts
  • src/main/ssh/orcad-managed-runtime-context.ts
  • src/main/ssh/orcad-managed-version-gc.test.ts
  • src/main/ssh/orcad-managed-version-gc.ts
  • src/main/ssh/orcad-managed-wake.test.ts
  • src/main/ssh/orcad-managed-wake.ts
  • src/main/ssh/orcad-recovery-slot.ts
  • src/main/ssh/orcad-remote-context.ts
  • src/main/ssh/orcad-remote-decommission.test.ts
  • src/main/ssh/orcad-remote-decommission.ts
  • src/main/ssh/orcad-remote-deploy.test.ts
  • src/main/ssh/orcad-remote-deploy.ts
  • src/main/ssh/orcad-remote-gc.test.ts
  • src/main/ssh/orcad-remote-gc.ts
  • src/main/ssh/orcad-remote-install.ts
  • src/main/ssh/orcad-remote-lifecycle-windows.test.ts
  • src/main/ssh/orcad-remote-primitives.test.ts
  • src/main/ssh/orcad-remote-rollback.test.ts
  • src/main/ssh/orcad-remote-rollback.ts
  • src/main/ssh/orcad-remote-runtime-control.ts
  • src/main/ssh/orcad-remote-windows-decommission.test.ts
  • src/main/ssh/orcad-remote-windows-node.ts
  • src/main/ssh/orcad-rollback-transition.ts
  • src/main/ssh/orcad-running-version-adoption.test.ts
  • src/main/ssh/orcad-running-version-adoption.ts
  • src/main/ssh/orcad-runtime-decommission.test.ts
  • src/main/ssh/orcad-runtime-decommission.ts
  • src/main/ssh/orcad-runtime-deployment.test.ts
  • src/main/ssh/orcad-runtime-deployment.ts
  • src/main/ssh/orcad-runtime-maintenance.test.ts
  • src/main/ssh/orcad-runtime-maintenance.ts
  • src/main/ssh/orcad-runtime-status.ts
  • src/main/ssh/orcad-state-mutation-exec.ts
  • src/main/ssh/orcad-state-mutation-fence-heartbeat.test.ts
  • src/main/ssh/orcad-state-mutation-timeout.test.ts
  • src/main/ssh/orcad-state-snapshot.ts
  • src/main/ssh/orcad-terminal-census-client.test.ts
  • src/main/ssh/orcad-terminal-census-client.ts
  • src/main/ssh/orcad-transaction-incumbent.ts
  • src/main/ssh/orcad-unreachable-setup-release.ts
  • src/main/ssh/orcad-unreachable-setup-stop.test.ts
  • src/main/ssh/orcad-update-plan.test.ts
  • src/main/ssh/orcad-update-plan.ts
  • src/main/ssh/orcad-windows-host-fence-ops.test.ts
  • src/main/ssh/orcad-windows-host-fence-ops.ts
  • src/main/ssh/orcad-windows-host-lane.test.ts
  • src/main/ssh/orcad-windows-host-state-ops.ts
  • src/main/ssh/ssh-host-server-on-connect-stopped-elsewhere.test.ts
  • src/main/ssh/ssh-hostile-host-managed-orcad.ts
  • src/main/wsl/wsl-orcad-deploy.test.ts
  • src/main/wsl/wsl-orcad-deploy.ts
  • src/main/wsl/wsl-orcad-incumbent.test.ts
  • src/main/wsl/wsl-orcad-instance-adoption.test.ts
  • src/main/wsl/wsl-orcad-instance-adoption.ts

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

"src/main/ssh/orcad-activation-outcome-log.test.ts": 40,
"src/main/ssh/orcad-activation-record.test.ts": 245,
"src/main/ssh/orcad-activation-transaction.test.ts": 451,
"src/main/managed-server/activation/orcad-activation-record.test.ts": 245,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

rg -n 'ci-shard-timings|shard-timings|timing.*shard|shard.*timing' config/scripts
git ls-tree -r --name-only 7b3d359851c00c567a73f48010934912a7998957 | rg 'orcad-activation-outcome-log\.test\.ts$' || true
git show 7b3d359851c00c567a73f48010934912a7998957:config/scripts/ci-shard-timings.json | sed -n '5588,5598p'

Repository: stablyai/orca

Length of output: 3631


Remove the obsolete timing entry.

orcad-activation-outcome-log.test.ts is not tracked, so its timing entry cannot affect test discovery. However, the shard balancer reads all timing rows, including stale rows, and the repository explicitly states that stale rows skew shard balance until the timing file is regenerated. Remove the obsolete row.

Suggested fix
-      "src/main/ssh/orcad-activation-outcome-log.test.ts": 40,

@nwparker
nwparker merged commit 0627cd2 into main Oct 18, 2026
57 checks passed
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