Files
headquarter/openspec/specs/smart-tunnel-recovery/spec.md
T
Fusion 063a839790 feat: implement repository clone mode with SSH key support
- Add clone_mode and branch fields to tool_instances
- Add ssh_key_id to git_repositories for per-repo SSH key assignment
- Implement host-side git cloning with branch selection (default: main)
- Mount SSH keys into containers for git operations in clone mode
- Add dirty state check on clone-mode instance deletion with confirmation
- Update SessionsPage with mount/clone selector, branch input, SSH key display
- Add SSH key selector to repository creation form
- Add dirty delete confirmation modal with changed files list
- Update API schemas and endpoints for new fields
- Sync delta specs to main specs (git-repo, tool-instances, repo-clone-mode)
- Archive completed OpenSpec change: repo-clone-mode-with-ssh
- Document git requirement for custom tool types

Quality gates: Frontend typecheck and build passed
OpenSpec: repo-clone-mode-with-ssh archived with all tasks complete
2026-05-22 22:56:35 +02:00

1.6 KiB

ADDED Requirements

Requirement: Tunnel failure classification

The system SHALL distinguish tunnel failures from application errors when determining whether to recreate a tunnel.

Scenario: Tunnel is broken

  • GIVEN a running instance with a tunnel URL
  • WHEN the health check receives one of:
    • Connection refused (ECONNREFUSED)
    • Connection timeout (ETIMEDOUT)
    • DNS resolution failure (ENOTFOUND)
    • Empty response
  • THEN the tunnel status is "unreachable"
  • AND the frontend shows a "tunnel error" badge
  • AND the "Recreate Tunnel" button is enabled

Scenario: Application returns error

  • GIVEN a running instance with a tunnel URL
  • WHEN the health check receives HTTP 502, 503, or 504
  • THEN the tunnel status is "error_response"
  • AND the frontend shows an "app error" badge
  • AND the "Recreate Tunnel" button is NOT shown
  • AND the status code is displayed for diagnostics

Scenario: Application is healthy

  • GIVEN a running instance with a tunnel URL
  • WHEN the health check receives HTTP 200-399
  • THEN the tunnel status is "healthy"
  • AND no error badge is shown

Scenario: Tunnel recreates successfully

  • GIVEN an instance with a broken tunnel (status "unreachable")
  • WHEN the user clicks "Recreate Tunnel"
  • THEN the old cloudflared process is stopped
  • AND a new cloudflared process is started
  • AND the instance URL is updated
  • AND the tunnel status becomes "healthy" (after verification)

MODIFIED Requirements

None.

REMOVED Requirements

None.