feat(governance): audit pipeline — manager, console + traces sinks#122
Open
aditik0303 wants to merge 3 commits into
Open
feat(governance): audit pipeline — manager, console + traces sinks#122aditik0303 wants to merge 3 commits into
aditik0303 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a governance audit pipeline with pluggable sinks, introducing OpenTelemetry trace spans for Orchestrator Traces and a developer-oriented console sink, plus tests that pin expected filtering and severity/status semantics.
Changes:
- Introduces
AuditManager+AuditSinkframework with async queueing, circuit-breaker behavior, and default sink configuration. - Adds built-in sinks:
TracesAuditSink(OTel spans) andConsoleAuditSink(stderr output), plus a simple sink factory. - Adds tests covering console formatting/filtering, sink re-registration counter reset semantics, and trace severity/status behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_traces_severity.py | Verifies span verbosityLevel and error-status semantics for rule vs hook spans across enforcement modes. |
| tests/test_audit_register_sink.py | Tests AuditManager.register_sink behavior around circuit-breaker counters and duplicate registration. |
| tests/test_audit_console.py | Tests ConsoleAuditSink filtering and per-event formatting to stderr. |
| src/uipath/runtime/governance/audit/traces.py | Implements OpenTelemetry span emission for hook summaries and rule evaluations. |
| src/uipath/runtime/governance/audit/factory.py | Adds a name-based sink factory (traces, console) with env-driven console verbosity. |
| src/uipath/runtime/governance/audit/console.py | Implements stderr console sink with verbose/non-verbose filtering. |
| src/uipath/runtime/governance/audit/base.py | Adds core audit model, sink base class, and AuditManager with async worker/queue + circuit-breaker. |
| src/uipath/runtime/governance/audit/init.py | Exposes audit framework public API and documents built-in sinks and env vars. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
91309f8 to
418fd8f
Compare
42e1f29 to
7111d27
Compare
418fd8f to
14bd3cc
Compare
7111d27 to
2db5f2d
Compare
14bd3cc to
acfa5b5
Compare
2db5f2d to
bd19932
Compare
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eption) so flush() can't hang; use Status() object for set_status + update test Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-platform - traces.py: _get_uipath_trace_id / _get_uipath_context read trace/org/ tenant/folder/job ids from the environment via runtime-local ENV_* constants instead of importing UiPathConfig. - test_traces_severity: import the reset helper from tests._helpers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bd19932 to
add4e90
Compare
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 PR 3/7 — part of splitting
feat/governance-coreinto reviewable slices. Base:feat/governance-policy-loading. One logical slice (branch is cumulative so CI is green). Merge in order #1 → #7 and delete each branch on merge so the next PR auto-retargets ontofeat/agentic-governance.feat/governance-corekept untouched as backup.