Skip to content

chore: restore telemetry by default - #4431

Merged
cragwolfe merged 5 commits into
mainfrom
crag/restore-telemetry-by-default
Aug 12, 2026
Merged

chore: restore telemetry by default#4431
cragwolfe merged 5 commits into
mainfrom
crag/restore-telemetry-by-default

Conversation

@cragwolfe

@cragwolfe cragwolfe commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #4281 accidentally changed the existing library-load telemetry ping from default-on/opt-out to explicit opt-in. This PR resumes the existing library-load telemetry by default when unstructured is imported.

Changes

  • Removes the explicit UNSTRUCTURED_TELEMETRY_ENABLED gate while preserving the telemetry endpoint, query payload keys and values, 10-second HTTP timeout, opt-out semantics, and best-effort failure suppression. The synchronous nvidia-smi GPU probe now uses subprocess.run with a 1.0-second timeout and stdin, stdout, and stderr directed to DEVNULL; launch, non-zero-exit, and timeout failures keep import non-fatal and send gpu="False".
  • Users can still turn telemetry off before import by setting either DO_NOT_TRACK or SCARF_NO_ANALYTICS to any non-empty value after trimming whitespace; either variable takes precedence.
  • Updates the README disclosure, outbound-connectivity tooling, focused telemetry coverage, version (0.26.0), and changelog.
  • Forces DO_NOT_TRACK=1 in the root pytest conftest.py before ordinary collection, including when an inherited value is empty or whitespace-only; focused telemetry tests explicitly clear both opt-outs under mocks to prove default-on behavior.
  • Passes DO_NOT_TRACK=1 after any optional env file in make docker-test, ensuring the packaged Docker test layout opts out before pytest collection without changing the production image.

Validation

  • Dedicated regressions: 3 failures on the pre-fix implementation, then 3 passes after the bounded probe and forced test opt-out were applied.
  • /opt/homebrew/opt/uv-wrapper/bin/uv run --locked --group test pytest -q --tb=short test_unstructured/test_telemetry.py — 21 passed
  • make check — passed
  • make check-version — passed
  • git diff --check — passed
  • shellcheck scripts/image/test-outbound-connectivity.sh scripts/image/test-all-outbound-connectivity-scenarios.sh — passed on the unchanged shell files earlier in this PR
  • BCE Junior / Opus and GPT-5.6 Pro Oracle reviews completed; incorporated the bounded GPU-probe, inherited empty/whitespace, and packaged Docker test-hermeticity findings.

(authored by codex)

@cragwolfe cragwolfe changed the title fix: restore telemetry by default chore: restore telemetry by default Aug 11, 2026
@cragwolfe
cragwolfe marked this pull request as ready for review August 12, 2026 00:50

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 10 files

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread conftest.py Outdated
Comment thread unstructured/utils.py
@cragwolfe
cragwolfe added this pull request to the merge queue Aug 12, 2026
@cragwolfe
cragwolfe removed this pull request from the merge queue due to a manual request Aug 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files (changes from recent commits).

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread CHANGELOG.md

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would require human review. Restores telemetry to default-on/opt-out, expanding data collection to all users and reversing the current opt-in default. This is a privacy policy decision requiring human sign-off.

Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would require human review. Re-enables default-on library-load telemetry, expanding behavior exposure to every importer; a privacy/analytics policy decision requiring human sign-off.

Re-trigger cubic

@cragwolfe
cragwolfe added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 8c4592a Aug 12, 2026
163 of 230 checks passed
@cragwolfe
cragwolfe deleted the crag/restore-telemetry-by-default branch August 12, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants