Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions clawmetry/adapters/openclaw.py

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) does not document the NemoClaw-specific onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code surfaces through the OpenClaw adapter's detect() method.

Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,118 @@ def _model_router_live() -> dict:
return result


ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The adapter surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The adapter surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

def _nemoclaw_onboard_trace() -> dict:

ghost Aug 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability requirement or its corresponding blueprint.

ghost Aug 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability requirement.

ghost Aug 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability requirement.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability blueprint.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this new observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method's metadata, but this functionality is not documented in the Runtime and Session Observability requirement.

ghost Aug 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method's metadata, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method's metadata, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method's metadata, but this new observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata through the detect() method, but this functionality and the specific implementation details are not documented in the Runtime and Session Observability blueprint.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method's meta field, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The new _nemoclaw_onboard_trace() helper function implements multi-format OTel trace processing (both flat harness and resource_spans shapes) with path resolution via NEMOCLAW_TRACE_FILE, NEMOCLAW_TRACE_DIR, and .e2e/traces/trace.json fallback, extracting worst-case span status and error phase names, but these implementation details are not documented in the Runtime and Session Observability blueprint.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method's meta field, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality and the trace ingestion mechanism are not documented in the Runtime and Session Observability blueprint.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The code now surfaces NemoClaw onboarding OTel trace observability data (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the OpenClaw adapter's detect() method metadata, but this capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The implementation now surfaces NemoClaw onboarding OTel trace metadata through the detect() method, but this functionality—including the path resolution mechanism (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and multi-format trace processing—is not documented in the blueprint.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this functionality and the trace ingestion mechanism are not documented in the Runtime and Session Observability blueprint.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The new _nemoclaw_onboard_trace() helper function implements NemoClaw onboarding OTel trace artifact surfacing (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) with multi-format trace processing and path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback), but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The new _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback), multi-format trace processing, and status ranking, but this implementation is not documented in the Runtime and Session Observability blueprint.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The new _nemoclaw_onboard_trace() helper function surfaces NemoClaw onboarding OTel trace artifacts with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and multi-format trace processing, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The new _nemoclaw_onboard_trace() helper function surfaces NemoClaw onboarding OTel trace artifacts with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and multi-format trace processing, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter now surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The new _nemoclaw_onboard_trace() helper function surfaces NemoClaw onboarding OTel trace artifacts with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and multi-format trace processing, but this functionality is not documented in the Runtime and Session Observability blueprint's trace context inspection section.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in the Runtime and Session Observability requirement.

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The new _nemoclaw_onboard_trace() helper surfaces NemoClaw onboarding OTel trace artifacts with multi-format trace processing (flat harness shape and resource_spans export) and path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback), but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but this observability capability is not documented in REQ-OBS-RSO-002 (Inspect trace context).

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus/SpanCount/Errors/SlowSpans) with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and multi-format trace processing (flat harness shape and resource_spans export), but these capabilities are not documented in the blueprint's trace context inspection section.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but REQ-OBS-RSO-002 (Inspect trace context) does not specify NemoClaw-specific trace handling or these metadata fields.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and multi-format trace processing, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw-specific onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but REQ-OBS-RSO-002 (Inspect trace context) does not document this NemoClaw-specific observability capability or these metadata fields.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this functionality is not documented in the Runtime and Session Observability blueprint.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw-specific onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but REQ-OBS-RSO-002 (Inspect trace context) does not document this NemoClaw-specific observability capability or these metadata fields.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this functionality is not documented in the Runtime and Session Observability blueprint's trace context inspection section.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) does not document the NemoClaw-specific onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code now surfaces through the OpenClaw adapter's detect() method.

ghost Aug 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper surfaces NemoClaw onboarding OTel trace artifacts (nemoclawOnboardTraceStatus/SpanCount/Errors/SlowSpans) with path resolution and multi-format trace processing, but this capability is not documented in the blueprint's trace context inspection section.

ghost Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw-specific onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but REQ-OBS-RSO-002 (Inspect trace context) does not document this NemoClaw-specific observability capability or these metadata fields.

ghost Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and multi-format trace processing (flat harness shape and resource_spans export), but this functionality is not documented in the blueprint's trace context inspection section.

ghost Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The OpenClaw adapter surfaces NemoClaw-specific onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but REQ-OBS-RSO-002 (Inspect trace context) does not document this NemoClaw-specific observability capability or these metadata fields.

ghost Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and multi-format trace processing, but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The code surfaces NemoClaw-specific onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method, but REQ-OBS-RSO-002 (Inspect trace context) does not document this NemoClaw-specific observability capability or specify these metadata fields.

ghost Sep 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The code surfaces NemoClaw onboarding OTel trace metadata (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the detect() method's meta output, but REQ-OBS-RSO-002 (Inspect trace context) does not document this NemoClaw-specific observability capability or these metadata fields.

ghost Sep 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with multi-format trace processing (flat harness shape and standard OTel resource_spans export) and path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json), but this functionality is not documented in the Runtime and Session Observability blueprint's trace context inspection section.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution and multi-format trace processing (flat harness shape and standard OTel resource_spans export), but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) does not document the NemoClaw onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code now surfaces through the OpenClaw adapter's detect() method.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) does not document the NemoClaw onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code now surfaces through the OpenClaw adapter's detect() method.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this capability is not documented in the blueprint's trace context inspection section.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) does not document the NemoClaw onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code surfaces through the OpenClaw adapter's detect() method.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) does not document the NemoClaw onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code surfaces through the OpenClaw adapter's detect() method.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

The code surfaces NemoClaw onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) through the OpenClaw adapter's detect() method, but REQ-OBS-RSO-002 (Inspect trace context) does not document this NemoClaw-specific trace observability capability or specify these metadata fields.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and multi-format trace processing, but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) does not document the NemoClaw-specific onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code surfaces through the OpenClaw adapter's detect() method.

ghost Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The _nemoclaw_onboard_trace() helper implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans, but this functionality is not documented in the blueprint's trace context inspection section.

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) specifies presenting available trace-related activity records but does not document the NemoClaw-specific onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code surfaces through the OpenClaw adapter's detect() method.

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The blueprint's trace context inspection section does not document the _nemoclaw_onboard_trace() helper, which implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans.

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) specifies presenting available trace-related activity records but does not document the NemoClaw-specific onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code surfaces through the OpenClaw adapter's detect() method.

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The blueprint's trace context inspection section does not document the _nemoclaw_onboard_trace() helper, which implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans.

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Requirement: Runtime and Session Observability

REQ-OBS-RSO-002 (Inspect trace context) specifies presenting available trace-related activity records but does not document the NemoClaw-specific onboarding OTel trace metadata fields (nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, nemoclawOnboardSlowSpans) that the code surfaces through the OpenClaw adapter's detect() method.

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The blueprint's trace context inspection section does not document the _nemoclaw_onboard_trace() helper, which implements NemoClaw onboarding OTel trace artifact surfacing with path resolution (NEMOCLAW_TRACE_FILE/NEMOCLAW_TRACE_DIR/.e2e/traces/trace.json fallback) and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount, nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans.

"""Read NemoClaw onboarding OTel trace artifacts (#5193).

When ``NEMOCLAW_TRACE`` is set the harness writes OpenTelemetry-style spans
for each onboarding phase (e.g. ``nemoclaw.onboard.phase.gateway``,
``nemoclaw.onboard.phase.inference``) including span status (OK/ERROR/UNSET),
duration_ms, events, sanitised attributes, and a ``summary.slowest_spans``
list. ClawMetry surfaces the worst-case status, error phase names, and the
slowest-span summary so a failed or slow onboarding step is diagnosable from
the dashboard rather than silently invisible.

Path resolution (first match wins):
1. ``NEMOCLAW_TRACE_FILE`` env var.
2. ``NEMOCLAW_TRACE_DIR/trace.json``.
3. ``.e2e/traces/trace.json`` (harness default, relative to cwd).

Handles both the flat harness shape ``{spans:[...], summary:{...}}`` and the
standard OTel ``resource_spans`` export. Returns ``{}`` when
``NEMOCLAW_TRACE`` is unset/disabled or no file is found. Never raises.
"""
import json as _json

trace_env = os.environ.get("NEMOCLAW_TRACE", "")
if not trace_env or trace_env.lower() in ("0", "false", "no"):

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The implementation includes error detection via span-status ranking (ERROR/UNSET/OK), error phase name extraction, and slowest_spans capping at 5, but these observability design details are not documented in the blueprint's approach to trace context inspection.

ghost Sep 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The implementation includes error detection via span-status ranking (ERROR/UNSET/OK), error phase name extraction from ERROR spans, and slowest_spans capping at 5, but these observability design details and trace processing strategy are not documented in the blueprint's approach to trace context inspection.

return {}

candidates = []
tf = os.environ.get("NEMOCLAW_TRACE_FILE", "")
if tf:

ghost Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The implementation includes error detection via span-status ranking (ERROR/UNSET/OK), error phase name extraction, and slowest_spans capping at 5, but these observability design details and trace processing strategy are not documented in the blueprint's approach to trace context inspection.

candidates.append(tf)
td = os.environ.get("NEMOCLAW_TRACE_DIR", "")
if td:
candidates.append(os.path.join(td, "trace.json"))
candidates.append(os.path.join(".e2e", "traces", "trace.json"))

data = None
for path in candidates:
try:
with open(path, "r", encoding="utf-8", errors="replace") as fh:
data = _json.load(fh)
break
except (OSError, ValueError):
continue
except Exception:
continue

if data is None or not isinstance(data, dict):
return {}

try:
spans: list = []
if "spans" in data:
raw = data["spans"]
if isinstance(raw, list):
spans = raw

ghost Aug 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The implementation includes error detection via span-status ranking (ERROR/UNSET/OK), error phase name extraction, and slowest_spans capping at 5, but these observability design details are not documented in the blueprint's approach to trace context inspection.

elif "resource_spans" in data:
for rs in data.get("resource_spans", []):

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The implementation includes specific observability design details (error detection via span-status ranking with ERROR/UNSET/OK priorities, error phase name extraction from ERROR spans, slowest_spans output capped at 5 entries, support for both flat harness and resource_spans OTel trace formats) that are not documented in the blueprint's approach to trace context inspection.

ghost Sep 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Drift Bot (ClawMetry) — Blueprint: Runtime and Session Observability

The implementation includes specific observability design details (error detection via span-status ranking with ERROR/UNSET/OK priorities, error phase name extraction from ERROR spans, slowest_spans output capped at 5 entries, support for both flat harness and resource_spans OTel trace formats) that are not documented in the blueprint's approach to trace context inspection.

for ss in (rs.get("scope_spans") or rs.get("scopeSpans") or []):
spans.extend(ss.get("spans", []))

_STATUS_RANK = {"ERROR": 2, "UNSET": 1, "OK": 0}
# OTel status codes: 0 = UNSET, 1 = OK, 2 = ERROR (the JSON export
# writes ``{"code": N}``; some exporters write ``STATUS_CODE_OK``).
_CODE_TO_STATUS = {0: "UNSET", 1: "OK", 2: "ERROR"}

def _norm_status(raw) -> str:
if isinstance(raw, dict):
raw = raw.get("code", raw.get("status_code", "UNSET"))
if isinstance(raw, bool):
return "UNSET"
if isinstance(raw, (int, float)):
return _CODE_TO_STATUS.get(int(raw), "UNSET")
text = str(raw or "UNSET").upper().strip()
if text.startswith("STATUS_CODE_"):
text = text[len("STATUS_CODE_"):]
return text if text in _STATUS_RANK else "UNSET"

worst_rank = -1
worst_status = "UNSET"
error_names: list = []

for span in spans:
if not isinstance(span, dict):
continue
status = _norm_status(span.get("status", "UNSET"))
rank = _STATUS_RANK[status]
if rank > worst_rank:
worst_rank = rank
worst_status = status
if status == "ERROR":
name = span.get("name") or span.get("spanName") or ""
if name:
error_names.append(str(name))

result: dict = {}
if spans:
result["nemoclawOnboardTraceStatus"] = worst_status
result["nemoclawOnboardTraceSpanCount"] = len(spans)
if error_names:
result["nemoclawOnboardTraceErrors"] = error_names[:10]

summary = data.get("summary")
if isinstance(summary, dict):
slow = summary.get("slowest_spans")
if isinstance(slow, list) and slow:
result["nemoclawOnboardSlowSpans"] = slow[:5]

return result
except Exception:
return {}


def _parse_proxy_config_model_list(content: str) -> Optional[List[str]]:
"""Extract model names from a LiteLLM-style proxy-config YAML (#2960).

Expand Down Expand Up @@ -2451,6 +2563,13 @@ def detect(self) -> DetectResult:
# fleet views know whether autonomous skill actions are gated by
# human approval. Returns {} on installs without the key.
meta.update(_workshop_approval_config())
# NemoClaw onboarding OTel trace artifacts (#5193): surfaces
# nemoclawOnboardTraceStatus/SpanCount/Errors/SlowSpans when
# NEMOCLAW_TRACE is set and the harness wrote a trace file.
# Returns {} when disabled or file absent — no guard needed.
_ot = _nemoclaw_onboard_trace()
if _ot:
meta.update(_ot)
return DetectResult(
name=self.name,
display_name=self.display_name,
Expand Down
226 changes: 226 additions & 0 deletions tests/test_obs_gap_nemoclaw_onboard_trace_5193.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
"""Tests for issue #5193 — nemoclaw: onboarding OTel trace artifacts not ingested.

Verifies that _nemoclaw_onboard_trace() reads the trace file written by the
NemoClaw harness (NEMOCLAW_TRACE_FILE / NEMOCLAW_TRACE_DIR / .e2e/traces/trace.json)
and surfaces nemoclawOnboardTraceStatus, nemoclawOnboardTraceSpanCount,
nemoclawOnboardTraceErrors, and nemoclawOnboardSlowSpans on DetectResult.meta.

Fingerprint: hgap-1f53053124 (used to dedupe — keep it in the body).
"""
from __future__ import annotations

import importlib
import json
import os
import sys

import pytest


@pytest.fixture(autouse=True)
def _restore_sys_modules():
saved = sys.modules.get("clawmetry.adapters.openclaw")
yield
if saved is None:
sys.modules.pop("clawmetry.adapters.openclaw", None)
else:
sys.modules["clawmetry.adapters.openclaw"] = saved


def _reload_adapter():
import clawmetry.adapters.openclaw as oc_mod
importlib.reload(oc_mod)
return oc_mod


def _write_trace(path, spans, summary=None):
data: dict = {"spans": spans}
if summary is not None:
data["summary"] = summary
os.makedirs(os.path.dirname(path), exist_ok=True)
with open(path, "w") as fh:
json.dump(data, fh)


def test_disabled_when_env_not_set(monkeypatch):
"""Returns {} when NEMOCLAW_TRACE is absent."""
monkeypatch.delenv("NEMOCLAW_TRACE", raising=False)
oc = _reload_adapter()
assert oc._nemoclaw_onboard_trace() == {}


def test_disabled_when_env_zero(monkeypatch):
"""Returns {} when NEMOCLAW_TRACE=0 (explicitly disabled)."""
monkeypatch.setenv("NEMOCLAW_TRACE", "0")
oc = _reload_adapter()
assert oc._nemoclaw_onboard_trace() == {}


def test_returns_empty_when_file_missing(monkeypatch, tmp_path):
"""Returns {} gracefully when trace file does not exist — never raises."""
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(tmp_path / "no_such_file.json"))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
monkeypatch.chdir(tmp_path) # prevents fallback to .e2e/traces/trace.json
oc = _reload_adapter()
assert oc._nemoclaw_onboard_trace() == {}


def test_ok_spans_surface_status_and_count(monkeypatch, tmp_path):
"""All-OK spans produce status=OK and the correct span count."""
trace_file = tmp_path / "trace.json"
_write_trace(str(trace_file), [
{"name": "nemoclaw.onboard.phase.gateway", "status": "OK", "duration_ms": 120},
{"name": "nemoclaw.onboard.phase.inference", "status": "OK", "duration_ms": 340},
])
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(trace_file))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
oc = _reload_adapter()
result = oc._nemoclaw_onboard_trace()
assert result["nemoclawOnboardTraceStatus"] == "OK"
assert result["nemoclawOnboardTraceSpanCount"] == 2
assert "nemoclawOnboardTraceErrors" not in result


def test_error_span_surfaces_status_and_name(monkeypatch, tmp_path):
"""An ERROR span sets worst-case status=ERROR and includes the phase name."""
trace_file = tmp_path / "trace.json"
_write_trace(str(trace_file), [
{"name": "nemoclaw.onboard.phase.gateway", "status": "OK", "duration_ms": 80},
{"name": "nemoclaw.onboard.phase.inference", "status": "ERROR", "duration_ms": 5000},
])
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(trace_file))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
oc = _reload_adapter()
result = oc._nemoclaw_onboard_trace()
assert result["nemoclawOnboardTraceStatus"] == "ERROR"
assert result["nemoclawOnboardTraceSpanCount"] == 2
assert "nemoclaw.onboard.phase.inference" in result["nemoclawOnboardTraceErrors"]


def test_slowest_spans_forwarded_from_summary(monkeypatch, tmp_path):
"""summary.slowest_spans is forwarded as nemoclawOnboardSlowSpans (capped at 5)."""
slow = [
{"name": "nemoclaw.onboard.phase.inference", "duration_ms": 4200},
{"name": "nemoclaw.onboard.phase.gateway", "duration_ms": 900},
]
trace_file = tmp_path / "trace.json"
_write_trace(str(trace_file), [
{"name": "nemoclaw.onboard.phase.inference", "status": "OK", "duration_ms": 4200},
], summary={"slowest_spans": slow})
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(trace_file))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
oc = _reload_adapter()
result = oc._nemoclaw_onboard_trace()
assert result["nemoclawOnboardSlowSpans"] == slow


def test_trace_dir_env_resolves_to_trace_json(monkeypatch, tmp_path):
"""NEMOCLAW_TRACE_DIR is used as a directory and trace.json is appended."""
trace_dir = tmp_path / "traces"
trace_dir.mkdir()
_write_trace(str(trace_dir / "trace.json"), [
{"name": "nemoclaw.onboard.phase.gateway", "status": "OK", "duration_ms": 50},
])
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.delenv("NEMOCLAW_TRACE_FILE", raising=False)
monkeypatch.setenv("NEMOCLAW_TRACE_DIR", str(trace_dir))
oc = _reload_adapter()
result = oc._nemoclaw_onboard_trace()
assert result["nemoclawOnboardTraceStatus"] == "OK"
assert result["nemoclawOnboardTraceSpanCount"] == 1


def test_resource_spans_otel_export_format(monkeypatch, tmp_path):
"""Standard OTel resource_spans export shape is parsed correctly (snake_case keys)."""
trace_file = tmp_path / "trace.json"
data = {
"resource_spans": [
{
"scope_spans": [
{
"spans": [
{"name": "nemoclaw.onboard.phase.gateway", "status": "OK"},
{"name": "nemoclaw.onboard.phase.inference", "status": "ERROR"},
]
}
]
}
]
}
with open(str(trace_file), "w") as fh:
json.dump(data, fh)
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(trace_file))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
oc = _reload_adapter()
result = oc._nemoclaw_onboard_trace()
assert result["nemoclawOnboardTraceStatus"] == "ERROR"
assert result["nemoclawOnboardTraceSpanCount"] == 2
assert "nemoclaw.onboard.phase.inference" in result["nemoclawOnboardTraceErrors"]


def test_resource_spans_camel_case_scope_spans(monkeypatch, tmp_path):
"""Standard OTel resource_spans export with camelCase scopeSpans key is parsed correctly."""
trace_file = tmp_path / "trace.json"
data = {
"resource_spans": [
{
"scopeSpans": [
{
"spans": [
{"name": "nemoclaw.onboard.phase.gateway", "status": "OK"},
]
}
]
}
]
}
with open(str(trace_file), "w") as fh:
json.dump(data, fh)
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(trace_file))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
oc = _reload_adapter()
result = oc._nemoclaw_onboard_trace()
assert result["nemoclawOnboardTraceStatus"] == "OK"
assert result["nemoclawOnboardTraceSpanCount"] == 1


def test_otel_export_shape_with_status_code_objects(monkeypatch, tmp_path):
"""Standard OTel JSON export: resource_spans/scope_spans and {code: N} status."""
trace_file = tmp_path / "trace.json"
data = {"resource_spans": [{"scope_spans": [{"spans": [
{"name": "nemoclaw.onboard.phase.gateway", "status": {"code": 1}},
{"name": "nemoclaw.onboard.phase.inference", "status": {"code": 2}},
{"name": "nemoclaw.onboard.phase.sandbox", "status": "STATUS_CODE_OK"},
{"name": "nemoclaw.onboard.phase.unknown", "status": "weird-value"},
]}]}]}
with open(trace_file, "w") as fh:
json.dump(data, fh)
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(trace_file))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
oc = _reload_adapter()
out = oc._nemoclaw_onboard_trace()
assert out["nemoclawOnboardTraceStatus"] == "ERROR"
assert out["nemoclawOnboardTraceSpanCount"] == 4
assert out["nemoclawOnboardTraceErrors"] == ["nemoclaw.onboard.phase.inference"]


def test_unrecognised_status_strings_report_unset_not_raw(monkeypatch, tmp_path):
"""Status is always one of OK/ERROR/UNSET, never an arbitrary raw string."""
trace_file = tmp_path / "trace.json"
_write_trace(str(trace_file), [
{"name": "nemoclaw.onboard.phase.gateway", "status": "bogus"},
])
monkeypatch.setenv("NEMOCLAW_TRACE", "1")
monkeypatch.setenv("NEMOCLAW_TRACE_FILE", str(trace_file))
monkeypatch.delenv("NEMOCLAW_TRACE_DIR", raising=False)
oc = _reload_adapter()
out = oc._nemoclaw_onboard_trace()
assert out["nemoclawOnboardTraceStatus"] == "UNSET"
assert "nemoclawOnboardTraceErrors" not in out