Repository navigation
Conversation
Log tool calls around authorization and execution, with a per-call UUID, sanitized parameters, the resolved target host, and HTTP client address and verified claims where available. Propagate this context to command, gatekeeper, and diagnostic records, keeping concurrent calls separate. Give local and SSH command execution the same completion event, with elapsed time and either an exit status or an error. Let local execution errors propagate so tools can handle them. Log the intended script and interpreter instead of the execution wrapper at INFO. Record parsed gatekeeper decisions and failures, including revalidation and malformed model responses. Log new SSH connections at INFO, keeping connection reuse and authorization diagnostics at DEBUG. Separate event names and attributes from messages. JSON records use a top-level event and nested attributes; text records quote field values, escape newlines, and use UTC timestamps. Update logging documentation and tests for the event format, failure paths, and context isolation. Fixes #620
owtaylor
added this pull request to stack #624
September 24, 2026 18:07
Raise asyncio.TimeoutError in the audit timeout test, matching asyncio.wait_for. Before Python 3.11 it is distinct from the built-in TimeoutError, so the mock bypassed the timeout handler.
Python 3.10 resolves dotted mock targets through package attributes, so exported run_script and check_run_script functions shadow their modules. Import the modules explicitly and use patch.object for the audit tests.
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
|
Looks good! I see that sensitive fields are redacted but the full script is logged under |
panyamkeerthana
approved these changes
Oct 7, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #622; base branch:
feat/log-default-level.Log tool calls around authorization and execution, with a per-call UUID,
sanitized parameters, the resolved target host, and HTTP client address
and verified claims where available. Propagate this context to command,
gatekeeper, and diagnostic records, keeping concurrent calls separate.
Give local and SSH command execution the same completion event, with
elapsed time and either an exit status or an error. Let local execution
errors propagate so tools can handle them. Log the intended script and
interpreter instead of the execution wrapper at INFO.
Record parsed gatekeeper decisions and failures, including revalidation
and malformed model responses. Log new SSH connections at INFO, keeping
connection reuse and authorization diagnostics at DEBUG.
Separate event names and attributes from messages. JSON records use a
top-level event and nested attributes; text records quote field values,
escape newlines, and use UTC timestamps. Update logging documentation
and tests for the event format, failure paths, and context isolation.
Fixes #620
Validation:
make verify: lint, formatting, and type checking pass; 826 tests pass. The six existing service-test failures are due to unavailablesystemctl/journalctlin the sandbox.