Files
headquarter/openspec/changes/archive/2026-05-14-codeserver-spawn/specs/tool-spawn-api/spec.md
T
alex 78aaddb2b5
CI / Web CI (push) Failing after 12s
CI / API CI (push) Failing after 1m1s
docs(openspec): add OpenSpec changes for FN-005, FN-006, FN-008, FN-009, FN-010
- Add frontend-foundation change (FN-005) with 46 tasks
- Add deployment-config change (FN-006) with 27 tasks
- Add runfusion-poc/opencode-poc change (FN-008) with 25 tasks
- Add config-secrets change (FN-009) with 31 tasks
- Add codeserver-spawn change (FN-010) with 38 tasks
- Include project specsheet and configuration
- Archive completed deployment-config change
2026-05-14 17:35:20 +02:00

1.2 KiB

ADDED Requirements

Requirement: API can spawn a tool instance

The system SHALL provide an endpoint to create and start a tool instance.

Scenario: Spawn code-server

  • WHEN a POST request is made to /api/v1/tool-instances with tool_id and project_id
  • THEN the system creates a ToolInstance record
  • AND generates a Docker Compose service definition
  • AND starts the container via Docker Compose API
  • AND returns the tool instance with status "creating"

Scenario: Spawn with config overrides

  • WHEN a spawn request includes config overrides
  • THEN the overrides are merged with scope-resolved configs
  • AND applied to the container environment

Requirement: Spawn validates prerequisites

The system SHALL validate prerequisites before spawning.

Scenario: Valid project

  • WHEN the spawn request references a project
  • THEN the project must exist and belong to the user
  • AND the tool definition must exist in the registry

Scenario: Duplicate spawn prevention

  • WHEN a spawn request is made for an already-running instance
  • THEN the system returns the existing instance
  • AND does not create a duplicate container