Add it for AI-Workspace CLI#2672
Conversation
Dependency Validation ResultsDependency name: github.com/cucumber/godog |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds a daily/manual Docker-backed Godog E2E suite for AI Workspace CLI artifact creation and updates across LLM providers, LLM proxies, and MCP proxies. It also adds resource fixtures and updates a subscription command test payload expectation. ChangesAI Workspace CLI end-to-end suite
Subscription command test expectation
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Godog
participant APCli
participant PlatformAPI
Godog->>APCli: initialize and stage artifact resources
Godog->>APCli: build and apply artifact
APCli->>PlatformAPI: create or update artifact
Godog->>APCli: get and list artifact
APCli->>PlatformAPI: retrieve persisted artifact
PlatformAPI-->>APCli: return artifact and gateway association
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (2)
.github/workflows/ai-workspace-cli-e2e.yml (1)
25-27: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winAdd a job-level
timeout-minutes.Without it, a hung Docker build or CLI build could occupy the runner for GitHub's default 360-minute cap, well beyond the intended ~20m test budget.
⏱️ Proposed fix
jobs: ai-workspace-cli-e2e: runs-on: ubuntu-24.04 + timeout-minutes: 45 steps:🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ai-workspace-cli-e2e.yml around lines 25 - 27, Add a job-level timeout-minutes setting to the ai-workspace-cli-e2e job, using a value aligned with the intended approximately 20-minute test budget. Keep the existing runs-on and steps configuration unchanged.tests/ai-workspace-cli-e2e/suite_test.go (1)
74-79: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low valueConsider pinning
MinVersionon the test HTTP client.
InsecureSkipVerifyis justified here (local self-signed cert,#nosec-annotated), but thetls.Confighas noMinVersion. Purely defense-in-depth for this localhost-only test client.🔒 Optional hardening
var httpClient = &http.Client{ Timeout: 30 * time.Second, Transport: &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // `#nosec` G402 — local self-signed cert + TLSClientConfig: &tls.Config{InsecureSkipVerify: true, MinVersion: tls.VersionTLS13}, // `#nosec` G402 — local self-signed cert }, }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/ai-workspace-cli-e2e/suite_test.go` around lines 74 - 79, Harden the test HTTP client’s TLS configuration by setting an explicit modern minimum TLS version in the tls.Config used by httpClient. Preserve the existing InsecureSkipVerify setting and its justification, and limit the change to this local test client.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@portals/developer-portal/configs/config.yaml`:
- Line 70: Quote the value assigned to validateResponses so YAML parses it as
the literal string "off" rather than a boolean, while leaving the existing
configuration key and intended value unchanged.
In `@tests/ai-workspace-cli-e2e/resources/llm-provider/definition.yaml`:
- Around line 1383-1401: Update the minimum constraints for
ephemeral_1h_input_tokens, ephemeral_5m_input_tokens, and
ServerToolUseUsage.web_search_requests in the schema so their default value of 0
is valid, preferably by changing each minimum from 1 to 0 while preserving the
existing defaults.
- Around line 4191-4201: Update all five generate, improve, and templatize
request/response schemas in the YAML definition so their required lists use
messages instead of message, matching the defined messages property. Ensure
messages is required consistently in each affected schema and remove the
incorrect message requirement.
In `@tests/ai-workspace-cli-e2e/resources/llm-provider/edit/runtime.yaml`:
- Line 1: Update the apiVersion in the llm-provider edit fixture to
gateway.api-platform.wso2.com/v1, matching the create fixture and other e2e
resources; do not change any other manifest content.
In `@tests/ai-workspace-cli-e2e/resources/llm-proxy/create/runtime.yaml`:
- Around line 51-72: Update both policy path entries in
tests/ai-workspace-cli-e2e/resources/llm-proxy/create/runtime.yaml lines 51-72
and tests/ai-workspace-cli-e2e/resources/llm-proxy/edit/runtime.yaml lines 64-85
from /v1/experimental/generate_prompt to the declared OpenAPI path /v1/messages;
leave the policy parameters unchanged.
In `@tests/ai-workspace-cli-e2e/resources/llm-proxy/definition.yaml`:
- Around line 856-868: Update the message schema unions containing the shown
refs and the corresponding union around the later occurrence to include both
RequestMCPToolResultBlock and ResponseMCPToolUseBlock, preserving all existing
entries so valid MCP request and response exchanges pass schema validation and
remain available to generated clients.
---
Nitpick comments:
In @.github/workflows/ai-workspace-cli-e2e.yml:
- Around line 25-27: Add a job-level timeout-minutes setting to the
ai-workspace-cli-e2e job, using a value aligned with the intended approximately
20-minute test budget. Keep the existing runs-on and steps configuration
unchanged.
In `@tests/ai-workspace-cli-e2e/suite_test.go`:
- Around line 74-79: Harden the test HTTP client’s TLS configuration by setting
an explicit modern minimum TLS version in the tls.Config used by httpClient.
Preserve the existing InsecureSkipVerify setting and its justification, and
limit the change to this local test client.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e2063544-7391-4c93-9c5b-9fad1e9eb1f4
⛔ Files ignored due to path filters (2)
go.workis excluded by!**/*.worktests/ai-workspace-cli-e2e/go.sumis excluded by!**/*.sum
📒 Files selected for processing (25)
.github/workflows/ai-workspace-cli-e2e.ymlcli/src/cmd/devportal/subscription/commands_test.goportals/developer-portal/configs/config.yamltests/ai-workspace-cli-e2e/README.mdtests/ai-workspace-cli-e2e/docker-compose.yamltests/ai-workspace-cli-e2e/features/ai-workspace-cli.featuretests/ai-workspace-cli-e2e/go.modtests/ai-workspace-cli-e2e/platform-api-config.tomltests/ai-workspace-cli-e2e/resources/llm-provider/create/metadata.yamltests/ai-workspace-cli-e2e/resources/llm-provider/create/runtime.yamltests/ai-workspace-cli-e2e/resources/llm-provider/definition.yamltests/ai-workspace-cli-e2e/resources/llm-provider/edit/metadata.yamltests/ai-workspace-cli-e2e/resources/llm-provider/edit/runtime.yamltests/ai-workspace-cli-e2e/resources/llm-proxy/create/metadata.yamltests/ai-workspace-cli-e2e/resources/llm-proxy/create/runtime.yamltests/ai-workspace-cli-e2e/resources/llm-proxy/definition.yamltests/ai-workspace-cli-e2e/resources/llm-proxy/edit/metadata.yamltests/ai-workspace-cli-e2e/resources/llm-proxy/edit/runtime.yamltests/ai-workspace-cli-e2e/resources/mcp/create/metadata.yamltests/ai-workspace-cli-e2e/resources/mcp/create/runtime.yamltests/ai-workspace-cli-e2e/resources/mcp/definition.yamltests/ai-workspace-cli-e2e/resources/mcp/edit/metadata.yamltests/ai-workspace-cli-e2e/resources/mcp/edit/runtime.yamltests/ai-workspace-cli-e2e/steps_test.gotests/ai-workspace-cli-e2e/suite_test.go
Dependency Validation ResultsDependency name: github.com/cucumber/godog |
Dependency Validation ResultsDependency name: github.com/cucumber/godog |
Dependency Validation ResultsDependency name: github.com/cucumber/godog |
Dependency Validation ResultsDependency name: github.com/cucumber/godog |
Purpose