Skip to content

Conversation

@xavidop
Copy link
Owner

@xavidop xavidop commented Dec 15, 2025

added support for the following requests:

  1. buttons
  2. events
  3. intents

Summary by CodeRabbit

  • New Features

    • Added --show-tester-messages CLI flag (default: enabled) to control visibility of tester agent messages during agent-to-agent testing scenarios.
    • Extended test framework to support new interaction types: event-driven interactions, intent-based interactions with associated entities, and button interactions.
  • Documentation

    • Updated CLI command documentation across all commands to include the new flag.
    • Added guides and examples for new test interaction types.
  • Chores

    • Updated Go module dependencies and SBOM generation tooling.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR extends the CLI's interaction test framework with support for intents, entities, events, and button interactions. It introduces a new --show-tester-messages flag across all commands, adds intent/entity/button schema definitions, and implements handling logic for these new interaction types in the dialog manager.

Changes

Cohort / File(s) Summary
GitHub Workflows
.github/workflows/release_build.yml
SBOM generation tool (syft) version bumped from v0.20.10 to v0.20.11
CLI Documentation — --show-tester-messages Flag
docs/docs/cmd/voiceflow*.md, docs/docs/cmd/voiceflow_*/...md
New boolean --show-tester-messages flag (default: true) added to inherited options across all CLI command documentation files (~25 files total)
Schema Definitions
docs/docs/static/conversationsuite.json, docs/docs/static/conversationtest.json, docs/docs/static/swagger.json, docs/docs/static/swagger.yaml
New public schema types added: IntentEntity (name, value), IntentRequest (name, entities array); User and Interaction types extended with intent, event, and value properties
Test Documentation
docs/docs/tests/interaction-tests.md
Extended documentation with YAML examples for new interaction types: text, launch, event, intent, and button inputs, plus validation workflows
Go Module Dependencies
go.mod
Bumped qpack (v0.5.1 → v0.6.0) and quic-go (v0.54.1 → v0.57.0); updated transitive dependencies; removed go.uber.org/mock
Test Types
internal/types/tests/testTypes.go
New public types: IntentRequest, IntentEntity, Button, ButtonRequest; expanded User with Value, Event, Intent fields; added Buttons field to Interaction (not serialized)
Interaction Request Types
internal/types/voiceflow/interact/interactRequestTypes.go
New types: EventPayload, EventData, IntentPayload, IntentData, Entity; updated Action.Payload from string to interface{} with omitempty tag
Interaction Response Types
internal/types/voiceflow/interact/interactResponseTypes.go
New types: Choice and ChoicePayload to represent button response payloads
Dialog Calls
pkg/dialog/replay.go, pkg/dialog/start.go
Updated DialogManagerInteract calls to include additional nil argument for new availableButtons parameter
Test Common Utilities
pkg/test/common.go
Updated DialogManagerInteract call to pass additional nil argument for new parameter
Test Runner Logic
pkg/test/runner.go
Added button accumulation from choice responses; extended interaction logging for event, intent, launch, and button types; introduced validation propagation across responses; added convertToButtons helper function
Voiceflow Interaction Handler
pkg/voiceflow/interact.go
Extended DialogManagerInteract signature to accept availableButtons []tests.Button; added handling branches for event, intent, and button interaction types with payload construction
Server Docs
server/docs/docs.go
Added Swagger definitions for tests.IntentEntity and tests.IntentRequest; extended tests.User definition with event, intent, type, and value properties

Sequence Diagram

sequenceDiagram
    participant TestRunner as Test Runner
    participant Dialog as Dialog Manager
    participant Voiceflow as Voiceflow API
    participant TestTypes as Test Types

    TestRunner->>Dialog: Interaction (text/event/intent/button)<br/>+ availableButtons
    activate Dialog
    alt Interaction Type
        rect rgb(200, 240, 200)
            Dialog->>TestTypes: Extract button from<br/>previous response
            TestTypes-->>Dialog: availableButtons []Button
            Dialog->>Dialog: Accumulate buttons
        end
        rect rgb(220, 220, 240)
            Dialog->>Dialog: Match button by label<br/>in availableButtons
            Dialog->>Dialog: Build ButtonRequest<br/>(type + payload)
        end
        rect rgb(240, 220, 220)
            Dialog->>Dialog: Build EventPayload<br/>or IntentPayload<br/>(with entities)
        end
    end
    Dialog->>Voiceflow: InteractionRequest<br/>(Action with event/intent/button payload)
    activate Voiceflow
    Voiceflow-->>Dialog: InteractionResponse[]
    deactivate Voiceflow
    rect rgb(200, 240, 200)
        Dialog->>Dialog: Extract Choice response<br/>buttons for next iteration
    end
    Dialog-->>TestRunner: Response[] + buttons
    deactivate Dialog
    TestRunner->>TestRunner: Log interaction details<br/>Propagate remainingValidations<br/>Pass buttons to next interaction
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas requiring extra attention:

  • Button accumulation and propagation logic (pkg/test/runner.go): Verify that buttons from choice responses are correctly extracted, stored, and passed across interaction iterations; ensure the conversion helper convertToButtons properly handles the payload interface.
  • Event, intent, and button handling in interact.go (pkg/voiceflow/interact.go): Confirm payload construction for each new type (EventPayload, IntentPayload, button via available buttons) follows the correct structure and error handling; validate entity conversion logic for intents.
  • Function signature change impact (DialogManagerInteract): Ensure all call sites (pkg/dialog/replay.go, pkg/dialog/start.go, pkg/test/common.go) pass the new parameter correctly; verify nil vs. actual button data is appropriate at each call site.
  • Validation propagation changes (pkg/test/runner.go): Review the new remainingValidations logic to confirm validations accumulate correctly across all responses within an interaction and that final error reporting uses the correct validation state.
  • Schema and type consistency: Verify that new types in internal/types/tests/testTypes.go, interactRequestTypes.go, and schema files (swagger.json, conversationtest.json, etc.) are consistent and correctly cross-referenced.

Possibly related PRs

  • feat: add dialog command #18: Adds the dialog feature (dialog command, dialog pkg with start/replay, related internal types and docs) — directly modifies the same dialog-related files and foundational structures.
  • feat: agent to agent feature #32: Modifies test-related schema and internal test types (docs/docs/static/* and internal/types/tests/testTypes.go) — overlaps with schema and type definitions in this PR.

Poem

🐰 Buttons hop and intents shine bright,
Events flow through each test's flight,
With messages shown (or hidden tight),
The dialog runs its course just right!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch xavier/new-resquests

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2ba0d38 and 03ab33f.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (43)
  • .github/workflows/release_build.yml (1 hunks)
  • docs/docs/cmd/voiceflow.md (1 hunks)
  • docs/docs/cmd/voiceflow_agent.md (1 hunks)
  • docs/docs/cmd/voiceflow_agent_export.md (1 hunks)
  • docs/docs/cmd/voiceflow_analytics.md (1 hunks)
  • docs/docs/cmd/voiceflow_analytics_fetch.md (1 hunks)
  • docs/docs/cmd/voiceflow_completion.md (1 hunks)
  • docs/docs/cmd/voiceflow_completion_bash.md (1 hunks)
  • docs/docs/cmd/voiceflow_completion_fish.md (1 hunks)
  • docs/docs/cmd/voiceflow_completion_powershell.md (1 hunks)
  • docs/docs/cmd/voiceflow_completion_zsh.md (1 hunks)
  • docs/docs/cmd/voiceflow_dialog.md (1 hunks)
  • docs/docs/cmd/voiceflow_dialog_replay.md (1 hunks)
  • docs/docs/cmd/voiceflow_dialog_start.md (1 hunks)
  • docs/docs/cmd/voiceflow_document.md (1 hunks)
  • docs/docs/cmd/voiceflow_document_upload-file.md (1 hunks)
  • docs/docs/cmd/voiceflow_document_upload-url.md (1 hunks)
  • docs/docs/cmd/voiceflow_jsonschema.md (1 hunks)
  • docs/docs/cmd/voiceflow_kb.md (1 hunks)
  • docs/docs/cmd/voiceflow_kb_query.md (1 hunks)
  • docs/docs/cmd/voiceflow_server.md (1 hunks)
  • docs/docs/cmd/voiceflow_test.md (1 hunks)
  • docs/docs/cmd/voiceflow_test_execute.md (1 hunks)
  • docs/docs/cmd/voiceflow_transcript.md (1 hunks)
  • docs/docs/cmd/voiceflow_transcript_fetch-all.md (1 hunks)
  • docs/docs/cmd/voiceflow_transcript_fetch.md (1 hunks)
  • docs/docs/cmd/voiceflow_transcript_to-test.md (1 hunks)
  • docs/docs/cmd/voiceflow_version.md (1 hunks)
  • docs/docs/static/conversationsuite.json (2 hunks)
  • docs/docs/static/conversationtest.json (2 hunks)
  • docs/docs/static/swagger.json (2 hunks)
  • docs/docs/static/swagger.yaml (2 hunks)
  • docs/docs/tests/interaction-tests.md (1 hunks)
  • go.mod (1 hunks)
  • internal/types/tests/testTypes.go (1 hunks)
  • internal/types/voiceflow/interact/interactRequestTypes.go (1 hunks)
  • internal/types/voiceflow/interact/interactResponseTypes.go (1 hunks)
  • pkg/dialog/replay.go (1 hunks)
  • pkg/dialog/start.go (2 hunks)
  • pkg/test/common.go (1 hunks)
  • pkg/test/runner.go (2 hunks)
  • pkg/voiceflow/interact.go (2 hunks)
  • server/docs/docs.go (2 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@xavidop xavidop merged commit 684c1dc into main Dec 15, 2025
8 of 10 checks passed
@xavidop xavidop deleted the xavier/new-resquests branch December 15, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants