Repository navigation
fix(agents): narrow broad exception handlers in deploy handoff and orchestrator - #2626
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Please add a See governance: #898 |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical defects can expose deployment tokens in timeout logs, abort imports on malformed database URLs, and allow tests to read or write a real database.
5 open issues
Redact escaped tokens before formatting timeout tracebacks · New Handle malformed database URLs without aborting imports · New Prevent ambient database access before test patches are active · New Preserve GitHub results when the Vercel step fails · New Detect broad exception handlers with AST analysis · New
What changed in this PR
This PR delivers the first slice of issue #2168’s exception-handling audit in UVAI’s internal agent runtime, focusing on deployment handoff and orchestration rather than repository-wide remediation.
Changes:
- Narrow deployment-step and shared SQL setup handlers to expected exception types.
- Add contextual exception logging, token redaction, and explicit boundary markers.
- Add simulated-failure tests and document handling standards and remaining work.
| File | Description |
|---|---|
tests/unit/test_exception_boundaries_2168.py |
Tests failure reporting, exception propagation, redaction, and boundary markers. |
src/youtube_extension/services/agents/adapters/agent_orchestrator.py |
Narrows shared-store setup handling and adds contextual boundary logs. |
src/agents/mcp_tools/deployment_tool.py |
Narrows step handlers and adds identity errors and redacted failure reporting. |
docs/EXCEPTION_HANDLING_STANDARDS.md |
Defines boundary markers and records this remediation slice and remaining scope. |
Review effort: Max
Preserve partial deployment receipts; redact expected CLI failures and repr-escaped secrets; validate malformed URL ports without swallowing store bugs; isolate DB environment in tests; count broad handlers with AST. Disable previews for this exact review branch. Refs #2168
🔍 PR Validation |
A failed Vercel step cannot report overall success merely because GitHub creation succeeded. Preserve the completed GitHub artifact and return failed status so pipeline classification also fails. Refs #2168
…-narrow-except-deploy-agents # Conflicts: # docs/EXCEPTION_HANDLING_STANDARDS.md # src/agents/mcp_tools/deployment_tool.py Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>


Closes #2665.
Refs #2168 (AUDIT-006). This is a partial slice; do not close the broad audit issue.
Result
SubprocessError,TimeoutExpired,OSError,SQLAlchemyError,ValueErroron URL port parsing); unexpected failures propagate to explicit logged boundaries.ExceptHandlernodes (including tuple, multiline, bare, andexcept*syntax) rather than line counts.main(44a54b0a7) and restored rootvercel.json/ removed temporaryapps/web/vercel.jsonoverride so Vercel Preview andE2E Pipelinerun cleanly.Verification
142 passedin targeted agent/orchestrator/deployment unit tests (compileallandruff checkexit 0).