Skip to content

fix(research): improve empty-source outcomes and artifact docs - #405

Merged
rapids-bot[bot] merged 2 commits into
release/2.2from
backport/pr-397-release-2.2
Jul 29, 2026
Merged

fix(research): improve empty-source outcomes and artifact docs#405
rapids-bot[bot] merged 2 commits into
release/2.2from
backport/pr-397-release-2.2

Conversation

@tanleach

@tanleach tanleach commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Backports #397 to release/2.2, including actionable empty-source outcomes, safe async failure persistence, regression coverage, and artifact workflow documentation.

Verification

  • Focused tests: 1,032 passed, 6 skipped
  • Ruff lint passed
  • Ruff format passed

Summary by CodeRabbit

  • New Features
    • Research now returns consistent, actionable messaging for empty, unselected, unavailable, or no-results source conditions, including the relevant draft when available.
    • Async job status surfaces typed source-condition failures, and preserved reports remain accessible on failure.
    • Final report content is now emitted reliably as an output artifact for async flows.
  • Documentation
    • Updated the skills sandbox example to clarify persistence behavior.
    • Expanded REST API documentation for typed source-condition failures and report preservation.
  • Tests
    • Added and extended coverage for empty-source scenarios and async job status/report handling.
  • Chores
    • Updated link-check configuration to ignore an additional API reference URL.

@copy-pr-bot

copy-pr-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: cde522f3-5c48-4fc7-a4b7-e40eb8e7b07d

📥 Commits

Reviewing files that changed from the base of the PR and between ec590bd and 690d8a8.

📒 Files selected for processing (2)
  • src/aiq_agent/agents/deep_researcher/agent.py
  • tests/aiq_agent/agents/deep_researcher/test_agent.py
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Pytest and Coverage
  • GitHub Check: Script Validation
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format and lint Python with Ruff using a 120-character line length, Python 3.11 target, rules E/F/W/I/PL/UP, and single-line imports; avoid reformatting unrelated code.
Never print or log secret values, including through tool output or error messages.

**/*.py: Run uv run ruff check . and uv run ruff format --check . for root Python changes.
Run uv run pytest for root project Python changes.

Files:

  • src/aiq_agent/agents/deep_researcher/agent.py
  • tests/aiq_agent/agents/deep_researcher/test_agent.py
src/aiq_agent/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/aiq_agent/**/*.py: Register new data sources in data_source_registry so the UI can toggle them.
Missing-secret paths must degrade gracefully by stubbing or skipping rather than crashing or leaking information.
Respect authenticated data sources by honoring requires_auth, passing through per-user tokens, using backend token validators, and applying owner guardrails before loading protected report or artifact context into an agent.
Do not weaken or bypass AuthMiddleware, token validators, or authentication gating without prior design discussion.

Files:

  • src/aiq_agent/agents/deep_researcher/agent.py
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Keep changes inside this repository, avoid editing adjacent repositories, and scope changes to the smallest relevant independent package, especially under sources/.
Run the narrowest relevant validation command first and broaden to the full suite only when a change crosses shared boundaries.
Keep pull requests scoped, exclude unrelated files and generated artifacts, never include secrets, and provide validation commands and results.

**/*: Do not include secrets, credentials, private hostnames, internal-only logs, customer data, or generated local artifacts.
Add or update tests for behavior changes.

Files:

  • src/aiq_agent/agents/deep_researcher/agent.py
  • tests/aiq_agent/agents/deep_researcher/test_agent.py
src/aiq_agent/agents/**/*

⚙️ CodeRabbit configuration file

src/aiq_agent/agents/**/*: Review agent changes for research workflow correctness, graph state transitions, prompt/tool contracts,
HITL behavior, and failure handling. Flag changes that weaken source attribution, report generation,
async cancellation, checkpointing, or data-source selection without focused tests and docs.

Files:

  • src/aiq_agent/agents/deep_researcher/agent.py
🧠 Learnings (1)
📚 Learning: 2026-07-06T23:55:42.908Z
Learnt from: cdgamarose-nv
Repo: NVIDIA-AI-Blueprints/aiq PR: 311
File: src/aiq_agent/agents/deep_researcher/prompts/orchestrator.j2:74-81
Timestamp: 2026-07-06T23:55:42.908Z
Learning: In agent test files (e.g., tests/aiq_agent/agents/*/test_agent.py), avoid brittle assertions that match exact substrings from prompt template files (such as *.j2 prompt wording). Prompt wording can change frequently, so instead assert structural/behavioral properties (e.g., that the prompt builder is called, that required sections/fields are present via stable markers, that the model output/agent behavior conforms to an expected schema, or that key actions are taken) rather than matching literal prompt text.

Applied to files:

  • tests/aiq_agent/agents/deep_researcher/test_agent.py
🔇 Additional comments (2)
src/aiq_agent/agents/deep_researcher/agent.py (1)

35-35: LGTM!

Also applies to: 254-257, 282-302, 372-375

tests/aiq_agent/agents/deep_researcher/test_agent.py (1)

45-46: LGTM!

Also applies to: 356-390, 392-412, 415-432, 1305-1305, 1327-1332, 1333-1383, 1386-1409, 1412-1439


Walkthrough

This change adds typed empty-source failure classification, validates research source configuration earlier, preserves sanitized generated reports, persists terminal job outcomes, and documents synchronous versus persistent artifact workflows. It also updates Markdown link-check exclusions.

Changes

Empty-Source Failure Handling

Layer / File(s) Summary
Typed empty-source error contract
src/aiq_agent/common/*, tests/aiq_agent/common/*
Adds stable reasons, deterministic classification, public remediation messages, generated-answer preservation, and reusable source validation.
Agent and workflow enforcement
src/aiq_agent/agents/{deep_researcher,shallow_researcher,chat_researcher}/*, tests/aiq_agent/agents/*
Research agents validate sources, raise classified errors, preserve sanitized answers, and map failures to public responses.
Async job persistence and reporting
frontends/aiq_api/src/aiq_api/jobs/*, frontends/aiq_api/tests/*, tests/aiq_agent/jobs/*
Persists guarded typed failures, sanitized output, optional reports, and terminal-path artifacts with encryption and race-condition coverage.
API and sandbox documentation
docs/source/examples/skills-sandbox/index.md, docs/source/integration/rest-api.md
Documents non-persistent nat run, persistent jobs, artifact retrieval, typed failure reports, and sanitized unexpected failures.

Markdown Link Checker

Layer / File(s) Summary
Ignored documentation link pattern
ci/markdown-link-check-config.json
Adds a You.com API contents URL pattern to ignorePatterns.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required template sections including Overview, DCO sign-off, Validation checklist, reviewer start point, and Related Issues. Add the missing template sections, include a proper DCO sign-off, fill the validation checklist, and specify reviewer start points and related issues.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title uses valid Conventional Commits syntax and accurately summarizes the backport's main empty-source and documentation changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backport/pr-397-release-2.2

Comment @coderabbitai help to get the list of available commands.

@tanleach
tanleach force-pushed the backport/pr-397-release-2.2 branch from 4cc3d8f to ecf0402 Compare July 29, 2026 09:54
@tanleach
tanleach marked this pull request as ready for review July 29, 2026 09:55
@tanleach
tanleach requested a review from a team July 29, 2026 09:55

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/aiq_agent/agents/deep_researcher/register.py (1)

245-291: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

See consolidated comment on agent.py lines 281-301: this _run's catch-all re-logs the same EmptySourceRegistryError at ERROR level a second time.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/aiq_agent/agents/deep_researcher/register.py` around lines 245 - 291, The
catch-all exception handler in the deep research execution flow re-logs
EmptySourceRegistryError after it has already been logged elsewhere. Update the
exception handling around active_agent.run in _run to avoid duplicate
ERROR-level logging for that exception while preserving propagation and existing
logging for other failures.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/aiq_agent/agents/deep_researcher/agent.py`:
- Around line 281-301: Prevent EmptySourceRegistryError from being logged twice
at ERROR level: update the exception handling in the surrounding method and
deep_research_agent._run to re-raise this typed expected error before the
generic Exception handlers, avoiding logger.error/logger.exception for it while
preserving existing handling for other exceptions.
- Around line 253-256: Update the validation call in the deep researcher run
flow to avoid default noisy logging when checking self.tools on every run. Use
the validator’s quiet or non-logging option while preserving source selection
and availability validation in validate_research_source_configuration.

In `@src/aiq_agent/agents/shallow_researcher/register.py`:
- Line 178: Update the shallow-research registration flow around
validate_research_source_configuration so it does not trigger the full
tool-availability log sweep on every request. Reuse the consolidated validation
behavior defined in tool_validation.py, preserving source-configuration
validation while avoiding repeated selected_tools availability logging.

In `@src/aiq_agent/common/tool_validation.py`:
- Around line 103-131: The validate_research_source_configuration path should
avoid noisy per-request logging from validate_tool_availability. Update its call
to explicitly disable the helper’s default logging while preserving the existing
validation results and EmptySourceRegistryError behavior.

---

Outside diff comments:
In `@src/aiq_agent/agents/deep_researcher/register.py`:
- Around line 245-291: The catch-all exception handler in the deep research
execution flow re-logs EmptySourceRegistryError after it has already been logged
elsewhere. Update the exception handling around active_agent.run in _run to
avoid duplicate ERROR-level logging for that exception while preserving
propagation and existing logging for other failures.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 40177cbe-1353-43fe-a1ae-4358148f81e8

📥 Commits

Reviewing files that changed from the base of the PR and between 67087fe and ecf0402.

📒 Files selected for processing (20)
  • ci/markdown-link-check-config.json
  • docs/source/examples/skills-sandbox/index.md
  • docs/source/integration/rest-api.md
  • frontends/aiq_api/src/aiq_api/jobs/callbacks.py
  • frontends/aiq_api/src/aiq_api/jobs/runner.py
  • frontends/aiq_api/tests/test_content_encryption_routes.py
  • src/aiq_agent/agents/chat_researcher/agent.py
  • src/aiq_agent/agents/deep_researcher/agent.py
  • src/aiq_agent/agents/deep_researcher/register.py
  • src/aiq_agent/agents/shallow_researcher/agent.py
  • src/aiq_agent/agents/shallow_researcher/register.py
  • src/aiq_agent/common/__init__.py
  • src/aiq_agent/common/citation_verification.py
  • src/aiq_agent/common/tool_validation.py
  • tests/aiq_agent/agents/chat_researcher/test_agent.py
  • tests/aiq_agent/agents/deep_researcher/test_agent.py
  • tests/aiq_agent/agents/shallow_researcher/test_agent.py
  • tests/aiq_agent/agents/shallow_researcher/test_register_per_user_mcp.py
  • tests/aiq_agent/common/test_citation_verification.py
  • tests/aiq_agent/jobs/test_runner.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format and lint Python with Ruff using a 120-character line length, Python 3.11 target, rules E/F/W/I/PL/UP, and single-line imports; avoid reformatting unrelated code.
Never print or log secret values, including through tool output or error messages.

**/*.py: Run uv run ruff check . and uv run ruff format --check . for root Python changes.
Run uv run pytest for root project Python changes.

Files:

  • src/aiq_agent/agents/chat_researcher/agent.py
  • src/aiq_agent/common/__init__.py
  • src/aiq_agent/common/tool_validation.py
  • tests/aiq_agent/common/test_citation_verification.py
  • src/aiq_agent/common/citation_verification.py
  • src/aiq_agent/agents/shallow_researcher/register.py
  • frontends/aiq_api/src/aiq_api/jobs/callbacks.py
  • tests/aiq_agent/jobs/test_runner.py
  • tests/aiq_agent/agents/shallow_researcher/test_register_per_user_mcp.py
  • frontends/aiq_api/tests/test_content_encryption_routes.py
  • src/aiq_agent/agents/shallow_researcher/agent.py
  • frontends/aiq_api/src/aiq_api/jobs/runner.py
  • tests/aiq_agent/agents/chat_researcher/test_agent.py
  • src/aiq_agent/agents/deep_researcher/register.py
  • tests/aiq_agent/agents/shallow_researcher/test_agent.py
  • tests/aiq_agent/agents/deep_researcher/test_agent.py
  • src/aiq_agent/agents/deep_researcher/agent.py
src/aiq_agent/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/aiq_agent/**/*.py: Register new data sources in data_source_registry so the UI can toggle them.
Missing-secret paths must degrade gracefully by stubbing or skipping rather than crashing or leaking information.
Respect authenticated data sources by honoring requires_auth, passing through per-user tokens, using backend token validators, and applying owner guardrails before loading protected report or artifact context into an agent.
Do not weaken or bypass AuthMiddleware, token validators, or authentication gating without prior design discussion.

Files:

  • src/aiq_agent/agents/chat_researcher/agent.py
  • src/aiq_agent/common/__init__.py
  • src/aiq_agent/common/tool_validation.py
  • src/aiq_agent/common/citation_verification.py
  • src/aiq_agent/agents/shallow_researcher/register.py
  • src/aiq_agent/agents/shallow_researcher/agent.py
  • src/aiq_agent/agents/deep_researcher/register.py
  • src/aiq_agent/agents/deep_researcher/agent.py
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Keep changes inside this repository, avoid editing adjacent repositories, and scope changes to the smallest relevant independent package, especially under sources/.
Run the narrowest relevant validation command first and broaden to the full suite only when a change crosses shared boundaries.
Keep pull requests scoped, exclude unrelated files and generated artifacts, never include secrets, and provide validation commands and results.

**/*: Do not include secrets, credentials, private hostnames, internal-only logs, customer data, or generated local artifacts.
Add or update tests for behavior changes.

Files:

  • src/aiq_agent/agents/chat_researcher/agent.py
  • src/aiq_agent/common/__init__.py
  • ci/markdown-link-check-config.json
  • docs/source/integration/rest-api.md
  • src/aiq_agent/common/tool_validation.py
  • tests/aiq_agent/common/test_citation_verification.py
  • src/aiq_agent/common/citation_verification.py
  • src/aiq_agent/agents/shallow_researcher/register.py
  • frontends/aiq_api/src/aiq_api/jobs/callbacks.py
  • tests/aiq_agent/jobs/test_runner.py
  • tests/aiq_agent/agents/shallow_researcher/test_register_per_user_mcp.py
  • frontends/aiq_api/tests/test_content_encryption_routes.py
  • src/aiq_agent/agents/shallow_researcher/agent.py
  • frontends/aiq_api/src/aiq_api/jobs/runner.py
  • tests/aiq_agent/agents/chat_researcher/test_agent.py
  • src/aiq_agent/agents/deep_researcher/register.py
  • tests/aiq_agent/agents/shallow_researcher/test_agent.py
  • tests/aiq_agent/agents/deep_researcher/test_agent.py
  • docs/source/examples/skills-sandbox/index.md
  • src/aiq_agent/agents/deep_researcher/agent.py
src/aiq_agent/agents/**/*

⚙️ CodeRabbit configuration file

src/aiq_agent/agents/**/*: Review agent changes for research workflow correctness, graph state transitions, prompt/tool contracts,
HITL behavior, and failure handling. Flag changes that weaken source attribution, report generation,
async cancellation, checkpointing, or data-source selection without focused tests and docs.

Files:

  • src/aiq_agent/agents/chat_researcher/agent.py
  • src/aiq_agent/agents/shallow_researcher/register.py
  • src/aiq_agent/agents/shallow_researcher/agent.py
  • src/aiq_agent/agents/deep_researcher/register.py
  • src/aiq_agent/agents/deep_researcher/agent.py
{.github/**,ci/**,.pre-commit-config.yaml,pyproject.toml,uv.lock,mcp/pyproject.toml,mcp/uv.lock}

⚙️ CodeRabbit configuration file

{.github/**,ci/**,.pre-commit-config.yaml,pyproject.toml,uv.lock,mcp/pyproject.toml,mcp/uv.lock}: Review automation and packaging changes for least-privilege permissions, pinned versions where appropriate,
copy-pr-bot pull-request/ branch behavior, reproducible uv/npm setup, secret handling, and consistency with
the documented validation matrix.

Files:

  • ci/markdown-link-check-config.json
docs/source/**/*

📄 CodeRabbit inference engine (AGENTS.md)

Update canonical documentation under docs/source/ when behavior, configuration, or workflows change; do not duplicate full documentation pages into skills.

Files:

  • docs/source/integration/rest-api.md
  • docs/source/examples/skills-sandbox/index.md
{docs/**,README.md,CONTRIBUTING.md,SECURITY.md,CODE-OF-CONDUCT.md}

⚙️ CodeRabbit configuration file

{docs/**,README.md,CONTRIBUTING.md,SECURITY.md,CODE-OF-CONDUCT.md}: Review documentation for command accuracy, branch-name consistency, current CI and copy-pr-bot behavior, public
vs internal boundary clarity, stale examples, and links that no longer match the repository layout.

Files:

  • docs/source/integration/rest-api.md
  • docs/source/examples/skills-sandbox/index.md
{src/aiq_agent/fastapi_extensions/**,frontends/aiq_api/src/aiq_api/**}

⚙️ CodeRabbit configuration file

{src/aiq_agent/fastapi_extensions/**,frontends/aiq_api/src/aiq_api/**}: Treat API, auth, and job-runner changes as externally visible contracts. Check authorization boundaries,
request tracing, async job lifecycle, websocket reconnect behavior, error responses, and cross-user data isolation.
Require tests for route behavior, access decisions, and job state transitions when those surfaces change.

Files:

  • frontends/aiq_api/src/aiq_api/jobs/callbacks.py
  • frontends/aiq_api/src/aiq_api/jobs/runner.py
🧠 Learnings (2)
📚 Learning: 2026-06-14T17:49:00.640Z
Learnt from: torkian
Repo: NVIDIA-AI-Blueprints/aiq PR: 273
File: frontends/aiq_api/tests/test_sse_reconnect_cursor.py:384-401
Timestamp: 2026-06-14T17:49:00.640Z
Learning: When using `unittest.mock.patch` for code that imports dependencies inside functions/generators (e.g., inside `aiq_api.routes.jobs`), don’t patch via an attribute that doesn’t exist on the consuming module. If the generator does `from ..jobs.event_store import EventStore` inside the generator body, then `aiq_api.routes.jobs` will not have an `EventStore` attribute; patch the source class/method in its defining module instead (e.g., `aiq_api.jobs.event_store.EventStore.get_events_async`). Patching `aiq_api.routes.jobs.EventStore...` would raise `AttributeError` because that symbol is not present at module scope.

Applied to files:

  • frontends/aiq_api/tests/test_content_encryption_routes.py
📚 Learning: 2026-07-06T23:55:42.908Z
Learnt from: cdgamarose-nv
Repo: NVIDIA-AI-Blueprints/aiq PR: 311
File: src/aiq_agent/agents/deep_researcher/prompts/orchestrator.j2:74-81
Timestamp: 2026-07-06T23:55:42.908Z
Learning: In agent test files (e.g., tests/aiq_agent/agents/*/test_agent.py), avoid brittle assertions that match exact substrings from prompt template files (such as *.j2 prompt wording). Prompt wording can change frequently, so instead assert structural/behavioral properties (e.g., that the prompt builder is called, that required sections/fields are present via stable markers, that the model output/agent behavior conforms to an expected schema, or that key actions are taken) rather than matching literal prompt text.

Applied to files:

  • tests/aiq_agent/agents/chat_researcher/test_agent.py
  • tests/aiq_agent/agents/shallow_researcher/test_agent.py
  • tests/aiq_agent/agents/deep_researcher/test_agent.py
🪛 ast-grep (0.45.0)
frontends/aiq_api/tests/test_content_encryption_routes.py

[info] 613-618: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"report": "# Preserved generated answer",
"outcome_reason": outcome_reason,
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

🔇 Additional comments (25)
ci/markdown-link-check-config.json (1)

38-40: LGTM!

src/aiq_agent/common/citation_verification.py (1)

43-43: LGTM!

Also applies to: 109-144, 153-174

src/aiq_agent/agents/deep_researcher/agent.py (1)

33-33: LGTM!

Also applies to: 331-331

src/aiq_agent/agents/shallow_researcher/agent.py (1)

360-396: LGTM!

tests/aiq_agent/agents/deep_researcher/test_agent.py (1)

45-46: LGTM!

Also applies to: 356-432, 1331-1435

tests/aiq_agent/agents/shallow_researcher/test_agent.py (1)

33-33: LGTM!

Also applies to: 46-51, 821-905

src/aiq_agent/agents/deep_researcher/register.py (1)

34-35: LGTM!

Also applies to: 321-328

src/aiq_agent/agents/shallow_researcher/register.py (1)

29-30: LGTM!

Also applies to: 109-110, 209-215

src/aiq_agent/agents/chat_researcher/agent.py (1)

225-228: LGTM!

Also applies to: 345-348

tests/aiq_agent/agents/shallow_researcher/test_register_per_user_mcp.py (1)

24-25: LGTM!

Also applies to: 103-157

src/aiq_agent/common/__init__.py (1)

62-62: LGTM!

Also applies to: 98-98

tests/aiq_agent/common/test_citation_verification.py (1)

22-27: LGTM!

Also applies to: 43-113

tests/aiq_agent/agents/chat_researcher/test_agent.py (1)

31-32: LGTM!

Also applies to: 245-316

frontends/aiq_api/src/aiq_api/jobs/runner.py (4)

244-296: LGTM!


298-344: LGTM!


1067-1084: LGTM!


38-41: LGTM!

frontends/aiq_api/src/aiq_api/jobs/callbacks.py (1)

129-137: LGTM!

Also applies to: 393-393

frontends/aiq_api/tests/test_content_encryption_routes.py (1)

83-91: LGTM!

Also applies to: 121-127, 594-639

tests/aiq_agent/jobs/test_runner.py (3)

93-102: LGTM!


924-1235: LGTM!


2495-2544: LGTM!

docs/source/examples/skills-sandbox/index.md (2)

109-113: LGTM!

Also applies to: 122-147, 156-182, 279-282


183-186: 📐 Maintainability & Code Quality

../../integration/rest-api.md#durable-sandbox-artifacts is a valid link.

			> Likely an incorrect or invalid review comment.
docs/source/integration/rest-api.md (1)

207-213: LGTM!

Comment thread src/aiq_agent/agents/deep_researcher/agent.py
Comment thread src/aiq_agent/agents/deep_researcher/agent.py
Comment thread src/aiq_agent/agents/shallow_researcher/register.py
Comment thread src/aiq_agent/common/tool_validation.py
## Summary
- classify empty-source research outcomes and return actionable, sanitized responses
- persist typed async job failures safely and add regression coverage across research workflows
- clarify that direct `nat run` artifacts are non-persistent and document the `nat serve` job/artifact retrieval workflow

## Validation
- Sphinx HTML build passed
- Sphinx linkcheck passed

## Related issue
- https://linear.app/nvidia/issue/AIQ-27/docs-clarify-generated-artifact-persistence-requires-nat-servejob

Signed-off-by: Tanner Leach <tanleach@users.noreply.github.com>

## Summary by CodeRabbit

* **New Features**
  * Research runs now classify empty-source situations (no sources selected, tools unavailable, or no results) and return consistent, user-friendly remediation messages.
  * Failed jobs with actionable source-selection issues preserve sanitized answers and final report artifacts for later retrieval.
* **Bug Fixes**
  * Job failures continue to avoid exposing internal exception details or plaintext output.
* **Documentation**
  * Clarified REST “Get Job Status” semantics for typed source-condition failures and refined the skills-sandbox async/persistence example.
* **Tests**
  * Expanded coverage for empty-source handling, public-facing messaging, and encrypted report/error preservation in API/job flows.

Authors:
  - Tanner Leach (https://github.com/tanleach)

Approvers:
  - Ajay Thorve (https://github.com/AjayThorve)

URL: #397
(cherry picked from commit aa06ef8)
@tanleach
tanleach force-pushed the backport/pr-397-release-2.2 branch from ecf0402 to ec590bd Compare July 29, 2026 10:08
Signed-off-by: Tanner Leach <tleach@nvidia.com>
@tanleach

Copy link
Copy Markdown
Collaborator Author

/ok to test 690d8a8

@tanleach

Copy link
Copy Markdown
Collaborator Author

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants