Skip to main content

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:46optional(:exit).maybe(:hash)).

Question 1 — does DSAI relay rule-exit reasons verbatim?

  1. On a staging org, open a V2 agent (or create one) with ≥2 capabilities.
  2. Via the editor (or POST/PATCH /v2/ai_agents directly), add a routing rule whose THEN is an exit with a non-enum reason. Wire shape after build_routing_then:
    { "when": { "user_intent": "probe trigger phrase" },
    "exit": { "reason": "d3_probe_nonsense_reason" } }
    (FE payload equivalent: routing: [{ user_says: "probe trigger phrase", then: "exit", exit: { reason: "d3_probe_nonsense_reason" } }] — accepted by ai_agents_controller.rb:243+.)
  3. Confirm the pushed skill_pack carries the reason unchanged (sync log or DSAI-side dump).
  4. In a test conversation, send the trigger phrase so the rule fires.
  5. Observe the async reply in chatbot BE logs (ProcessAsyncReply receives {status, output_text, references, exit, token_usage}).
ObservationVerdictConsequence
exit.reason == "d3_probe_nonsense_reason" arrivesVerbatim relayBE mints resolve_conversation; "Resolve" ships in the THEN dropdown (PRD CHG-005)
Exit arrives with reason stripped/replaced, or DSAI rejects the pack at syncEnum enforced"Resolve" is cut from the MVP dropdown (D3/D8 cut path); no DSAI request raised
Rule never fires / no exit objectInconclusiveCheck 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_skillsync_to_ai_service.rb:506-518, 123-137), but DSAI's validator behavior is unknown.

  1. On the same staging agent, configure one capability with no completion (blank the Completion card, or POST the capability without a completion key).
  2. Sync, then run one conversation turn against that capability.
ObservationVerdictConsequence
Sync accepted + capability answers normallyToleratedKnowledge-only capabilities omit completion (PRD AISC-S02/AC-4 stands)
Sync rejected or runtime error referencing completionRequiredDerivation 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).