Skip to content

refactor(persistence): colocate test fixtures and harness - #33233

Merged
nwparker merged 1 commit into
mainfrom
nwparker/module-organization-persistence-support
Oct 24, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/module-organization-persistence-support

Conversation

@nwparker

@nwparker nwparker commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Move persistence session fixtures and the test harness into src/main/persistence/, updating all 158 callers. Remove the harness’s makeTerminalTab re-export so consumers import the concrete fixture owner, and import profileStateDatabaseFile from its defining module.

The harness retains its existing shared store state and lifecycle. Existing function bodies, test assertions, mocks, and setup placement are preserved.

Validation: all 1,807 cases across 168 test files pass on both pristine main and the candidate, with matching case results and snapshots. Full typecheck, changed-code quality, formatting, reliability gates, test-file runner checks, two independent source audits, and scoped retained-feature compatibility review pass.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: 3f55061a-da8e-4525-9d52-a318dcdf8037
Commits

Reviewing files that changed from the base of the PR and between 015fae8 and baebf9f.

Files selected for processing: 160
  • src/main/active-view-persistence-boundary.test.ts
  • src/main/automations/automation-dispatch-host-fence.test.ts
  • src/main/automations/automation-owner-fencing.test.ts
  • src/main/automations/automation-skip-coalescing.test.ts
  • src/main/automations/automation-update-host-retarget.test.ts
  • src/main/automations/automation-workspace-host-attribution.test.ts
  • src/main/automations/automation-wsl-move-refusal.test.ts
  • src/main/automations/automation-zero-grace-tick-latency.test.ts
  • src/main/automations/retained-run-reconciliation.test.ts
  • src/main/automations/run-completion-watcher.test.ts
  • src/main/automations/service-precheck.test.ts
  • src/main/automations/service.test.ts
  • src/main/ipc/pty/pane/pane-owner-replacement.test.ts
  • src/main/ipc/renderer-shutdown-checkpoint-sleep-records.test.ts
  • src/main/ipc/repos/folder-workspace-attachment-handlers.test.ts
  • src/main/ipc/repos/project-host-setup-wsl-move-fence.test.ts
  • src/main/ipc/repos/repo-ipc-wsl-move-fence.test.ts
  • src/main/ipc/session-window-view-save.test.ts
  • src/main/ipc/ssh/ssh-host-server-on-connect-wiring.test.ts
  • src/main/managed-server/lifecycle/orcad-runtime-conversion.test.ts
  • src/main/orcad/orcad-automations.test.ts
  • src/main/persistence-local-only-worktree-meta.test.ts
  • src/main/persistence-onboarding-language-cohort.test.ts
  • src/main/persistence/applying-settings/persistence-automation-extra-agent-args.test.ts
  • src/main/persistence/applying-settings/persistence-automations.test.ts
  • src/main/persistence/applying-settings/persistence-jira-project.test.ts
  • src/main/persistence/applying-settings/persistence-jira-saved-filters.test.ts
  • src/main/persistence/applying-settings/persistence-legacy-automation-twin-host.test.ts
  • src/main/persistence/applying-settings/persistence-native-chat-appearance.test.ts
  • src/main/persistence/applying-settings/persistence-native-chat-tab-view-mode.test.ts
  • src/main/persistence/applying-settings/persistence-native-chat-upgrade-tip-audience.test.ts
  • src/main/persistence/applying-settings/persistence-portuguese-ui-language-migration.test.ts
  • src/main/persistence/applying-settings/persistence-settings-ui-defaults.test.ts
  • src/main/persistence/applying-settings/persistence-settings-update.test.ts
  • src/main/persistence/applying-settings/persistence-source-control-ai-migration.test.ts
  • src/main/persistence/applying-settings/persistence-status-bar-compact-change-notice.test.ts
  • src/main/persistence/applying-settings/persistence-ui-state.test.ts
  • src/main/persistence/applying-settings/settings-update-terminal-link-preference.test.ts
  • src/main/persistence/closed-terminal-tab-write-fence.test.ts
  • src/main/persistence/loading-store/persisted-state-redundancy.test.ts
  • src/main/persistence/loading-store/profile-state-import-lifetime.test.ts
  • src/main/persistence/loading-store/profile-state-pty-retirement-finalization.spec.ts
  • src/main/persistence/loading-store/pty-binding-async-durability.spec.ts
  • src/main/persistence/loading-store/pty-binding-created-surface-rollback.spec.ts
  • src/main/persistence/loading-store/pty-binding-matching-durability.spec.ts
  • src/main/persistence/loading-store/pty-binding-placement-inertness.test.ts
  • src/main/persistence/loading-store/pty-binding-restart-retirement.spec.ts
  • src/main/persistence/loading-store/pty-retirement-async-durability.spec.ts
  • src/main/persistence/loading-store/state-write-round-trip.test.ts
  • src/main/persistence/loading-store/store-host-partition-before-unload.test.ts
  • src/main/persistence/loading-store/store-prune-gate-signals.test.ts
  • src/main/persistence/loading-store/store-runtime-authored-session-writes.test.ts
  • src/main/persistence/loading-store/store-workspace-session-host-removal.test.ts
  • src/main/persistence/loading-store/workspace-session-write-listeners.spec.ts
  • src/main/persistence/loading-store/worktree-meta-alias-projection.test.ts
  • src/main/persistence/migrating-orcad-catalog/orcad-source-export.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-blobs.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-catalog.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-received-blob-durability.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-shell-history-fixture.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-shell-history-install-safety.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-shell-history-login-shell.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-shell-history.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-migration-terminal-restore-hints.test.ts
  • src/main/persistence/migrating-orcad-catalog/persistence-orcad-repository-cache-reimport.test.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-session-freeze.test.ts
  • src/main/persistence/persistence-clipboard-selection-migration.test.ts
  • src/main/persistence/persistence-cohort-and-identity-migration.test.ts
  • src/main/persistence/persistence-feature-interaction-broadcast.benchmark.test.ts
  • src/main/persistence/persistence-flush-and-save-scheduling.test.ts
  • src/main/persistence/persistence-host-partitioned-sessions.test.ts
  • src/main/persistence/persistence-initial-load.test.ts
  • src/main/persistence/persistence-load-repair-durability.test.ts
  • src/main/persistence/persistence-loading-store-extraction.test.ts
  • src/main/persistence/persistence-protected-secret-fail-closed.test.ts
  • src/main/persistence/persistence-proxy-secret-recovery.test.ts
  • src/main/persistence/persistence-remote-session-startup.test.ts
  • src/main/persistence/persistence-session-fixtures.ts
  • src/main/persistence/persistence-single-serialize.test.ts
  • src/main/persistence/persistence-test-harness.ts
  • src/main/persistence/profile-state-cutover-fixture.test.ts
  • src/main/persistence/terminal-topology/persistence-binding-graft-placement.test.ts
  • src/main/persistence/terminal-topology/persistence-closed-pane-binding-fence.test.ts
  • src/main/persistence/terminal-topology/persistence-cross-host-pane-identity.test.ts
  • src/main/persistence/terminal-topology/persistence-empty-root-layout-load.test.ts
  • src/main/persistence/terminal-topology/persistence-floating-terminal-trust.test.ts
  • src/main/persistence/terminal-topology/persistence-host-partitioned-ssh-pty-bindings.test.ts
  • src/main/persistence/terminal-topology/persistence-layout-binding-recovery.test.ts
  • src/main/persistence/terminal-topology/persistence-pane-alias-selective-saves.test.ts
  • src/main/persistence/terminal-topology/persistence-pane-identity-migration.test.ts
  • src/main/persistence/terminal-topology/persistence-pty-binding-leaf-tab-resolution.test.ts
  • src/main/persistence/terminal-topology/persistence-pty-binding-reconciliation.test.ts
  • src/main/persistence/terminal-topology/persistence-runtime-admitted-terminal-membership.test.ts
  • src/main/persistence/terminal-topology/persistence-split-pane-incarnation.test.ts
  • src/main/persistence/terminal-topology/persistence-ssh-lease-tombstone-retention.test.ts
  • src/main/persistence/terminal-topology/persistence-ssh-pending-pty-kill.test.ts
  • src/main/persistence/terminal-topology/persistence-ssh-readoption-automation-migration.test.ts
  • src/main/persistence/terminal-topology/persistence-ssh-remote-cli-control-migration.test.ts
  • src/main/persistence/terminal-topology/persistence-ssh-remote-pty-binding-replay.test.ts
  • src/main/persistence/terminal-topology/persistence-ssh-remote-pty-leases.test.ts
  • src/main/persistence/terminal-topology/persistence-ssh-targets-and-pane-keys.test.ts
  • src/main/persistence/terminal-topology/persistence-tab-terminal-pane-binding-load.test.ts
  • src/main/persistence/terminal-topology/persistence-terminal-option-key-migration.test.ts
  • src/main/persistence/terminal-topology/terminal-late-bind-layout-rules.test.ts
  • src/main/persistence/terminal-topology/terminal-leaf-move-concurrent-close.test.ts
  • src/main/persistence/terminal-topology/terminal-leaf-move-fixture.ts
  • src/main/persistence/terminal-topology/terminal-leaf-move.test.ts
  • src/main/persistence/terminal-topology/terminal-owner-invariants.test.ts
  • src/main/persistence/terminal-topology/terminal-owner-report-only.test.ts
  • src/main/persistence/terminal-topology/terminal-stale-pane-tree-client.test.ts
  • src/main/persistence/terminal-topology/terminal-window-pane-detach.test.ts
  • src/main/persistence/terminal-topology/workspace-layout-rules.test.ts
  • src/main/persistence/tracking-repos/persistence-deregistered-repo-residue.test.ts
  • src/main/persistence/tracking-repos/persistence-duplicate-repo-id-host-scope.test.ts
  • src/main/persistence/tracking-repos/persistence-folder-scan-project-groups.test.ts
  • src/main/persistence/tracking-repos/persistence-folder-workspace-notes.test.ts
  • src/main/persistence/tracking-repos/persistence-invalid-workspace-layout-purge.test.ts
  • src/main/persistence/tracking-repos/persistence-repo-lifecycle.test.ts
  • src/main/persistence/tracking-repos/persistence-update-repo.test.ts
  • src/main/persistence/tracking-repos/persistence-workspace-attachments.test.ts
  • src/main/persistence/tracking-repos/persistence-workspace-pinned-automation-fence.test.ts
  • src/main/persistence/tracking-repos/persistence-workspace-repin-automation-owner.test.ts
  • src/main/persistence/tracking-repos/persistence-workspace-session-scrollback.test.ts
  • src/main/persistence/tracking-repos/persistence-workspace-status-workflow.test.ts
  • src/main/persistence/tracking-repos/persistence-worktree-card-properties.test.ts
  • src/main/persistence/tracking-repos/persistence-worktree-deletion-fencing.test.ts
  • src/main/persistence/tracking-repos/persistence-worktree-lineage-and-backups.test.ts
  • src/main/persistence/tracking-repos/persistence-worktree-meta-and-folder-workspaces.test.ts
  • src/main/persistence/tracking-repos/persistence-worktree-meta-host-target-twins.test.ts
  • src/main/persistence/tracking-repos/persistence-worktree-name-retirement.test.ts
  • src/main/persistence/tracking-repos/persistence-worktree-visibility.test.ts
  • src/main/repo-backfill-wsl-move.test.ts
  • src/main/runtime/automation-change-publication.test.ts
  • src/main/runtime/host-terminal-close-persistence-durability.test.ts
  • src/main/runtime/orca-runtime-terminal-close-records.test.ts
  • src/main/runtime/orca-runtime-terminal-surface-close.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-visual.test.ts
  • src/main/runtime/runtime-managed-worktree-metadata-sweep.test.ts
  • src/main/runtime/runtime-managed-worktree-metadata-wsl-move.test.ts
  • src/main/runtime/runtime-terminal-orphan-adoption-rollback.test.ts
  • src/main/runtime/terminal-create-closed-tab-durability.test.ts
  • src/main/ssh-expired-lease-pane-readoption.test.ts
  • src/main/ssh-reattach-pane-cardinality.test.ts
  • src/main/ssh/orcad-migration-cutover-coordinator.test.ts
  • src/main/ssh/orcad-migration-delta-move.test.ts
  • src/main/ssh/orcad-migration-delta-snapshot.test.ts
  • src/main/ssh/orcad-migration-repository-link.test.ts
  • src/main/ssh/orcad-migration-snapshot-resume.test.ts
  • src/main/ssh/orcad-migration-source-fence.test.ts
  • src/main/ssh/orcad-migration-source-retention.test.ts
  • src/main/ssh/orcad-migration-ssh-relay-source.test.ts
  • src/main/ssh/orcad-migration-stuck-host-profiles.test.ts
  • src/main/ssh/orcad-retained-source-changes.test.ts
  • src/main/ssh/orcad-unreachable-setup-release.test.ts
  • src/main/ssh/targets/ssh-target-orcad-preflight.test.ts
  • src/main/worktree-identity-persistence.test.ts
  • src/main/worktree-removal-close-records.test.ts
  • src/main/worktree-removal-session-partition-fencing.test.ts
  • src/main/wsl-move-scan-pruning.test.ts
  • tests/e2e/folder-upgrade-identity-persistence.unit.test.ts

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

Walkthrough

The diff updates relative imports in persistence tests and fixtures. The test harness now uses updated module paths and no longer re-exports makeTerminalTab. Tests that use this fixture import it directly from the session fixtures module. The supplied summaries show no changes to test behavior or assertions.

Priority: Low

Merge Risk: Minimal · up to baebf

This import-only test-support refactor has no identified merge-blocking risk.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Description check Warning The description summarizes the main refactor and validation results, but it does not follow the required template. It omits the required section headings and information for ELI5, Why, Linked Issue, V… Update the pull request description to include all required template sections. Add the linked issue, state N/A with a reason for Visual Proof if applicable, document testing platforms and commands, complete the checklist, and address revi…
Docstring Coverage Inconclusive Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 50 files. (110 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: colocating the persistence test fixtures and harness.
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 summarizes the main refactor and validation results, but it does not follow the required template. It omits the required section headings and information for ELI5, Why, Linked Issue, Visual Proof, Testing details, Review, Notes, and Checklist.

Resolution

Update the pull request description to include all required template sections. Add the linked issue, state N/A with a reason for Visual Proof if applicable, document testing platforms and commands, complete the checklist, and address review, notes, and AI Disclosure requirements.

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. Analyzed 1 functions across 50 files. (110 skipped: 110 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

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.

@nwparker
nwparker merged commit 8733ec4 into main Oct 24, 2026
45 checks passed
tomarai85 added a commit to tomarai85/orca that referenced this pull request Oct 26, 2026
Point the imports of persistence-test-harness, persistence-session-fixtures
and pty-host-bindings at the paths main moved them to (stablyai#33233, stablyai#33566), and
say above each 420 s timeout why the relaunch journey needs it, as main's
test-timeout-needs-reason rule (stablyai#33430) asks.
tomarai85 added a commit to tomarai85/orca that referenced this pull request Oct 26, 2026
Point the imports of persistence-test-harness, persistence-session-fixtures
and pty-host-bindings at the paths main moved them to (stablyai#33233, stablyai#33566), and
say above each 420 s timeout why the relaunch journey needs it, as main's
test-timeout-needs-reason rule (stablyai#33430) asks.
tomarai85 added a commit to tomarai85/orca that referenced this pull request Oct 26, 2026
Point the imports of persistence-test-harness, persistence-session-fixtures
and pty-host-bindings at the paths main moved them to (stablyai#33233, stablyai#33566).
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