D3 Staging Probe Brief (2026-07-22)
Owner: BOT BE · Effort: ~1 hour on staging · Blocks: only the "Resolve conversation" THEN option in the Simplified Config MVP (PRD §16 row 1). Everything else builds regardless.
Why a probe, not a code read: the DSAI service (qontak-ai-noncore-mrag, reached via
AI_SERVICE_ALICLOUD_BASE_URL / AiService::AiAgent) is not in our repos, so whether it
validates rule-exit reasons against the RFC §6.1 enum — or relays them verbatim — is
unobservable from the chatbot codebase. Rails-side both directions are already confirmed:
build_routing_then emits any exit.reason string unchanged (sync_to_ai_service.rb:538-546),
and process_async_reply applies no enum validation on receipt (app/api/internal_service/v1/ ai_agent/use_cases/process_async_reply.rb:46 — optional(:exit).maybe(:hash)).
Question 1 — does DSAI relay rule-exit reasons verbatim?
- On a staging org, open a V2 agent (or create one) with ≥2 capabilities.
- Via the editor (or
POST/PATCH /v2/ai_agentsdirectly), add a routing rule whose THEN is an exit with a non-enum reason. Wire shape afterbuild_routing_then:(FE payload equivalent:{ "when": { "user_intent": "probe trigger phrase" },"exit": { "reason": "d3_probe_nonsense_reason" } }routing: [{ user_says: "probe trigger phrase", then: "exit", exit: { reason: "d3_probe_nonsense_reason" } }]— accepted byai_agents_controller.rb:243+.) - Confirm the pushed
skill_packcarries the reason unchanged (sync log or DSAI-side dump). - In a test conversation, send the trigger phrase so the rule fires.
- Observe the async reply in chatbot BE logs (
ProcessAsyncReplyreceives{status, output_text, references, exit, token_usage}).
| Observation | Verdict | Consequence |
|---|---|---|
exit.reason == "d3_probe_nonsense_reason" arrives | Verbatim relay | BE mints resolve_conversation; "Resolve" ships in the THEN dropdown (PRD CHG-005) |
| Exit arrives with reason stripped/replaced, or DSAI rejects the pack at sync | Enum enforced | "Resolve" is cut from the MVP dropdown (D3/D8 cut path); no DSAI request raised |
| Rule never fires / no exit object | Inconclusive | Check rule matching first (user_intent phrasing); re-run with action_error WHEN before concluding |
Question 2 — does DSAI tolerate an omitted completion?
Rails legally omits it (build_completion → nil on blank, .compact in build_skill —
sync_to_ai_service.rb:506-518, 123-137), but DSAI's validator behavior is unknown.
- On the same staging agent, configure one capability with no completion (blank the
Completion card, or POST the capability without a
completionkey). - Sync, then run one conversation turn against that capability.
| Observation | Verdict | Consequence |
|---|---|---|
| Sync accepted + capability answers normally | Tolerated | Knowledge-only capabilities omit completion (PRD AISC-S02/AC-4 stands) |
| Sync rejected or runtime error referencing completion | Required | Derivation emits a synthetic no-op completion for knowledge-only capabilities — record the chosen shape in the RFC |
Recording the result
Update PRD §16 row 1 with the verdicts + date, and note the outcome in the RFC's routing section. If Q1 = enum-enforced, also remove "resolve" from the THEN enums in PRD CHG-005 / AISC-S04-S05 (one targeted edit + changelog row).