KB-34D5

08 — Discovery v5 + RP/UI Readiness

3 min read Revision 1
dot-agent-apidiscovery-v5ui2026-06-04

08 — Discovery v5 + RP/UI Readiness (Workstream G)

v5 views LIVE (read-only, additive)

  1. v_process_discovery_agent_api_contract_status — per agent_api DOT: has_contract, contract_mode, endpoint_present, status ∈ {contract_missing, contract_ready_endpoint_missing, contract_and_endpoint_ready}.
  2. v_process_discovery_runner_contract_status — per candidate: runner_kind + agent_api_contracts/endpoints + dispatcher_available + status ∈ {not_agent_api_gated, contract_missing, contract_ready_no_endpoint, contract_and_endpoint_ready}.
  3. v_process_discovery_dryrun_plan_status — the plan ladder: contract_missing → contract_ready → dispatcher_ready → plan_only_tested → dryrun_ready (+ pass-through dry_run_observed/real_run_observed/verified).
  4. v_process_discovery_candidate_status_v5 — v4 + plan ladder; verified invariant preserved.
  5. v_process_discovery_birth_readiness_v5 — v4 birth gate (UNCHANGED) + plan-status columns.

Live read-back (MCP RO + container psql)

  • PROC-CAND:dot:kg: v4 runner_contract_missingv5 plan_only_tested; contracts=2, endpoints=0, dispatcher=true, prepared_obs=2.
  • PROC-CAND:job:cut: verified_candidate in both v4 and v5 (unchanged).
  • agent_api contract status: pilot pair = contract_ready_endpoint_missing; other 10 KG agent_api DOTs = contract_missing (uninflated).
  • verified_candidates_v3 count = 1 (job:cut). Invariant proven.

Status vocabulary (matches macro §11)

contract_missing · contract_ready · dispatcher_ready · fixture_ready · plan_only_tested · dryrun_ready · dryrun_observed · verified_candidate. No fake verified anywhere.

Note on RO timeout

candidate_status_v5 is a deep nested view; under the RO 5s statement_timeout it can cancel. UI should query it server-side without the 5s cap, or materialise. This is a perf note, not a correctness issue (it resolves instantly via the app/RW path).

RP / UI / API packet (patch-ready, operator-gated; no Nuxt math)

New read-only endpoints, each backed 1:1 by a v5 view (counts computed in PG):

  • GET /process-discovery/agent-api-contractsv_process_discovery_agent_api_contract_status
  • GET /process-discovery/runner-contractsv_process_discovery_runner_contract_status
  • GET /process-discovery/dryrun-planv_process_discovery_dryrun_plan_status
  • GET /process-discovery/candidate/:code/contract → contract rows for the candidate's DOTs
  • GET /process-discovery/candidate/:code/dryrun → the candidate's dryrun_plan_status + prepared-obs evidence

Badge rule (unchanged): "verified" badge sourced only from verified_candidates_v3. The dry-run-plan widget shows the exact missing step (here: agent_api endpoint missing). Deploy is operator-gated (Nuxt rebuild).

Back to Knowledge Hub knowledge/dev/reports/architecture/dot-agent-api-contract-dispatcher-dryrun-ui-registration-2026-06-04/08-discovery-v5-rp-ui-readiness.md