Skip to content

test(terminal): decouple lifecycle coverage from legacy routes - #1503

Open
Nima-Naderi wants to merge 1 commit into
codex/terminal-workspace-foundationfrom
codex/terminal-workspace-lifecycle-tests
Open

test(terminal): decouple lifecycle coverage from legacy routes#1503
Nima-Naderi wants to merge 1 commit into
codex/terminal-workspace-foundationfrom
codex/terminal-workspace-lifecycle-tests

Conversation

@Nima-Naderi

@Nima-Naderi Nima-Naderi commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Decouple terminal lifecycle tests from legacy HTTP routes before the workspace gateway cutover.
  • Keep deletion ordering, layout reconciliation, interrupted-runtime recovery, and tombstone cleanup covered at their owning store/registry boundaries.
  • Let the following gateway layer retire /api/terminal/sessions/** without leaving stale route-coupled assertions.

Stack

Layer 3 of 10 in the terminal workspace stack.

Validation

  • pnpm install --offline --frozen-lockfile
  • Gateway TypeScript check
  • Pattern scan: 0 violations
  • Focused lifecycle/adapter tests: 18 passed
  • Diff hygiene

Invariants

  • Source of truth: production behavior is unchanged; lifecycle state remains owned by the existing terminal layout store and runtime registry.
  • Lock/transaction scope: the deletion test exercises the same per-session lifecycle lock and begin/delete/complete ordering as production.
  • Acceptable orphan states: unchanged; this PR only relocates test orchestration.
  • Auth source of truth: unchanged; no route or authentication behavior changes.
  • Deferred scope: canonical workspace route behavior remains in feat(gateway): cut over to shared terminal workspaces #1431 and later layers.

@Nima-Naderi

Copy link
Copy Markdown
Collaborator Author

@greptileai please re-review the latest commit

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR decouples terminal lifecycle tests from legacy HTTP routes while retaining coverage at the layout-store, runtime-registry, and adapter boundaries.

  • Exercises deletion locking, tombstone transitions, registry deletion, and layout reconciliation directly through the owning store.
  • Exercises interrupted-runtime recovery through the registry and verifies tombstone cleanup separately.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
tests/gateway/terminal-window-layout-store.test.ts Replaces legacy route-level deletion orchestration with direct lifecycle-store operations while preserving real-store reconciliation assertions.
tests/gateway/user-systemd-zellij-adapter.test.ts Replaces route-driven recovery with direct registry recovery and explicit tombstone cleanup while retaining adapter and persisted-state assertions.

Reviews (2): Last reviewed commit: "test(terminal): decouple lifecycle cover..." | Re-trigger Greptile

@Nima-Naderi
Nima-Naderi marked this pull request as ready for review August 31, 2026 22:15
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