version: 1
kind: HwlabWebProbeSentinelScenarios
metadata:
  id: web-probe-sentinel-multi-scenario-suite
  owner: UniDesk
  specRef: PJ2026-01060508
sentinel:
  scenarios:
    - id: workbench-dsflash-go-single-turn-smoke
      enabled: true
      cadence: 1h
      observeTargetPath: /workbench
      sampleIntervalMs: 1000
      screenshotIntervalMs: 60000
      maxRunSeconds: 300
      providerProfile: dsflash-go
      providerProfileMode: exact
      promptSetRef: config/hwlab-web-probe-sentinel/prompt-set.dsflash-go.yaml#sentinel.promptSet
      reportViewRef: config/hwlab-web-probe-sentinel/report-views.multi-sentinel.yaml#sentinel.reportViews
      commandSequence:
        - type: newSession
        - type: selectProvider
          provider: dsflash-go
        - type: sendPrompt
          promptSource: promptSet
          repeat: 1

    - id: workbench-dsflash-go-hwpod-two-turn-freeze-repro
      enabled: true
      cadence: 1h
      observeTargetPath: /workbench
      sampleIntervalMs: 1000
      screenshotIntervalMs: 60000
      maxRunSeconds: 360
      providerProfile: dsflash-go
      providerProfileMode: exact
      promptSetRef: config/hwlab-web-probe-sentinel/prompt-set.dsflash-go.yaml#sentinel.promptSet
      reportViewRef: config/hwlab-web-probe-sentinel/report-views.multi-sentinel.yaml#sentinel.reportViews
      commandSequence:
        - type: newSession
        - type: selectProvider
          provider: dsflash-go
        - type: sendPrompt
          text: hi
        - type: sendPrompt
          text: 看看有什么hwpod可用

    - id: workbench-dsflash-go-tool-call-10x
      enabled: true
      cadence: 1h
      observeTargetPath: /workbench
      sampleIntervalMs: 1000
      screenshotIntervalMs: 60000
      maxRunSeconds: 1200
      providerProfile: dsflash-go
      providerProfileMode: exact
      promptSetRef: config/hwlab-web-probe-sentinel/prompt-set.dsflash-go.yaml#sentinel.promptSet
      reportViewRef: config/hwlab-web-probe-sentinel/report-views.multi-sentinel.yaml#sentinel.reportViews
      commandSequence:
        - type: newSession
        - type: selectProvider
          provider: dsflash-go
        - type: sendPrompt
          promptSource: promptSet
          repeat: 10
      sessionInvarianceChecks:
        - id: after-round-1-navigation-invariance
          afterRound: 1
          refreshCurrent: true
          switchAwayAndBack: true
          alternateSessionStrategy: existing-or-create
          assertSessionInvariant: true
          expectedSentinelRange: sentinel-01..sentinel-01
          findingId: workbench-message-order-user-clustered-after-navigation
          severity: amber
          blocking: false
        - id: after-round-5-navigation-invariance
          afterRound: 5
          refreshCurrent: true
          switchAwayAndBack: true
          alternateSessionStrategy: existing-or-create
          assertSessionInvariant: true
          requireComposerReady: true
          expectedSentinelRange: sentinel-01..sentinel-05
          findingId: workbench-message-order-user-clustered-after-navigation
          severity: amber
          blocking: false
        - id: after-round-10-refresh-invariance
          afterRound: 10
          refreshCurrent: true
          switchAwayAndBack: false
          assertSessionInvariant: true
          expectedSentinelRange: sentinel-01..sentinel-10
          findingId: workbench-message-order-user-clustered-after-navigation
          severity: amber
          blocking: false

    - id: workbench-auth-session-switch-2users
      enabled: true
      cadence: 1h
      observeTargetPath: /workbench
      sampleIntervalMs: 1000
      screenshotIntervalMs: 60000
      maxRunSeconds: 900
      providerProfile: session-switch-sentinel
      providerProfileMode: exact
      promptSetRef: config/hwlab-web-probe-sentinel/prompt-set.auth-session-switch.yaml#sentinel.promptSet
      reportViewRef: config/hwlab-web-probe-sentinel/report-views.multi-sentinel.yaml#sentinel.reportViews
      accounts:
        - id: account-a
          sourcePurpose: account-a
          usernameKey: username
          passwordKey: password
        - id: account-b
          sourcePurpose: account-b
          usernameKey: username
          passwordKey: password
      commandSequence:
        - type: loginAccount
          accountId: account-a
        - type: listSessions
        - type: logout
        - type: loginAccount
          accountId: account-b
        - type: listSessions
        - type: switchSessions
          fromAccountId: account-b
          toAccountId: account-a
        - type: listSessions
        - type: logout

    - id: mdtodo-visual-regression
      enabled: true
      cadence: 1h
      observeTargetPath: /projects/mdtodo
      viewport: 1440x900
      sampleIntervalMs: 1000
      screenshotIntervalMs: 60000
      maxRunSeconds: 360
      providerProfile: dsflash-go
      providerProfileMode: exact
      promptSetRef: config/hwlab-web-probe-sentinel/prompt-set.dsflash-go.yaml#sentinel.promptSet
      reportViewRef: config/hwlab-web-probe-sentinel/report-views.multi-sentinel.yaml#sentinel.reportViews
      commandSequence:
        - type: goto
          path: /projects/mdtodo/sources/constart-71freq-mdtodo/files/file_0db4dc4e46adf188/tasks/R1
        - type: screenshot
          label: mdtodo-desktop-few-task-gap
          waitProjectManagementReady: true
        - type: goto
          path: /projects/mdtodo/sources/constart-71freq-mdtodo/files/file_5f9645ffe8774b92/tasks/R14
        - type: screenshot
          label: mdtodo-r14-selected
          waitProjectManagementReady: true
        - type: openMdtodoReportPreview
          task: R14
          link: R14
        - type: screenshot
          label: mdtodo-r14-report-preview
          waitProjectManagementReady: true
        - type: toggleMdtodoReportFullscreen
          text: toggle
        - type: screenshot
          label: mdtodo-r14-report-fullscreen
          waitProjectManagementReady: true
