diff --git a/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md b/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md index b808b33..0d19196 100644 --- a/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md +++ b/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md @@ -501,16 +501,9 @@ def captured_stderr(monkeypatch): buf.write(sys.stderr.getvalue() if hasattr(sys.stderr, "getvalue") else "") -def test_setup_logging_emits_json(caplog): +def test_setup_logging_emits_json(): """After setup_logging, log records render as one JSON object per line - with the keys cyclone uses (ts, level, logger, msg, extra).""" - setup_logging(level="INFO") - log = get_logger("cyclone_pipeline.test") - log.info("hello", claim_id="CLM-1") - captured = caplog.text - assert "hello" in captured - # The structlog JSON renderer writes to stderr, not caplog by default. - # Use a direct capture: + on stderr with the keys cyclone uses (event, level, timestamp, plus kwargs).""" import sys real = sys.stderr sys.stderr = io.StringIO() @@ -531,8 +524,10 @@ def test_setup_logging_emits_json(caplog): def test_get_logger_returns_named_logger(): log = get_logger("foo.bar") - assert isinstance(log, structlog.stdlib.BoundLogger) - assert log.bind is not None + # cache_logger_on_first_use=True returns a BoundLoggerLazyProxy on first + # call; the contract is that .bind is callable, not the concrete class. + assert hasattr(log, "bind") + assert callable(log.bind) ``` - [ ] **Step 2: Run test to verify it fails**