- harness/es.py: append-only event store + проекции (образец — кооп-портал) - harness/levels.py: уровни 1с/1м/1ч/1д, контекст ∝ масштабу - harness/scheduler.py: уровневые потоки, идемпотентные тики, absorbed-стабы - harness/isolated_runner.py + _llm_worker.py: LLM-тик в сабпроцессе (глобальный asyncio-рантайм Strands не переживает 2+ create_harness) - cli.py: init/task/tasks/status/events + requeue (написан самим минутным агентом) - 9router: отдельный ключ sk-simbiot, модель auto (glm-5.3 первым)
19 lines
815 B
Python
19 lines
815 B
Python
"""Workarounds for CPython interpreter bugs the SDK papers over."""
|
|
|
|
import anyio.lowlevel
|
|
|
|
__all__ = ["resync_tracer"]
|
|
|
|
|
|
async def resync_tracer() -> None:
|
|
"""Resync coverage tracing after a cancelled task-group join.
|
|
|
|
A cancel delivered at a join resumes the awaiting coroutine chain via
|
|
`coro.throw()`; on CPython 3.11 (python/cpython#106749) that drops the
|
|
`'call'` trace events for the outer frames and desyncs coverage's CTracer
|
|
until the chain next suspends and resumes normally. Yielding once here
|
|
resumes via `.send()`, which re-stamps the missing events. Shielded so a
|
|
pending outer cancel is not re-delivered at this point; behaviorally a
|
|
no-op. Delete this module when Python 3.11 support ends (EOL 2027-10).
|
|
"""
|
|
await anyio.lowlevel.cancel_shielded_checkpoint()
|