Skip to content

bug(telemetry): the send log does not record where a share went, so a test-receiver 200 reads as a production acknowledgement #2571

Description

@webmixgamer

Summary

telemetry_sharing_recent_sends keeps the last five share attempts (time, backfill flag, window, ok, HTTP status, error class, payload) but not the destination. Settings → Usage sharing derives its receiver sentence from the newest entry (receiver_hint → receiverCopy) and shows it next to the current TELEMETRY_SHARING_URL. An operator who points TELEMETRY_SHARING_URL at a local test receiver, gets a 200, and later restores the default then reads "The receiving service acknowledged the last send" beside the production address, although the production receiver never saw that send. The data is truthful; the sentence is not (Product Quality Bar #4, honest state).

Context

Found while planning abilityai/trinity-enterprise#190 (the benchmark read). The same residue reaches the benchmark status once that lands: the client resolves the receiver's unknown answer against telemetry_sharing_last_shared_at, so a test-receiver acknowledgement makes a never-shared instance look like one whose share went missing. The one-off cleanup is DELETE /api/settings/telemetry_sharing_recent_sends and DELETE /api/settings/telemetry_sharing_last_shared_at (the prefix is DELETE-open by design, requirements §45.2 FR-7), but the log should carry the fact itself.

Acceptance Criteria

  • Each send-log entry records the destination host of TELEMETRY_SHARING_URL at send time (scheme + host + port; never the path's query string, never userinfo) — written by _record_send in src/backend/services/telemetry_sharing_service.py
  • receiver_hint / the panel's receiver sentence names the host that answered, and says plainly when the newest entry's host differs from the currently configured one
  • The Recent sends table shows the host per row (src/frontend/src/components/settings/TelemetrySharingPanel.vue), semantic tokens only, no new bare loading gate
  • Entries written before this change still render (host shown as unknown); no migration — the log is a JSON list in system_settings
  • Tests: tests/unit/test_ent437_telemetry_consent.py covers the new key and the mismatch wording; src/frontend/tests/unit/telemetryConsent.spec.js covers the copy
  • docs/memory/feature-flows/telemetry-sharing.md ("Delivery that survives a missing receiver") and requirements §45.2 FR-5 mention the recorded destination

Technical Notes

  • Writer: share_now builds the entry; reader: get_status → recent_sends + receiver_hint; copy: receiverCopy in src/frontend/src/components/onboarding/telemetryConsent.js.
  • Strip credentials before storing — a configured URL may carry userinfo (src/backend/utils/url_validation.py has strip_url_credentials).
  • Bounded: three files plus tests and two doc lines. Deliberately split off the abilityai/trinity-enterprise#190 client wiring so that P1 PR stays on its one acceptance criterion.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions