Skip to content

[TEL5-P3-S5] Wire main - #14841

Merged
cv merged 5 commits into
v1from
feat/tel5-p3-s5-wire-main
Nov 24, 2026
Merged

cv merged 5 commits into
v1from
feat/tel5-p3-s5-wire-main

Conversation

@wscurran

@wscurran wscurran commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Sends one v1 telemetry record when apply, destroy, or a saving onboard finishes, after the command's output is written. plan and export send nothing.

Problem

The record's parts (types, gate, install ID file, sender, host fields, configuration fields) are in crates/nemoclaw-cli/src/telemetry/, but no command calls them.

Resolves #14032.

Change

  • dispatch.rs: run hands back the document it read, alongside the result: the apply input, the document in <state-dir>/intent.json for destroy, or the file a saving onboard wrote.
  • main.rs: decides at start whether this process may send (gate::check), watches the progress stage events, and after the output is written builds and sends one record. The exit code and output do not change; the send gives up after 3 seconds.
  • telemetry/mod.rs: turns a finished command into a record.
    • outcome: succeeded, cancelled (exit code 130), or failed.
    • effect: from the OpenTofu actions of the changes, as in the design's table; teardown for destroy, authored for onboard, other on failure.
    • failureStage: the last stage event before the failure, validate before any.
    • durationMs: from just after argument parsing to the end of the command.
    • An onboard that fails or saves nothing sends no record.
  • Tests: every test that runs the built CLI now starts from one helper that sets NEMOCLAW_DISABLE_TELEMETRY=1. tests/telemetry.rs runs the CLI against a local receiver: one record each for apply and destroy, none for plan and export, and a stalled receiver ends the command within 3 seconds with the same exit code. A saving onboard needs a terminal, so a unit test covers its record.

Testing

  • cargo test -p nemoclaw-cli: 121 unit and 25 integration tests pass; clippy is clean.

  • By hand on a fresh Ubuntu 24.04 x86_64 machine, with the CLI built from this branch and pointed at a local receiver:

    Command Records Record
    onboard, saved 1 succeeded, authored, computeDriver: docker, harness OpenClaw, firstRun: true
    apply 1 failed, other, failureStage: validate (no API key given)
    destroy 1 failed, other, failureStage: validate, computeDriver: unknown
    plan, plan --destroy, export 0 none

    All records carried one install ID and buildKind: dev. A successful apply or destroy was not run; unit tests cover their effect.

🤖 Generated with Claude Code

wscurran and others added 2 commits November 24, 2026 11:01
Send one 5.0 telemetry record when apply, destroy, or a saving onboard
finishes, after the command's output is written. Dispatch hands back the
document it read (the apply input, the destroy intent.json, or the file
onboard wrote); main takes outcome, effect, failure stage and duration
from the result and the progress stage events. plan and export send
nothing.

Every test that runs the built CLI now starts from one helper that turns
the record off; tests/telemetry.rs turns it on against a local receiver.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Will Curran <[email protected]>
Main passes outcome, effect and failure stage straight to report;
dispatch fills a document slot instead of wrapping its result; drop an
unused export mapping and fold overlapping tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Will Curran <[email protected]>
@wscurran wscurran added this to the Roadmap: GTC DC 2026 milestone Nov 24, 2026
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: observability Logging, metrics, tracing, diagnostics, or debug output v1 NemoClaw v1 branch labels Nov 24, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@wscurran wscurran self-assigned this Nov 24, 2026
@wscurran wscurran linked an issue Nov 24, 2026 that may be closed by this pull request
@github-actions

Copy link
Copy Markdown
Contributor

wscurran and others added 2 commits November 24, 2026 14:00
v1 moved examples/openclaw.yaml to examples/agents/openclaw.yaml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@wscurran

Copy link
Copy Markdown
Contributor Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Claude Code 2.1.328 (desktop app) Session metadata
Skills recorded nemoclaw-test (read; used only to lease and return a test machine) Skill invocations to cutoff; the create-PR skill was not read
Instruction files recorded user CLAUDE.md (injected); project memory index (injected); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup injections and reads to cutoff
Tool calls recorded Bash: 77; read_terminal: 25; update_plan: 16; Read: 15; wrap_up: 12; Edit: 11; run_in_terminal: 11; Write: 8; stop_terminal_tab: 7; ToolSearch: 5; show_pane: 2; pr get_status: 1; Skill: 1 Includes failed calls; the Bash wrapper hides nested calls
Tokens recorded input: 26295598; cached input: 25927866; output: 87761 Final usage of 162 unique API responses to cutoff
Session window recorded 2026-11-24T18:50Z to 2026-11-24T22:00Z; 3 h 10 min First event in this transcript to cutoff, including idle time
Compactions recorded 1 Complete record to cutoff
Models recorded claude-sonnet-5-5; claude-opus-5-5 Sonnet for the first turn only, which made no changes; Opus for all authoring
Reasoning levels unavailable - Reasoning-level history unavailable.

The stalled-receiver test compared against a run with telemetry off, so
host detection counted against the 3-second budget and a slow runner
missed it by 8 ms. It now compares against a run that sends to an
answering receiver, so only the stall is timed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@wscurran
wscurran marked this pull request as ready for review November 24, 2026 23:11
@wscurran
wscurran requested a review from cv November 24, 2026 23:11
@github-actions

Copy link
Copy Markdown
Contributor

Selected hardware E2Es

Commit: 906e39aa4b00e235b486e7d9a409e4ddeee0d238

Selected cases run automatically; results do not gate merging.

Shared code or test infrastructure changed.

  • dgx-station-hermes-nemotron
  • dgx-station-openclaw-nemotron
  • docker-openclaw-hermes-ollama
  • docker-openclaw-llama-cpp
  • docker-openclaw-vllm
  • docker-openclaw-vllm-shared

@wscurran

Copy link
Copy Markdown
Contributor Author

@cv ready for review.

This makes the CLI send one telemetry record after apply, destroy, or an onboard that saves a file. plan and export send nothing. The send comes after the output, gives up after 3 seconds, and never changes the exit code.

Tested with new local-receiver tests, and by hand on a fresh Linux machine (records went to a local receiver, not production). A successful apply/destroy wasn't run end to end; unit tests cover it.

@cv
cv merged commit 9dc76ff into v1 Nov 24, 2026
136 of 138 checks passed
@cv
cv deleted the feat/tel5-p3-s5-wire-main branch November 24, 2026 23:45
cv added a commit that referenced this pull request Nov 25, 2026
Tells users what the v1 CLI's usage record sends and how to turn it off,
in the security guide, with one pointer from the install guide.

## Problem

The CLI now sends one usage record when `apply`, `destroy`, or a saving
`onboard` finishes (#14841), and the managed OpenShell gateway's
telemetry follows the same switch (#14797). The user docs don't mention
either.

Resolves #14107.

## Change

- `docs/security/security.md`: a Usage Telemetry entry under Retained
Data and Telemetry. It covers when a record is sent,
`NEMOCLAW_DISABLE_TELEMETRY` and CI, the fields by group, the rules for
model names, harness IDs, inference endpoints, and machine details, what
is never sent, the install ID file and how to reset it, the QA test
label, and the managed gateway's separate telemetry.
- `docs/get-started/install.md`: one line that links to it.
- The full field table, the endpoint and send behavior, every CI
variable, and the label format stay in
`internal-docs/design/telemetry.md`; the entry links to it instead of
repeating them.

## Testing

- `cargo run --locked -p nemoclaw-build -- fern check`: 0 errors.
- `git diff --check`: clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Carlos Villela <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: observability Logging, metrics, tracing, diagnostics, or debug output v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(feat) [TEL5-P3-S5] Send one record when a command finishes

2 participants