Skip to content

feat(governance): audit pipeline — manager, console + traces sinks#122

Open
aditik0303 wants to merge 3 commits into
feat/governance-policy-loadingfrom
feat/governance-audit
Open

feat(governance): audit pipeline — manager, console + traces sinks#122
aditik0303 wants to merge 3 commits into
feat/governance-policy-loadingfrom
feat/governance-audit

Conversation

@aditik0303

Copy link
Copy Markdown

Stacked PR 3/7 — part of splitting feat/governance-core into 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 onto feat/agentic-governance. feat/governance-core kept untouched as backup.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + AuditSink framework with async queueing, circuit-breaker behavior, and default sink configuration.
  • Adds built-in sinks: TracesAuditSink (OTel spans) and ConsoleAuditSink (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.

Comment thread src/uipath/runtime/governance/audit/base.py
Comment thread src/uipath/runtime/governance/audit/base.py
Comment thread src/uipath/runtime/governance/audit/traces.py Outdated
Comment thread tests/test_traces_severity.py Outdated
@aditik0303 aditik0303 force-pushed the feat/governance-policy-loading branch from 91309f8 to 418fd8f Compare June 16, 2026 09:07
@aditik0303 aditik0303 force-pushed the feat/governance-audit branch from 42e1f29 to 7111d27 Compare June 16, 2026 09:28
@aditik0303 aditik0303 force-pushed the feat/governance-policy-loading branch from 418fd8f to 14bd3cc Compare June 17, 2026 05:27
@aditik0303 aditik0303 force-pushed the feat/governance-audit branch from 7111d27 to 2db5f2d Compare June 17, 2026 06:35
@aditik0303 aditik0303 force-pushed the feat/governance-policy-loading branch from 14bd3cc to acfa5b5 Compare June 17, 2026 08:34
@aditik0303 aditik0303 force-pushed the feat/governance-audit branch from 2db5f2d to bd19932 Compare June 17, 2026 08:35
aditik0303 and others added 3 commits June 19, 2026 13:38
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>
@aditik0303 aditik0303 force-pushed the feat/governance-audit branch from bd19932 to add4e90 Compare June 19, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants