Conversation
Engine half of a coordinated pair with trustabl/agent-reliability-rules#83, on a branch of the same name so the rules-sync job resolves the matching pack rather than main. Neither half should merge alone — check-rules-sync.sh fails if they do. Mirrors claude_sdk/observability.yaml into testdata/rules-fixture and adds cases to policyRuleCases, as TestPolicyRules_AllRulesCovered requires. Three cases: the print, the module-logger remediation, and a pprint call that must stay silent. The third pins has_print_call's bare-callee behavior, so the rule cannot regress into substring matching that sweeps in pprint and every other callee whose name contains "print".
|
Thanks @bradAGI. The mirror is exact: the fixture copy of The three cases are well chosen. Neither silent case passes vacuously, because Two small things. Nice, tight pair otherwise, and I am glad to take it with those tidied up. |
What the pair adds
Claude SDK and MCP were the two mature packs with no observability rule (OAI-010 and ADK-009 cover the same
print()pattern). Two Claude-SDK-specific consequences go beyond the lost log line:The
fixreflects the first point: where the tool may be served over stdio, the log handler has to write to stderr. Swappingprintfor a logger that still defaults to stdout doesn't fix that case.What this PR does
claude_sdk/observability.yamlintotestdata/rules-fixture/.policyRuleCases, asTestPolicyRules_AllRulesCoveredrequires.print("looking up " + order_id)logger.info(...)pprint({...})The
pprintcase pinshas_print_call's bare-callee behavior against a regression into substring matching.Verification