Repository navigation
enhancement: reduce ATIF output size - #1520
Conversation
Signed-off-by: Will Killian <[email protected]>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Retention configuration crates/core/src/observability/plugin_component.rs, crates/node/observability.d.ts, crates/node/observability.js, go/nemo_relay/observability_plugin.go, python/nemo_relay/observability.py, python/nemo_relay/observability.pyi, crates/node/tests/observability_plugin_tests.mjs, go/nemo_relay/observability_plugin_test.go, python/tests/test_observability_plugin.py |
Rust, Node.js, Go, and Python configuration surfaces add options for observed-event and LLM-request retention. Both default to enabled. |
Export retention and serialization crates/core/src/observability/plugin_component.rs |
Normal and shutdown exports carry the configured options into payload preparation. The exporter conditionally omits observed events and recursively removes llm_request fields, including in nested trajectories. Remote-storage payloads use compact JSON; other payloads remain pretty-printed. |
Retention validation and documentation crates/core/tests/unit/observability/plugin_component_tests.rs, crates/core/tests/integration/atif_storage_tests.rs, docs/about-nemo-relay/concepts/subscribers.mdx, docs/configure-plugins/observability/atif.mdx |
Tests check retention settings, nested trajectories, serialization, and HTTP upload bodies. Documentation describes the options and their effects on plugin-managed exports. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant AtifSectionConfig
participant ManagedAtifExporter
participant prepare_atif_payload
participant RemoteStorage
AtifSectionConfig->>ManagedAtifExporter: retention options
ManagedAtifExporter->>prepare_atif_payload: trajectory and output options
prepare_atif_payload->>RemoteStorage: compact JSON payload
Possibly related PRs
- NVIDIA/NeMo-Relay#1486: Changes ATIF user-step projection while retaining full requests in
extra.llm_request, which this PR can omit. - NVIDIA/NeMo-Relay#1483: Changes ATIF user-message projection while retaining full requests in
extra.llm_request, which this PR can omit.
Merge Risk: 
Minimal · up to 96078
-
The retention options and export behavior have no identified issue blocking merge after normal checks.
Important
Pre-merge checks failed
Please resolve all errors before merging. Addressing warnings is optional.

Passed checks: 3 passed
-
Full details: Linked Issues check
-
Explanation
Issue
#1414requires smaller ATIF payloads and optional remoteobserved_events. The PR addsinclude_observed_eventsandinclude_llm_requests, with defaults set totrue, and applies them during normal and shutdown exports.prepare_atif_payloadomitsextra.observed_eventswhen configured and recursively removesllm_requestfrom nested trajectories. Remote storage uses compact JSON, while local output remains pretty-printed. Rust tests cover retention, nested trajectories, teardown, compact uploads, and quadratic history growth. Python, Node.js, and Go configuration mirrors are included.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#1414. Configuration mirrors, schema validation, documentation, storage tests, lifecycle tests, and size-growth tests directly support the retention and payload-size objectives. No unrelated product behavior is evident. StandaloneAtifExporterbehavior remains unchanged.
Full details: Description check
-
Explanation
The description follows the template. It has an Overview with both checklist items marked, a Details section listing the config, skip, strip, compact JSON, and test changes, and a Where should the reviewer start section that names specific files. The Related Issues section uses Closes with
#1414and RELAY-1106. The Validation list is extra but supports the change. The description is specific and matches the raw summary and the objectives.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 26 functions across 11 files. (2 skipped: 2 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Overview
ATIF exports repeat full request histories in trajectory steps and raw events. Add options to omit either copy, and send compact JSON to HTTP and S3 storage.
Details
include_observed_eventsandinclude_llm_requeststo the Rust, Python, Node.js, and Go configuration types. Both default totrue.include_observed_eventsisfalse. Keep event deduplication.include_llm_requestsisfalse. Apply this to embedded subagent trajectories and shutdown exports.Set both options to
falseto remove both copies of request history. Full requests can hold data that step messages omit, so consumers that rebuild requests should keep request retention enabled. The core exporter still keeps full events in memory. StandaloneAtifExporterbehavior stays the same.Validation:
just test-rust: 6,533 passed, with one test passing on retry. Used human-readable logging for a CLI test that expects that format.just test-python: 1,211 Python tests, 86 native tests, and 24 plugin example tests passed. Pinned Python 3.13.14 to match the virtual environment.just test-nodeandjust test-gopassed.just docs-linkcheckpassed. The published redirect comparison was skipped because the docs service returned HTTP 403.tyhook reports three unused-suppression warnings in unchanged integration tests. The full check passes with--exit-zero-on-warning. Only that hook was skipped for the commit retry.Where should the reviewer start?
Start with
prepare_atif_payloadincrates/core/src/observability/plugin_component.rs. Then review the retention and size growth tests incrates/core/tests/unit/observability/plugin_component_tests.rs.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit