fix(#3164 Layer-2): add observability to self-heal identity gates #164
Reference in New Issue
Block a user
Delete Branch "fix/3164-layer2-self-heal-observability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fix(#3164 Layer-2): add observability to self-heal identity gates.
Behavior-preserving. Adds INFO logging to on_platform_agent_image / mcp_server_present / ensure_management_mcp_in_settings (logger
platform-agent.identity) so the management-MCP gate decision chain is greppable in concierge boot logs.43 lines + 5 new tests (pass) + 32 existing pass.
Opened on MiniMax's behalf (author write:issue 403 on PR-create). OPEN-ONLY per PM — not for merge until 2-genuine + ci green.
🤖 Generated with Claude Code
APPROVE on
30fdd52dad(target=main).5-axis review: this is behavior-preserving Layer-2 observability. The production diff only adds the platform-agent.identity logger and INFO lines around the existing on_platform_agent_image, ensure_management_mcp_in_settings skip path, and mcp_server_present delivery checks. The boolean/control-flow outcomes remain the same; intermediate variables only expose the already-computed gate decisions. Tests assert both return values and emitted log lines, so the coverage is non-vacuous for the RCA path.
Security: no token/secret material is logged. The env value emitted is MOLECULE_PLATFORM_AGENT_IMAGE_BAKED, a non-secret image marker, not credentials. MCP binary path and settings-entry presence are operational state only.
RCA lens: the logs expose the three gate decisions needed to debug the management-MCP fail-loud path from concierge boot/runtime logs: platform-agent image marker, management MCP self-heal skip reason, and binary/settings delivery presence. CI on this head is green: secret scan, lint, build, smoke-install, unit-tests, responsiveness-e2e.
REQUEST_CHANGES on
30fdd52dad(target=main).The diff is otherwise behavior-preserving: it adds INFO diagnostics around the existing gate decisions and does not change the return conditions for on_platform_agent_image, ensure_management_mcp_in_settings, or mcp_server_present. I did not see secrets logged; the env marker value and MCP binary path are diagnostic state, not credentials. CI is green on this head.
Blocking issue: the PR says these logs are under logger
platform-agent.identity, but the code useslogging.getLogger(__name__)(molecule_runtime.platform_agent_identity) and only embedsplatform-agent.identityin the message string. That means logger-based routing/filtering forplatform-agent.identitywill not work, and the tests capture the module logger rather than asserting the requested logger name. Please uselogging.getLogger("platform-agent.identity")(or otherwise make the logger name exactly that) and update tests to assert the logger name, not just message text.New commits pushed, approval review dismissed automatically according to repository settings
APPROVE on
9c770eafe0(target=main).Re-verified the current head after CR2 RC 13372. The only delta from my prior approved head is the logger-name fix: PLATFORM_AGENT_IDENTITY_LOGGER = "platform-agent.identity", getLogger(constant), caplog updated to that stable logger, and a regression test asserting the explicit name. This preserves behavior and strengthens the operator grep contract.
No control-flow change, no secret/token logging introduced. The logged env value remains the non-secret MOLECULE_PLATFORM_AGENT_IMAGE_BAKED marker; the rest is boolean/path observability for the self-heal gate chain.
CI on this head is green: secret scan, lint, build, smoke-install, unit-tests, responsiveness-e2e.
APPROVE on
9c770eafe0(target=main).Re-review confirms RC 13372 is resolved: platform_agent_identity now pins PLATFORM_AGENT_IDENTITY_LOGGER = "platform-agent.identity" and uses logging.getLogger(PLATFORM_AGENT_IDENTITY_LOGGER), and the new test asserts both the constant and resolved logger identity.
5-axis: behavior remains logging-only; the gate return conditions for on_platform_agent_image, ensure_management_mcp_in_settings, and mcp_server_present are unchanged. The INFO lines expose only diagnostic booleans, the non-secret platform-agent marker value, and the MCP binary path; no credentials/secrets are logged. Performance impact is minimal INFO logging on existing gate calls. Tests cover the explicit logger name and each observable gate path. CI is green on this head.