*** Settings ***
Documentation     Smoke tests for Decision DI wiring
Resource          ${CURDIR}/common.resource
Suite Setup       Setup Test Environment
Suite Teardown    Cleanup Test Environment

*** Variables ***
${HELPER_SCRIPT}    robot/helper_decision_di.py

*** Test Cases ***
Verify Decision DI Resolution
    [Documentation]    Verify DecisionService can be resolved from the DI container
    [Tags]    di    decision    smoke
    # Normal duration: ~5-10s. Timeout raised from 30s to 120s for pabot cold-start.
    ${result}=    Run Process    ${PYTHON}    ${HELPER_SCRIPT}    resolve-service    cwd=${WORKSPACE}    timeout=120s    on_timeout=kill
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    resolve-service-ok

Verify Decision Recording Integration
    [Documentation]    Verify DecisionService records decisions during lifecycle transitions
    [Tags]    di    decision    lifecycle    smoke
    # Normal duration: ~5-10s. Timeout raised from 30s to 120s for pabot cold-start.
    ${result}=    Run Process    ${PYTHON}    ${HELPER_SCRIPT}    record-integration    cwd=${WORKSPACE}    timeout=120s    on_timeout=kill
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    record-integration-ok
