Skip to content

fix(telemetry): status after off says measurement was turned off - #1041

Merged
blafourcade merged 7 commits into
nextfrom
fix/status-after-off
Oct 16, 2026
Merged

blafourcade merged 7 commits into
nextfrom
fix/status-after-off

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

🎯 What & why

After aidd telemetry on then off, aidd telemetry status claimed the clone had never run on. Both cases shared the no-consent reason. Status now says measurement was turned off in this clone, and how to turn it back on.

🛠️ How it works

  • off already leaves a trace. It sets git config aidd.telemetry to off, and only on a clone that had consented. turnedOff(reading) (telemetry-consent.ts:49) reads that key, and a key set to off by hand counts the same.
  • A new refusal reason, turned-off.
    • It is decided only once the consent log is read and the clone is identified (consented-repositories.ts:45).
    • With a damaged log, or a clone that has no identity, the reason stays unreadable-consent, because on would refuse there. Status never says to run a command that would fail.
  • Text only, nothing in JSON. The reason is printed by status and task (telemetry-display.ts:72), and neither has --json. The report's refused envelope and its not_stored.no-consent count are unchanged.
  • consentOf is not touched. The fixture shared with the hooks pins "off": "absent", so the hooks and the CLI still agree.

🧪 How to verify

  • Run these in a sandbox. After the fix the last command prints Not measured: measurement was turned off in this clone. Run \aidd telemetry on` to measure it again.`
    • aidd telemetry on --yes --anonymous
    • aidd telemetry off
    • aidd telemetry status
  • cd cli && pnpm test: 6637 passed, 1 skipped.
  • pnpm test:mutation:telemetry: 96.3 (floor 96). Every mutant on a changed line is killed except one equivalent, explained in evidence.md.
  • Red runs and guard breaks (G1 to G4, M1 to M7): evidence.md. Independent review, approved at 90%: review.md.

⚠️ Heads-up

  • Bundle: 693.1 KB of a 695 KB budget.
  • After forget --yes the key is gone, so status reads "has not run on" again. That is correct, because forget erases everything.
  • A 2:<token> key whose consent period is closed still reads no-consent. The on then off flow never produces one.

🔗 Linked issue

Closes #1035

✅ I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp

blafourcade and others added 7 commits October 16, 2026 09:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
After `on` then `off`, status and task said the clone had never run
`on`. The key `off` that `off` writes now reads as a refusal of its
own, `turned-off`, worded with how to measure again. A clone that never
ran `on` keeps its words; no JSON carries the reason.

Closes #1035

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
A clone turned off with a damaged consent log, or with no identity,
was told to run `aidd telemetry on`, which then refuses. It now reads
`unreadable-consent` there, and `turned-off` only once the log is read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
@blafourcade
blafourcade marked this pull request as ready for review October 16, 2026 09:54
@blafourcade
blafourcade requested a review from a team as a code owner October 16, 2026 09:54
@blafourcade
blafourcade merged commit b5c2525 into next Oct 16, 2026
61 checks passed
@aidd-bot aidd-bot Bot mentioned this pull request Oct 26, 2026
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.

1 participant