Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

838 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { canonicalWorktreeIdentity, type WorktreeIdentityRef } from './identity'

describe('canonical worktree identity', () => {
  const local: WorktreeIdentityRef = {
    worktreeId: 'repo-1::/workspace/feature',
    executionHostId: 'local',
    instanceId: '11111111-1111-4111-8111-111111111111'
  }
  const remote: WorktreeIdentityRef = {
    ...local,
    executionHostId: 'ssh:build-box'
  }

  it('separates same locator and instance across execution hosts', () => {
    expect(canonicalWorktreeIdentity(local)).not.toBe(canonicalWorktreeIdentity(remote))
  })

  it('is stable when only the path locator changes', () => {
    expect(
      canonicalWorktreeIdentity({ ...local, worktreeId: 'repo-1::/workspace/renamed-feature' })
    ).toBe(canonicalWorktreeIdentity(local))
  })
})