Skip to content

fix: contain log sidecar persistence failures - #445

Merged
codeforester merged 3 commits into
mainfrom
bug/410-20261008-bug-shield-log-sidecar-io-failures
Oct 9, 2026
Merged

codeforester merged 3 commits into
mainfrom
bug/410-20261008-bug-shield-log-sidecar-io-failures

Conversation

@codeforester

Copy link
Copy Markdown
Contributor

Fixes #410. Keeps ordinary sidecar open, lock, unlock, and close failures inside a non-recursive diagnostic boundary while preserving process-control exceptions. Tests: tests/test_logging_hot_path.py.

@codeforester

Copy link
Copy Markdown
Contributor Author

Review: not ready; 4 CI jobs fail (Click 8.1 / Python 3.10 and 3.14) on test_logging_sidecar_io_failure_does_not_fail_attached_json_command. Under Click 8.1 result.output holds stdout only, so assert "logging persistence failed" in result.output fails (output was just the JSON envelope). Assert on result.stderr as the other new tests do.

The production change looks right (non-recursive diagnostic, process-control exceptions preserved, close() hardened). Non-blocking: every failing record now writes a stderr line, so a persistently broken sidecar will print one line per log call; consider emitting once per handler. The tests also reach into private handler state (_lock_stream, _lock_identity), which is brittle; a small test helper would help.

@codeforester
codeforester force-pushed the bug/410-20261008-bug-shield-log-sidecar-io-failures branch 3 times, most recently from 612b4b8 to 5837038 Compare October 8, 2026 18:00
@codeforester
codeforester force-pushed the bug/410-20261008-bug-shield-log-sidecar-io-failures branch from 5837038 to 179728a Compare October 9, 2026 02:22
@codeforester
codeforester merged commit d0212f0 into main Oct 9, 2026
115 checks passed
@codeforester
codeforester deleted the bug/410-20261008-bug-shield-log-sidecar-io-failures branch October 9, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: keep log sidecar I/O failures from aborting commands

1 participant