## ADDED Requirements ### Requirement: Readiness probe configuration The system SHALL use tool type readiness probe configuration during instance startup. #### Scenario: Web tool with custom probe - **GIVEN** a tool type with `readiness_probe` configured as: - `command: "curl -f http://localhost:8080/api/health"` - `timeout: 60` - `interval: 5` - **WHEN** an instance of this type starts - **THEN** the system executes the probe command inside the container - **AND** retries every 5 seconds for up to 60 seconds - **AND** the instance remains in "starting" status until probe succeeds #### Scenario: Web tool with default probe - **GIVEN** a web-enabled tool type with no `readiness_probe` configured - **WHEN** an instance of this type starts - **THEN** the system uses the default probe: `curl -f http://localhost:{port}` - **AND** retries every 2 seconds for up to 30 seconds #### Scenario: Probe command execution - **GIVEN** a readiness probe command - **WHEN** the system executes it inside the container - **THEN** it runs via `docker exec {container_id} sh -c "{command}"` - **AND** stdout/stderr are captured for diagnostics - **AND** exit code 0 indicates success ### Requirement: Probe result storage The system SHALL store readiness probe results for diagnostics. #### Scenario: Successful probe logged - **GIVEN** a readiness probe that succeeds - **WHEN** the probe returns exit code 0 - **THEN** the success is logged with timestamp - **AND** the instance status changes to "running" #### Scenario: Failed probe logged - **GIVEN** a readiness probe that fails or times out - **WHEN** the probe reaches timeout - **THEN** the failure is logged with last stdout/stderr output - **AND** the instance status changes to "unhealthy" - **AND** the probe output is available via the health endpoint ## MODIFIED Requirements None. ## REMOVED Requirements None.