Complete name-first 1C adapter saved-state support
This commit is contained in:
@@ -174,7 +174,7 @@ def run_smoke(endpoint_url: str, base_id: str, timeout: float, *, transport: str
|
||||
require(diagnostic_fallback.get("status") == "blocked", "MCP must block low-level diagnostic fallback methods", failures)
|
||||
require(diagnostic_fallback.get("reason") == "diagnostic_method", "MCP diagnostic fallback block must use diagnostic_method reason", failures)
|
||||
|
||||
blocked_effective = rpc_call(
|
||||
blocked_effective_apply = rpc_call(
|
||||
endpoint_url,
|
||||
"metadata.write",
|
||||
{
|
||||
@@ -189,11 +189,37 @@ def run_smoke(endpoint_url: str, base_id: str, timeout: float, *, transport: str
|
||||
transport=transport,
|
||||
session_id=session_id,
|
||||
)
|
||||
apply_gate = None
|
||||
if blocked_effective_apply.get("schema") == "onec_repository_write_gate.v1":
|
||||
apply_gate = {
|
||||
"status": blocked_effective_apply.get("status"),
|
||||
"error": blocked_effective_apply.get("error"),
|
||||
}
|
||||
# Repository/support coordination is allowed to block apply before the
|
||||
# metadata route is evaluated. Repeat in non-mutating plan mode so the
|
||||
# smoke still verifies the effective-path routing contract.
|
||||
blocked_effective = rpc_call(
|
||||
endpoint_url,
|
||||
"metadata.write",
|
||||
{
|
||||
"base_id": base_id,
|
||||
"target": {"canonical_path": "Документ.АвансовыйОтчет.Форма.ФормаДокумента.КнопкаЗаписать"},
|
||||
"mode": "plan",
|
||||
"edits": [{"property": "Заголовок", "value": "BLOCKED_SMOKE"}],
|
||||
"timeout_seconds": int(timeout),
|
||||
},
|
||||
timeout,
|
||||
transport=transport,
|
||||
session_id=session_id,
|
||||
)
|
||||
else:
|
||||
blocked_effective = blocked_effective_apply
|
||||
checks["blocked_effective_form_path"] = {
|
||||
"status": blocked_effective.get("status"),
|
||||
"error": blocked_effective.get("error"),
|
||||
"routed_method": blocked_effective.get("routed_method"),
|
||||
"target_kind": blocked_effective.get("target_kind"),
|
||||
**({"apply_gate": apply_gate} if apply_gate else {}),
|
||||
}
|
||||
require(blocked_effective.get("status") == "blocked", "effective canonical path write must be blocked", failures)
|
||||
require(blocked_effective.get("error") == "write_plan_required", "effective canonical path write must require write plan", failures)
|
||||
|
||||
Reference in New Issue
Block a user