Add versioned metric graph authority, owned browser evidence, paginated and all-tab traversal, deterministic sampling policies, and analyst-facing run inspection. Provision the DEV/PREPROD/PROD Superset, Gitea and million-row ClickHouse lab; retain reproducible lifecycle evidence and explicit incomplete-traversal limits.
44 lines
3.1 KiB
Python
44 lines
3.1 KiB
Python
# #region Tooling.FullFlowRuntimePrepare [C:3] [TYPE Module] [SEMANTICS test,mcp,bootstrap,revision]
|
|
# @BRIEF Obtain a current revision through the real MCP bootstrap and server-owned handle chain.
|
|
# @INVARIANT Preserve the earlier reference scenario; never edit registry pointers or graph bytes.
|
|
from mcp_client import McpClient
|
|
|
|
|
|
# #region Tooling.FullFlowRuntimePrepare.Mixin [C:3] [TYPE Class]
|
|
# @BRIEF Prepare a baseline-free supported T01 revision with authenticated MCP ownership.
|
|
class RuntimePrepareMixin:
|
|
# #region Tooling.FullFlowRuntimePrepare.Prepare [C:3] [TYPE Function]
|
|
# @POST Server bootstrap creates the current revision or exposes its actual typed gate failure.
|
|
def runtime_prepare(self):
|
|
mcp = McpClient(self)
|
|
environment = "full-flow-preprod"
|
|
dashboard = self.config.get("dashboard_id", 1)
|
|
inspected = mcp.call("runtime-inspect-dashboard", "inspect_dashboard_context", {
|
|
"environment_id": environment, "dashboard_id": dashboard})
|
|
run = mcp.call("runtime-create-agent", "create_agent_run", {
|
|
"dashboard_id": dashboard, "environment_id": environment,
|
|
"dashboard_name": "Sales", "idempotency_key": "full-flow-runtime-" + self.attempt})
|
|
compiled = mcp.call("runtime-compile", "inspect_scenario", {
|
|
"agent_run_id": run["run_id"], "query_model": inspected["query_model"],
|
|
"environment_id": environment, "dashboard_id": dashboard, "dashboard_name": "Sales",
|
|
"objective": {"goal": "Docker runtime schema evidence", "selected_case_ids": ["T01"]},
|
|
"checklist_catalog_version": 1, "baseline_version": "none", "has_dataset_fields": True,
|
|
"capabilities": {"dataset_field_read": True, "baseline": False},
|
|
"parameters": {"field_names": {"type": "string_list", "default": ["revenue", "orders", "region"]}}})
|
|
pack = mcp.call("runtime-register-pack", "register_draft_pack", {
|
|
"agent_run_id": run["run_id"], "scenario": compiled["scenario"]})
|
|
self.require("runtime-save-eligible", pack["status"] == "save_eligible" and pack["context_authority"] == "verified")
|
|
current = mcp.call("runtime-bootstrap-current", "bootstrap_authoring_scenario", {
|
|
"idempotency_key": "full-flow-bootstrap-" + self.attempt, "title": "Docker runtime schema evidence",
|
|
"dashboard_id": dashboard, "allowed_environment_ids": [environment],
|
|
"selected_environment_id": environment, "selected_case_ids": ["T01"],
|
|
"objective": "Run the real supported graph and retain the terminal outcome",
|
|
"compiled_handle_id": pack["compiled_handle_id"], "draft_pack_id": pack["draft_pack_handle_id"],
|
|
"draft_pack_digest": pack["draft_pack_digest"]})
|
|
self.require("runtime-current-revision", current["activation_status"] == "current")
|
|
self.ids.update(runtime_scenario_id=current["scenario_id"], runtime_revision_id=current["revision_id"])
|
|
self.flush()
|
|
# #endregion Tooling.FullFlowRuntimePrepare.Prepare
|
|
# #endregion Tooling.FullFlowRuntimePrepare.Mixin
|
|
# #endregion Tooling.FullFlowRuntimePrepare
|