sycommon-python-lib 0.2.10a20__tar.gz → 0.2.10a22__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/PKG-INFO +7 -7
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/pyproject.toml +14 -7
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/monitor.py +80 -39
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/kafka_log.py +44 -4
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon_python_lib.egg-info/PKG-INFO +7 -7
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon_python_lib.egg-info/SOURCES.txt +1 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon_python_lib.egg-info/requires.txt +6 -6
- sycommon_python_lib-0.2.10a22/tests/test_alert_monitor.py +212 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_skill_regex_upgrade.py +13 -11
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_sylogger_fixes.py +124 -36
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/README.md +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/acp/config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/acp/executor.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/acp/registry.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/acp/server.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/cli.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/acp_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/acp_serve_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/acp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/acp/client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/acp/fetch.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/acp/server_adapter.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/acp/ssh_init.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/acp/tool.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/deep_agent.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/middleware/model_request_prep.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/middleware/sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/middleware/sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/middleware/skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/reasoning_content_patch.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/resume_compactor.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/minio_sync.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/skills_retry_patch.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/agent/summarization_utils.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/alert_sdk.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/ao.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/api.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/bridge.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/env.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/guard.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/queue.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/ratelimit.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/sdk.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/sdk_selfcheck.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/ACPAgentConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/EgressPolicyConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/config/config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/health/readiness.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/token_utils.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/bounded_kafka_sink.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/bounded_stdout_sink.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/log_masker.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/egress_wall.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/sandbox_gateway.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/agent/loop.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/agent/types.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/coding/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/coding/mcpserver.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/json_parse.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/message.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/model.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/retry.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/transcript.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/transform.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/usage.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/core/validation.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/mcp/client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/mcp/jsonrpc.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/mcp/transport.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/providers/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/providers/anthropic_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/providers/bedrock_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/providers/faux.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/providers/google_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/providers/kimi_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/pi/providers/openai_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/delay_queue.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/mq_store.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbit_management_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/rabbitmq/topic_registry.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/nacos_async_loop.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/nacos_connection_alert_listener.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_backend_factory_compat.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_consume_dedup.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_consumer_broker_health.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_consumer_recovery_fix.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_consumer_tags_sync.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_db_keepalive.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_env_tenant_helper.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_exp_concurrent_migrate.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_exp_delete_queue_with_consumers.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_fault_injection_real.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_heartbeat_timeout.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_integration_real_broker.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_mq_config_driven.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_nacos_llm_real.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_queue_priority_fallback.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_queue_priority_upgrade_timing.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_reconnect_scenarios.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_sandbox_glob_hardening.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_services_plugin_defaults.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_upgrade_aio_pika.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_upgrade_langgraph_stream.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tests/test_upgrade_verification.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/sso_token.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/time_utils.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/tools/user_id.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_acp_tool.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_config_change_notifier.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_frame_alignment.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_hotreload_snapshot.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_kafka_upie_fix.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_llm_apikey_contextvar.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_log_masker.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_print_capture.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_resilient_pg_saver.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_sandbox_path_guard.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_sensitive_guard.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_simple_chat_agent.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_skill_write_guard.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_sql_params_full.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_streaming_e2e.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_summary_echo_break_loop.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_sycli.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_sync_skills_to_sandbox.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_time_utils.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_traceid_omit_base64.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_unicode_decode_regress.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_upload_concurrency.py +0 -0
- {sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_upload_e2e_http.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10a22
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -14,16 +14,16 @@ Requires-Dist: elasticsearch==9.5.1
|
|
|
14
14
|
Requires-Dist: fastapi==0.143.0
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.11
|
|
17
|
-
Requires-Dist: langchain==1.4.
|
|
18
|
-
Requires-Dist: langchain-core==1.
|
|
19
|
-
Requires-Dist: langchain-openai==1.7.
|
|
20
|
-
Requires-Dist: langfuse==5.0.
|
|
21
|
-
Requires-Dist: langgraph==1.2.
|
|
17
|
+
Requires-Dist: langchain==1.4.7
|
|
18
|
+
Requires-Dist: langchain-core==1.7.0
|
|
19
|
+
Requires-Dist: langchain-openai==1.7.3
|
|
20
|
+
Requires-Dist: langfuse==5.0.4
|
|
21
|
+
Requires-Dist: langgraph==1.2.18
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.2.0
|
|
23
23
|
Requires-Dist: langgraph-checkpoint-redis==0.5.2
|
|
24
24
|
Requires-Dist: ldap3==2.9.1
|
|
25
25
|
Requires-Dist: loguru==0.7.3
|
|
26
|
-
Requires-Dist: mysql-connector-python==26.
|
|
26
|
+
Requires-Dist: mysql-connector-python==26.10.0
|
|
27
27
|
Requires-Dist: nacos-sdk-python==3.2.0
|
|
28
28
|
Requires-Dist: psutil==7.2.2
|
|
29
29
|
Requires-Dist: pyxxl==0.4.8
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.10a22"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -15,16 +15,16 @@ dependencies = [
|
|
|
15
15
|
"fastapi==0.143.0",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
17
|
"kafka-python==3.0.11",
|
|
18
|
-
"langchain==1.4.
|
|
19
|
-
"langchain-core==1.
|
|
20
|
-
"langchain-openai==1.7.
|
|
21
|
-
"langfuse==5.0.
|
|
22
|
-
"langgraph==1.2.
|
|
18
|
+
"langchain==1.4.7",
|
|
19
|
+
"langchain-core==1.7.0",
|
|
20
|
+
"langchain-openai==1.7.3",
|
|
21
|
+
"langfuse==5.0.4",
|
|
22
|
+
"langgraph==1.2.18",
|
|
23
23
|
"langgraph-checkpoint-postgres==3.2.0",
|
|
24
24
|
"langgraph-checkpoint-redis==0.5.2",
|
|
25
25
|
"ldap3==2.9.1",
|
|
26
26
|
"loguru==0.7.3",
|
|
27
|
-
"mysql-connector-python==26.
|
|
27
|
+
"mysql-connector-python==26.10.0",
|
|
28
28
|
"nacos-sdk-python==3.2.0",
|
|
29
29
|
"psutil==7.2.2",
|
|
30
30
|
"pyxxl==0.4.8",
|
|
@@ -60,8 +60,15 @@ build-backend = "setuptools.build_meta"
|
|
|
60
60
|
[dependency-groups]
|
|
61
61
|
dev = [
|
|
62
62
|
"pytest>=9.0.3",
|
|
63
|
+
"pytest-asyncio>=1.3.0",
|
|
63
64
|
]
|
|
64
65
|
|
|
66
|
+
# asyncio_mode=auto:src/sycommon/tests 内的 async 测试(如
|
|
67
|
+
# test_consumer_loss_rootcause.py)无 @pytest.mark.asyncio 标记,
|
|
68
|
+
# STRICT 模式下直接报 "not natively supported"(2026-10-28 实测)。
|
|
69
|
+
[tool.pytest.ini_options]
|
|
70
|
+
asyncio_mode = "auto"
|
|
71
|
+
|
|
65
72
|
[project.scripts]
|
|
66
73
|
sycommon = "command.cli:main"
|
|
67
74
|
sycli = "sycli.cli:main"
|
{sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/alert/monitor.py
RENAMED
|
@@ -6,12 +6,16 @@ Java GcMonitor(字节码):GC 占比 = ΔGC时间/Δ窗口(GarbageCollectorMXBean
|
|
|
6
6
|
默认 true;msg "GC占比: %.2f%% (GC时间: %d ms / 统计窗口: %d ms)";标题
|
|
7
7
|
GC致命告警/GC严重告警/GC告警;扫描>500ms warn 耗时过长。
|
|
8
8
|
|
|
9
|
-
Python 等价物:gc
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
Python 等价物:gc.callbacks(since 3.7)start/stop 时刻差(perf_counter)
|
|
10
|
+
累计单次 GC 真实时长 — 实测 3.11–3.14 的 stop info 均无 duration 字段
|
|
11
|
+
(官方文档亦只定义 generation/collected/uncollectable/candidates),CPython
|
|
12
|
+
无现成单次 GC 计时 API,计时差是唯一可靠来源。累计器差分/窗口 — 与 Java
|
|
13
|
+
ΔgcTime/Δwindow、Go PauseTotalNs 差分同语义。与 Java 的已知差异:Java
|
|
14
|
+
排除 young GC;CPython gen0 单次亚毫秒,全代求和对时间占比影响可忽略,
|
|
15
|
+
且无独立 collector 累计时间可拆。
|
|
16
|
+
【历史缺陷(2026-10 修复)】:旧实现用 collections 计数差分冒充时间占比
|
|
17
|
+
(每秒次数×100 硬套 "%%" 模板),高频小 GC(10 次/10s)即误报 fatal
|
|
18
|
+
"GC占比: 99.70% (GC时间: 10 次)"。
|
|
15
19
|
|
|
16
20
|
DatasourceMonitor(Druid/Hikari MBean):Python 等价物是 SQLAlchemy engine
|
|
17
21
|
pool.status()(checkedin/checkedout/size/overflow),经 register_db_stats 注入;
|
|
@@ -28,11 +32,45 @@ from sycommon.alert.api import critical, fatal, warn
|
|
|
28
32
|
from sycommon.alert.env import app_name_of_sdk, get_bool, get_float, get_int
|
|
29
33
|
from sycommon.logging.kafka_log import SYLogger
|
|
30
34
|
|
|
31
|
-
_db_stats_func: Optional[Callable[dict]] = None
|
|
35
|
+
_db_stats_func: Optional[Callable[[], dict]] = None
|
|
32
36
|
_started = False
|
|
33
37
|
|
|
38
|
+
# gc.callbacks stop 事件的累计毫秒数(单调递增)+ start 时刻(perf_counter)。
|
|
39
|
+
# 回调在持 GIL 下串行执行、全程无 GIL 释放点,读侧只读单个 float — 无需锁;
|
|
40
|
+
# 理论竞态最坏丢一次累加(仅监控口径,可容忍)。
|
|
41
|
+
_gc_time_ms = 0.0
|
|
42
|
+
_gc_last_start = 0.0
|
|
43
|
+
_gc_hook_installed = False
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
|
|
46
|
+
def _on_gc_event(phase: str, info: dict) -> None: # noqa: ARG001 — gc 回调签名
|
|
47
|
+
"""gc.callbacks 回调:start 记时刻;stop 累计单次 GC 真实时长(ms)。
|
|
48
|
+
|
|
49
|
+
时长 = stop 时刻 - start 时刻(perf_counter)。实测 3.11–3.14 的 stop
|
|
50
|
+
info 都没有 duration 字段(官方文档仅定义 generation/collected/
|
|
51
|
+
uncollectable/candidates),计时差是 CPython 下唯一可靠来源,含回调派发
|
|
52
|
+
开销(微秒级,方向只高估不低估)。未见过 start 的孤儿 stop 按 0 处理
|
|
53
|
+
(防 perf_counter 大数污染)。不访问 info 内容 — 字段形态任何版本
|
|
54
|
+
差异都不会抛异常(gc 回调内抛异常 = 每次 GC 刷 unraisable 栈到
|
|
55
|
+
stderr,性能事故)。单次成本:2×perf_counter + 浮点加,亚微秒级。
|
|
56
|
+
"""
|
|
57
|
+
global _gc_time_ms, _gc_last_start
|
|
58
|
+
if phase == 'start':
|
|
59
|
+
_gc_last_start = time.perf_counter()
|
|
60
|
+
else:
|
|
61
|
+
if _gc_last_start:
|
|
62
|
+
_gc_time_ms += (time.perf_counter() - _gc_last_start) * 1000.0
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _install_gc_hook() -> None:
|
|
66
|
+
global _gc_hook_installed
|
|
67
|
+
if _gc_hook_installed:
|
|
68
|
+
return
|
|
69
|
+
_gc_hook_installed = True
|
|
70
|
+
gc.callbacks.append(_on_gc_event)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def register_db_stats(func: Callable[[], dict]) -> None:
|
|
36
74
|
"""注入连接池饱和度数据源(Java Hikari/Druid MBean 等价物)。
|
|
37
75
|
|
|
38
76
|
func 返回 {"in_use": int, "max_open": int};max_open<=0 视为未配置。
|
|
@@ -67,6 +105,7 @@ def start_monitors() -> None:
|
|
|
67
105
|
try:
|
|
68
106
|
interval = get_int("sy-alert.gc-monitor.scan-interval-seconds", 10)
|
|
69
107
|
SYLogger.info(f"GC监控开启, 扫描间隔为: {interval} 秒")
|
|
108
|
+
_install_gc_hook()
|
|
70
109
|
loop.create_task(_gc_monitor_loop(interval))
|
|
71
110
|
if _db_stats_func is not None:
|
|
72
111
|
ds_interval = get_int("sy-alert.datasource.scan-interval-seconds", 10)
|
|
@@ -77,47 +116,53 @@ def start_monitors() -> None:
|
|
|
77
116
|
_started = False
|
|
78
117
|
|
|
79
118
|
|
|
119
|
+
def _gc_check_and_alert(delta_ms: int, window_ms: int) -> None:
|
|
120
|
+
"""Java GcMonitor.checkAndAlert 等价:真·时间占比 → 阈值 → 告警。
|
|
121
|
+
|
|
122
|
+
delta_ms/window_ms 均为毫秒;rate = ΔGC时间/Δ窗口(与 Java、Go 同语义)。
|
|
123
|
+
"""
|
|
124
|
+
rate = delta_ms / window_ms
|
|
125
|
+
msg = (f"GC占比: {rate * 100:.2f}% (GC时间: {delta_ms} ms / "
|
|
126
|
+
f"统计窗口: {window_ms} ms)")
|
|
127
|
+
# Java checkAndAlert:每轮先 info "GC监控:{msg}";告警第二参是裸 msg
|
|
128
|
+
# (无 "GC监控:" 前缀 — 4 轮审核纠偏)。
|
|
129
|
+
SYLogger.info(f"GC监控:{msg}")
|
|
130
|
+
falt = get_float("sy-alert.gc-monitor.threshold.falt", 0.5)
|
|
131
|
+
crit = get_float("sy-alert.gc-monitor.threshold.critical", 0.2)
|
|
132
|
+
warning = get_float("sy-alert.gc-monitor.threshold.warning", 0.05)
|
|
133
|
+
if rate < warning:
|
|
134
|
+
return
|
|
135
|
+
if get_bool("sy-alert.gc-monitor.enable", True):
|
|
136
|
+
if rate >= falt:
|
|
137
|
+
fatal("GC致命告警", msg)
|
|
138
|
+
elif rate >= crit:
|
|
139
|
+
critical("GC严重告警", msg)
|
|
140
|
+
else:
|
|
141
|
+
warn("GC告警", msg)
|
|
142
|
+
else:
|
|
143
|
+
SYLogger.warning(f"GC监控未开启,但当前GC率已达到告警阈值:{msg}")
|
|
144
|
+
|
|
145
|
+
|
|
80
146
|
async def _gc_monitor_loop(interval_s: int) -> None:
|
|
81
|
-
#
|
|
82
|
-
#
|
|
147
|
+
# 指标 = 窗口内 gc.callbacks stop duration 累计(ms)/窗口(ms) — 与 Java
|
|
148
|
+
# ΔgcTime/Δwindow、Go PauseTotalNs 差分同语义的真·时间占比。
|
|
83
149
|
# 红线:监控协程顶层兜底 — 任何异常只打日志,任务死亡不带崩宿主。
|
|
84
150
|
try:
|
|
85
|
-
|
|
86
|
-
base = _total_gc_collections()
|
|
151
|
+
base = _gc_time_ms
|
|
87
152
|
last_scan = time.monotonic()
|
|
88
153
|
while True:
|
|
89
154
|
await asyncio.sleep(interval_s)
|
|
90
155
|
scan_start = time.monotonic()
|
|
91
156
|
try:
|
|
92
|
-
cur =
|
|
157
|
+
cur = _gc_time_ms
|
|
93
158
|
now = time.monotonic()
|
|
94
159
|
window_ms = int((now - last_scan) * 1000)
|
|
95
160
|
if window_ms <= 0:
|
|
96
161
|
base, last_scan = cur, now
|
|
97
162
|
continue
|
|
98
|
-
|
|
163
|
+
delta_ms = int(cur - base)
|
|
99
164
|
base, last_scan = cur, now
|
|
100
|
-
|
|
101
|
-
msg = (f"GC占比: {rate * 100:.2f}% (GC时间: {delta} 次 / "
|
|
102
|
-
f"统计窗口: {window_ms} ms)")
|
|
103
|
-
_ = last_count
|
|
104
|
-
# Java checkAndAlert:每轮先 info "GC监控:{msg}";告警第二参是裸 msg
|
|
105
|
-
# (无 "GC监控:" 前缀 — 4 轮审核纠偏)。
|
|
106
|
-
SYLogger.info(f"GC监控:{msg}")
|
|
107
|
-
falt = get_float("sy-alert.gc-monitor.threshold.falt", 0.5)
|
|
108
|
-
crit = get_float("sy-alert.gc-monitor.threshold.critical", 0.2)
|
|
109
|
-
warning = get_float("sy-alert.gc-monitor.threshold.warning", 0.05)
|
|
110
|
-
if rate < warning:
|
|
111
|
-
continue
|
|
112
|
-
if get_bool("sy-alert.gc-monitor.enable", True):
|
|
113
|
-
if rate >= falt:
|
|
114
|
-
fatal("GC致命告警", msg)
|
|
115
|
-
elif rate >= crit:
|
|
116
|
-
critical("GC严重告警", msg)
|
|
117
|
-
else:
|
|
118
|
-
warn("GC告警", msg)
|
|
119
|
-
else:
|
|
120
|
-
SYLogger.warning(f"GC监控未开启,但当前GC率已达到告警阈值:{msg}")
|
|
165
|
+
_gc_check_and_alert(delta_ms, window_ms)
|
|
121
166
|
except Exception as e: # noqa: BLE001
|
|
122
167
|
SYLogger.error(f"GC监控异常: {e}")
|
|
123
168
|
if (time.monotonic() - scan_start) * 1000 > 500:
|
|
@@ -128,10 +173,6 @@ async def _gc_monitor_loop(interval_s: int) -> None:
|
|
|
128
173
|
SYLogger.error(f"[alert] GC监控循环异常退出(不影响宿主服务): {e}")
|
|
129
174
|
|
|
130
175
|
|
|
131
|
-
def _total_gc_collections() -> int:
|
|
132
|
-
return sum(s['collections'] for s in gc.get_stats())
|
|
133
|
-
|
|
134
|
-
|
|
135
176
|
async def _db_monitor_loop(interval_s: int) -> None:
|
|
136
177
|
# 红线:监控协程顶层兜底 — 任何异常只打日志,任务死亡不带崩宿主。
|
|
137
178
|
try:
|
{sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/src/sycommon/logging/kafka_log.py
RENAMED
|
@@ -481,7 +481,12 @@ class KafkaSink:
|
|
|
481
481
|
# 与 trace/tenant 正文兜底共用,避免二次 json.loads。
|
|
482
482
|
msg_obj = None
|
|
483
483
|
try:
|
|
484
|
-
|
|
484
|
+
# 🔴 ERROR 事件(str(message) 含 opt(exception=) 渲染的堆栈正文,
|
|
485
|
+
# 追加在 JSON 之后)整串 json.loads 会炸 "Extra data"——信封解析
|
|
486
|
+
# 全盘失效(ERROR 降级 INFO/丢 detail 的 2026-10-28 回归根因)。
|
|
487
|
+
# raw_decode 只取头部第一个完整 JSON 对象,尾部堆栈文本忽略
|
|
488
|
+
# (堆栈已由信封 detail 键携带,record.exception 在队列路径恒 None)。
|
|
489
|
+
_parsed = json.JSONDecoder().raw_decode(record["message"])[0]
|
|
485
490
|
# 🔑 哨兵判定:仅 _log 信封(_sy_log_envelope=True)才解包;
|
|
486
491
|
# 业务方传 JSON dict(即便含 message/trace_id 键)不当作信封
|
|
487
492
|
# —— msg 原样透传整包 dict JSON,trace/tenant 不误读。
|
|
@@ -644,7 +649,14 @@ class KafkaSink:
|
|
|
644
649
|
"reqSource": req_source,
|
|
645
650
|
"serviceId": self.service_id,
|
|
646
651
|
"logType": "biz",
|
|
647
|
-
|
|
652
|
+
# 队列路径(_StrWithRecord 空 record)level.name 恒兜底 "INFO"
|
|
653
|
+
# —— ERROR 会被错标 INFO(平台按级别过滤时全部漏掉)。
|
|
654
|
+
# 信封正文 level 键兜底(_log/excepthook 路径都写)。
|
|
655
|
+
"logLevel": (
|
|
656
|
+
msg_obj.get("level")
|
|
657
|
+
if msg_obj is not None and msg_obj.get("level")
|
|
658
|
+
else record["level"].name
|
|
659
|
+
),
|
|
648
660
|
"className": class_name,
|
|
649
661
|
"classShortName": _class_short,
|
|
650
662
|
"method": caller_fn or record["function"],
|
|
@@ -863,7 +875,32 @@ class _InterceptHandler(logging.Handler):
|
|
|
863
875
|
frame = frame.f_back
|
|
864
876
|
depth += 1
|
|
865
877
|
|
|
866
|
-
|
|
878
|
+
# 🔴 2026-10-28 残留闭合:裸文本经 BoundedKafkaSink 队列 str 化后
|
|
879
|
+
# level 恒兜底 INFO、exception 堆栈丢失(asyncio 兜底链 "Task
|
|
880
|
+
# exception was never retrieved" 即此路径)。包成 _sy_log_envelope
|
|
881
|
+
# 信封,write() 消费侧按哨兵解包回 level/detail/_threadName —— 与
|
|
882
|
+
# SYLogger._log / 三个 excepthook 发射器同款双通道机制。
|
|
883
|
+
# trace_id 不塞:留空走 write() 的 contextvar→Snowflake 既有兜底。
|
|
884
|
+
if not isinstance(level, str):
|
|
885
|
+
level = logging.getLevelName(record.levelno) or "INFO"
|
|
886
|
+
envelope: dict = {
|
|
887
|
+
"message": record.getMessage(),
|
|
888
|
+
"level": level,
|
|
889
|
+
"_sy_log_envelope": True,
|
|
890
|
+
}
|
|
891
|
+
if record.threadName:
|
|
892
|
+
envelope["_threadName"] = f"thread:{record.threadName}"
|
|
893
|
+
if record.exc_info and record.exc_info[0] is not None:
|
|
894
|
+
envelope["detail"] = "".join(
|
|
895
|
+
traceback.format_exception(*record.exc_info))
|
|
896
|
+
# opt(exception=...) 保留:stdout ERROR sink 仍靠它渲染彩色堆栈;
|
|
897
|
+
# 队列路径 str(message) 会在 JSON 后追加渲染文本,write() 的
|
|
898
|
+
# raw_decode 只取头部 JSON,尾部忽略(同 _log 路径)。
|
|
899
|
+
# stdout 侧可读性:JSON 信封一整行 + 下方渲染堆栈 —— 与 SYLogger._log
|
|
900
|
+
# 在生产 stdout 的既有形态一致(log_json 同样整行落 message),不引入
|
|
901
|
+
# 新的显示形态分歧。
|
|
902
|
+
logger.opt(depth=depth, exception=record.exc_info).log(
|
|
903
|
+
level, json.dumps(envelope, ensure_ascii=False))
|
|
867
904
|
|
|
868
905
|
|
|
869
906
|
class KafkaLogger(metaclass=SingletonMeta):
|
|
@@ -1033,6 +1070,7 @@ class KafkaLogger(metaclass=SingletonMeta):
|
|
|
1033
1070
|
"message": f"asyncio unhandled: {message}",
|
|
1034
1071
|
"level": "ERROR",
|
|
1035
1072
|
"detail": tb_str,
|
|
1073
|
+
"_sy_log_envelope": True,
|
|
1036
1074
|
}, ensure_ascii=False)
|
|
1037
1075
|
|
|
1038
1076
|
logger.opt(exception=True).error(error_msg)
|
|
@@ -1047,7 +1085,8 @@ class KafkaLogger(metaclass=SingletonMeta):
|
|
|
1047
1085
|
error_msg = json.dumps({
|
|
1048
1086
|
"trace_id": trace_id,
|
|
1049
1087
|
"message": f"Uncaught exception: {exc_type.__name__}",
|
|
1050
|
-
"level": "ERROR"
|
|
1088
|
+
"level": "ERROR",
|
|
1089
|
+
"_sy_log_envelope": True,
|
|
1051
1090
|
}, ensure_ascii=False)
|
|
1052
1091
|
|
|
1053
1092
|
logger.opt(exception=(exc_type, exc_value,
|
|
@@ -1071,6 +1110,7 @@ class KafkaLogger(metaclass=SingletonMeta):
|
|
|
1071
1110
|
"level": "ERROR",
|
|
1072
1111
|
"detail": "".join(traceback.format_exception(
|
|
1073
1112
|
args.exc_type, args.exc_value, args.exc_traceback)),
|
|
1113
|
+
"_sy_log_envelope": True,
|
|
1074
1114
|
}, ensure_ascii=False)
|
|
1075
1115
|
|
|
1076
1116
|
logger.opt(exception=(args.exc_type, args.exc_value,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10a22
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -14,16 +14,16 @@ Requires-Dist: elasticsearch==9.5.1
|
|
|
14
14
|
Requires-Dist: fastapi==0.143.0
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.11
|
|
17
|
-
Requires-Dist: langchain==1.4.
|
|
18
|
-
Requires-Dist: langchain-core==1.
|
|
19
|
-
Requires-Dist: langchain-openai==1.7.
|
|
20
|
-
Requires-Dist: langfuse==5.0.
|
|
21
|
-
Requires-Dist: langgraph==1.2.
|
|
17
|
+
Requires-Dist: langchain==1.4.7
|
|
18
|
+
Requires-Dist: langchain-core==1.7.0
|
|
19
|
+
Requires-Dist: langchain-openai==1.7.3
|
|
20
|
+
Requires-Dist: langfuse==5.0.4
|
|
21
|
+
Requires-Dist: langgraph==1.2.18
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.2.0
|
|
23
23
|
Requires-Dist: langgraph-checkpoint-redis==0.5.2
|
|
24
24
|
Requires-Dist: ldap3==2.9.1
|
|
25
25
|
Requires-Dist: loguru==0.7.3
|
|
26
|
-
Requires-Dist: mysql-connector-python==26.
|
|
26
|
+
Requires-Dist: mysql-connector-python==26.10.0
|
|
27
27
|
Requires-Dist: nacos-sdk-python==3.2.0
|
|
28
28
|
Requires-Dist: psutil==7.2.2
|
|
29
29
|
Requires-Dist: pyxxl==0.4.8
|
|
@@ -389,6 +389,7 @@ src/sycommon_python_lib.egg-info/entry_points.txt
|
|
|
389
389
|
src/sycommon_python_lib.egg-info/requires.txt
|
|
390
390
|
src/sycommon_python_lib.egg-info/top_level.txt
|
|
391
391
|
tests/test_acp_tool.py
|
|
392
|
+
tests/test_alert_monitor.py
|
|
392
393
|
tests/test_asyncio_logging.py
|
|
393
394
|
tests/test_config_change_notifier.py
|
|
394
395
|
tests/test_frame_alignment.py
|
|
@@ -8,16 +8,16 @@ elasticsearch==9.5.1
|
|
|
8
8
|
fastapi==0.143.0
|
|
9
9
|
jinja2==3.1.6
|
|
10
10
|
kafka-python==3.0.11
|
|
11
|
-
langchain==1.4.
|
|
12
|
-
langchain-core==1.
|
|
13
|
-
langchain-openai==1.7.
|
|
14
|
-
langfuse==5.0.
|
|
15
|
-
langgraph==1.2.
|
|
11
|
+
langchain==1.4.7
|
|
12
|
+
langchain-core==1.7.0
|
|
13
|
+
langchain-openai==1.7.3
|
|
14
|
+
langfuse==5.0.4
|
|
15
|
+
langgraph==1.2.18
|
|
16
16
|
langgraph-checkpoint-postgres==3.2.0
|
|
17
17
|
langgraph-checkpoint-redis==0.5.2
|
|
18
18
|
ldap3==2.9.1
|
|
19
19
|
loguru==0.7.3
|
|
20
|
-
mysql-connector-python==26.
|
|
20
|
+
mysql-connector-python==26.10.0
|
|
21
21
|
nacos-sdk-python==3.2.0
|
|
22
22
|
psutil==7.2.2
|
|
23
23
|
pyxxl==0.4.8
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"""test_alert_monitor.py — GC 监控语义修复回归(2026-10)。
|
|
2
|
+
|
|
3
|
+
历史缺陷:旧实现用 collections 计数差分冒充时间占比(每秒次数×100 硬套
|
|
4
|
+
"%%" 模板),高频小 GC(10 次/10s)即误报 fatal "GC占比: 99.70%
|
|
5
|
+
(GC时间: 10 次)"。修复后指标 = gc.callbacks stop duration 累计 ms/窗口 ms
|
|
6
|
+
真·时间占比,与 Java ΔgcTime/Δwindow、Go PauseTotalNs 差分同语义。
|
|
7
|
+
"""
|
|
8
|
+
import gc
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
import time
|
|
12
|
+
from unittest import mock
|
|
13
|
+
|
|
14
|
+
import pytest
|
|
15
|
+
|
|
16
|
+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
|
|
17
|
+
|
|
18
|
+
os.environ.setdefault("SY_ALERT_UNITTEST", "1")
|
|
19
|
+
|
|
20
|
+
from sycommon.alert import monitor # noqa: E402
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@pytest.fixture(autouse=True)
|
|
24
|
+
def _clean_gc_state():
|
|
25
|
+
yield
|
|
26
|
+
monitor._gc_time_ms = 0.0
|
|
27
|
+
monitor._gc_last_start = 0.0
|
|
28
|
+
monitor._gc_hook_installed = False
|
|
29
|
+
for _ in range(gc.callbacks.count(monitor._on_gc_event)):
|
|
30
|
+
gc.callbacks.remove(monitor._on_gc_event)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_gc_hook_accumulates_real_duration_ms():
|
|
34
|
+
"""stop 事件按 start/stop 计时差累计 ms;info 内容不参与计算。"""
|
|
35
|
+
monitor._gc_time_ms = 0.0
|
|
36
|
+
monitor._on_gc_event('start', {'generation': 0})
|
|
37
|
+
time.sleep(0.002) # 2ms
|
|
38
|
+
monitor._on_gc_event('stop', {'generation': 0, 'collected': 1})
|
|
39
|
+
monitor._on_gc_event('start', {'generation': 0})
|
|
40
|
+
time.sleep(0.0005) # 0.5ms
|
|
41
|
+
monitor._on_gc_event('stop', {'generation': 0, 'collected': 1})
|
|
42
|
+
# 计时差 ≥ 睡眠时长,含调度开销;两轮合计 2.5ms + 开销,远小于 10ms
|
|
43
|
+
assert 2.5 <= monitor._gc_time_ms < 10.0
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def test_gc_hook_fallback_without_duration_field():
|
|
47
|
+
"""版本回归线:stop info 无 duration 字段(实测 3.11–3.14 均无,官方
|
|
48
|
+
文档亦只定义 generation/collected/uncollectable/candidates)→ 用
|
|
49
|
+
start/stop 时刻差计时;孤儿 stop(未见 start)按 0,不抛、不被
|
|
50
|
+
perf_counter 大数污染。回调不读 info 内容,字段形态差异零影响。"""
|
|
51
|
+
monitor._gc_time_ms = 0.0
|
|
52
|
+
monitor._on_gc_event('stop', {'generation': 0, 'collected': 1,
|
|
53
|
+
'uncollectable': 0}) # 孤儿 stop:安全为 0
|
|
54
|
+
assert monitor._gc_time_ms == 0.0
|
|
55
|
+
monitor._on_gc_event('start', {'generation': 0})
|
|
56
|
+
monitor._on_gc_event('stop', {'generation': 0, 'collected': 1,
|
|
57
|
+
'uncollectable': 0}) # 计时差
|
|
58
|
+
assert monitor._gc_time_ms > 0.0
|
|
59
|
+
assert monitor._gc_time_ms < 1000.0 # 显然不可能秒级 — 防大数污染
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def test_gc_hook_install_idempotent():
|
|
63
|
+
"""_install_gc_hook 幂等:多次调用只挂一个回调。"""
|
|
64
|
+
monitor._install_gc_hook()
|
|
65
|
+
monitor._install_gc_hook()
|
|
66
|
+
assert gc.callbacks.count(monitor._on_gc_event) == 1
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def test_real_gc_updates_counter():
|
|
70
|
+
"""真跑一次 gc.collect:回调链路端到端,计数器只增不减。"""
|
|
71
|
+
monitor._install_gc_hook()
|
|
72
|
+
before = monitor._gc_time_ms
|
|
73
|
+
gc.collect()
|
|
74
|
+
assert monitor._gc_time_ms >= before
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def test_no_alert_for_frequent_tiny_gc():
|
|
78
|
+
"""核心回归:10 次亚毫秒 GC/10s 窗口(旧实现 rate=0.997 误报 fatal)
|
|
79
|
+
→ 修复后 2ms/10030ms≈0.02%,低于 warning,不外发任何告警。"""
|
|
80
|
+
with mock.patch.object(monitor, 'SYLogger'), \
|
|
81
|
+
mock.patch.object(monitor, 'fatal') as f, \
|
|
82
|
+
mock.patch.object(monitor, 'critical') as c, \
|
|
83
|
+
mock.patch.object(monitor, 'warn') as w, \
|
|
84
|
+
mock.patch.object(monitor, 'get_float',
|
|
85
|
+
side_effect=lambda k, d: d), \
|
|
86
|
+
mock.patch.object(monitor, 'get_bool', return_value=True):
|
|
87
|
+
# 直接驱动告警判定(等价 loop 内一轮扫描):10 次 0.2ms GC = 2ms。
|
|
88
|
+
monitor._gc_check_and_alert(delta_ms=2, window_ms=10030)
|
|
89
|
+
assert not f.called and not c.called and not w.called
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def test_fatal_on_real_time_ratio():
|
|
93
|
+
"""真实时间占比达标(窗口一半时间在 GC)→ fatal("GC致命告警")。"""
|
|
94
|
+
with mock.patch.object(monitor, 'SYLogger'), \
|
|
95
|
+
mock.patch.object(monitor, 'fatal') as f, \
|
|
96
|
+
mock.patch.object(monitor, 'critical') as c, \
|
|
97
|
+
mock.patch.object(monitor, 'warn') as w, \
|
|
98
|
+
mock.patch.object(monitor, 'get_float',
|
|
99
|
+
side_effect=lambda k, d: d), \
|
|
100
|
+
mock.patch.object(monitor, 'get_bool', return_value=True):
|
|
101
|
+
monitor._gc_check_and_alert(delta_ms=5000, window_ms=10000)
|
|
102
|
+
f.assert_called_once()
|
|
103
|
+
assert f.call_args[0][0] == "GC致命告警"
|
|
104
|
+
assert "GC时间: 5000 ms" in f.call_args[0][1]
|
|
105
|
+
assert "统计窗口: 10000 ms" in f.call_args[0][1]
|
|
106
|
+
assert not c.called and not w.called
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def test_critical_and_warn_tiers():
|
|
110
|
+
"""阈值分层:20%/50% 时间占比 → critical/warn(Java 0.2/0.05 同参)。"""
|
|
111
|
+
with mock.patch.object(monitor, 'SYLogger'), \
|
|
112
|
+
mock.patch.object(monitor, 'fatal') as f, \
|
|
113
|
+
mock.patch.object(monitor, 'critical') as c, \
|
|
114
|
+
mock.patch.object(monitor, 'warn') as w, \
|
|
115
|
+
mock.patch.object(monitor, 'get_float',
|
|
116
|
+
side_effect=lambda k, d: d), \
|
|
117
|
+
mock.patch.object(monitor, 'get_bool', return_value=True):
|
|
118
|
+
monitor._gc_check_and_alert(delta_ms=2000, window_ms=10000) # 0.2
|
|
119
|
+
assert c.call_count == 1
|
|
120
|
+
assert w.call_count == 0 and f.call_count == 0
|
|
121
|
+
monitor._gc_check_and_alert(delta_ms=500, window_ms=10000) # 0.05
|
|
122
|
+
assert w.call_count == 1
|
|
123
|
+
assert c.call_count == 1 and f.call_count == 0
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def test_msg_uses_ms_unit_not_count():
|
|
127
|
+
"""msg 单位必须是 ms(时间),不再是「次」(计数)。"""
|
|
128
|
+
logs: list[str] = []
|
|
129
|
+
|
|
130
|
+
class _Log:
|
|
131
|
+
def info(self, m):
|
|
132
|
+
logs.append(m)
|
|
133
|
+
|
|
134
|
+
def error(self, m):
|
|
135
|
+
pass
|
|
136
|
+
|
|
137
|
+
def warning(self, m):
|
|
138
|
+
pass
|
|
139
|
+
|
|
140
|
+
with mock.patch.object(monitor, 'SYLogger', _Log()), \
|
|
141
|
+
mock.patch.object(monitor, 'fatal'), \
|
|
142
|
+
mock.patch.object(monitor, 'critical'), \
|
|
143
|
+
mock.patch.object(monitor, 'warn'), \
|
|
144
|
+
mock.patch.object(monitor, 'get_float',
|
|
145
|
+
side_effect=lambda k, d: d), \
|
|
146
|
+
mock.patch.object(monitor, 'get_bool', return_value=True):
|
|
147
|
+
monitor._gc_check_and_alert(delta_ms=3, window_ms=10000)
|
|
148
|
+
gc_line = [m for m in logs if m.startswith('GC监控:')]
|
|
149
|
+
assert gc_line, logs
|
|
150
|
+
assert "GC时间: 3 ms / 统计窗口: 10000 ms" in gc_line[0]
|
|
151
|
+
assert "GC占比: 0.03%" in gc_line[0]
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def test_alert_disabled_only_warns():
|
|
155
|
+
"""sy-alert.gc-monitor.enable=false:超阈值只打 warning,不外发(Java 同)。"""
|
|
156
|
+
warned: list[str] = []
|
|
157
|
+
|
|
158
|
+
class _Log:
|
|
159
|
+
def info(self, m):
|
|
160
|
+
pass
|
|
161
|
+
|
|
162
|
+
def error(self, m):
|
|
163
|
+
pass
|
|
164
|
+
|
|
165
|
+
def warning(self, m):
|
|
166
|
+
warned.append(m)
|
|
167
|
+
|
|
168
|
+
with mock.patch.object(monitor, 'SYLogger', _Log()), \
|
|
169
|
+
mock.patch.object(monitor, 'fatal') as f, \
|
|
170
|
+
mock.patch.object(monitor, 'critical') as c, \
|
|
171
|
+
mock.patch.object(monitor, 'warn') as w, \
|
|
172
|
+
mock.patch.object(monitor, 'get_float',
|
|
173
|
+
side_effect=lambda k, d: d), \
|
|
174
|
+
mock.patch.object(monitor, 'get_bool', return_value=False):
|
|
175
|
+
monitor._gc_check_and_alert(delta_ms=6000, window_ms=10000)
|
|
176
|
+
assert not f.called and not c.called and not w.called
|
|
177
|
+
assert any("GC监控未开启" in m for m in warned)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def test_monitor_loop_survives_scan_exception():
|
|
181
|
+
"""红线:单轮扫描内异常(配置读取炸)只打日志、循环不死(下轮照常)。
|
|
182
|
+
隔离在 _gc_monitor_loop 的 try/except — 与 Java checkAndAlert 抛错由
|
|
183
|
+
扫描包装层捕获同构。"""
|
|
184
|
+
import asyncio
|
|
185
|
+
|
|
186
|
+
errs: list[str] = []
|
|
187
|
+
flt = mock.Mock(side_effect=RuntimeError("cfg broken"))
|
|
188
|
+
|
|
189
|
+
class _Log:
|
|
190
|
+
def info(self, m):
|
|
191
|
+
pass
|
|
192
|
+
|
|
193
|
+
def error(self, m):
|
|
194
|
+
errs.append(m)
|
|
195
|
+
|
|
196
|
+
def warning(self, m):
|
|
197
|
+
pass
|
|
198
|
+
|
|
199
|
+
async def scenario():
|
|
200
|
+
with mock.patch.object(monitor, 'SYLogger', _Log()), \
|
|
201
|
+
mock.patch.object(monitor, 'get_float', flt), \
|
|
202
|
+
mock.patch.object(monitor, 'get_bool', return_value=True):
|
|
203
|
+
task = asyncio.ensure_future(monitor._gc_monitor_loop(0.05))
|
|
204
|
+
await asyncio.sleep(0.25) # ~4 轮扫描,每轮 get_float 都炸
|
|
205
|
+
assert not task.done() # 循环活着,没被异常带死
|
|
206
|
+
task.cancel()
|
|
207
|
+
with pytest.raises(asyncio.CancelledError):
|
|
208
|
+
await task
|
|
209
|
+
|
|
210
|
+
asyncio.run(scenario())
|
|
211
|
+
assert flt.call_count >= 2
|
|
212
|
+
assert any("GC监控异常" in e for e in errs)
|
{sycommon_python_lib-0.2.10a20 → sycommon_python_lib-0.2.10a22}/tests/test_skill_regex_upgrade.py
RENAMED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
"""验证
|
|
1
|
+
"""验证 _SKILL_PATH_RE 在 system/user 双层目录下仍能提取 scope 与域级技能名。"""
|
|
2
2
|
import sys, os
|
|
3
3
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
4
4
|
|
|
5
|
-
from sycommon.agent.
|
|
5
|
+
from sycommon.agent.sandbox.http_sandbox_backend import _SKILL_PATH_RE
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
def
|
|
9
|
-
m =
|
|
8
|
+
def test_extract_scope_and_domain_under_system():
|
|
9
|
+
m = _SKILL_PATH_RE.search("skills/system/sy-oa-skill/workflow-todo/scripts/x.py")
|
|
10
10
|
assert m is not None
|
|
11
|
-
assert m.group(1) == "
|
|
11
|
+
assert m.group(1) == "system"
|
|
12
|
+
assert m.group(2) == "sy-oa-skill" # 不是 "system"
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
def
|
|
15
|
-
m =
|
|
15
|
+
def test_extract_scope_and_domain_under_user():
|
|
16
|
+
m = _SKILL_PATH_RE.search("skills/user/sy-oa-skill/SKILL.md")
|
|
16
17
|
assert m is not None
|
|
17
|
-
assert m.group(1) == "
|
|
18
|
+
assert m.group(1) == "user"
|
|
19
|
+
assert m.group(2) == "sy-oa-skill"
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
def test_not_match_prefixed():
|
|
21
|
-
assert
|
|
22
|
-
assert
|
|
23
|
+
assert _SKILL_PATH_RE.search("myskills/system/foo/bar") is None
|
|
24
|
+
assert _SKILL_PATH_RE.search("theskills/system/x") is None
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
def test_bare_path_without_scope_no_longer_matches():
|
|
26
28
|
# 拆目录后顶层不再直接是 skills/<域>/,旧扁平路径不应命中
|
|
27
|
-
assert
|
|
29
|
+
assert _SKILL_PATH_RE.search("skills/sy-oa-skill/x") is None
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
def test_lazy_sync_regex_parses_scope_and_name():
|