Skip to content

feat(telemetry): ask who is measured at opt-in - #1034

Merged
blafourcade merged 11 commits into
nextfrom
feat/identity-at-opt-in
Oct 16, 2026
Merged

blafourcade merged 11 commits into
nextfrom
feat/identity-at-opt-in

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

🎯 What & why

Before this change, --axis person named someone only after they ran aidd telemetry identity <id>, a command almost nobody finds. Otherwise the row read not set, and nothing said which name a machine was measured under. aidd telemetry on now asks that question at opt-in, and status reports the answer.

🛠️ How it works

  • The question comes after consent and before any write. The command collects the choice and passes it to the on use case. The use case writes the identity only when the opt-in succeeds, so a refused on writes neither consent nor identity. The order is shown in contract.md.

  • Interactive on with no identity set offers three choices:

    • the git user.name, else user.email, read through a port and only shown, never stored unless chosen;
    • another identifier, typed by the person;
    • staying anonymous.

    A typed identifier goes through personIdOf. A refused one prints the rule and asks again (telemetry.ts:79). Under AIDD_TELEMETRY=0, git is not read and the git name is not offered.

  • Non-interactive. on --yes --as <id> or on --yes --anonymous. With no identity set, --yes alone exits 1 before writing anything (telemetry.ts:156): --yes never decides anything implicitly. The redesigned on has never been released (it exists on next only, since feat(telemetry): deterministic claude code token measurement, release 1 #993), so no released behaviour breaks.

  • Anonymous is a label, not a value. The text report labels the person row anonymous. The JSON envelope is unchanged (kind absent, key: null), so --absent person (feat(telemetry): filter the report by task, ticket, person and more #1033) still selects that row. Choosing to stay anonymous is not stored, so the next on asks again.

  • The 00-init skill reads nothing from git, so no name reaches the session transcript before the person chooses. It asks the person to type an identifier or stay anonymous, then runs on --yes --as '<id>' (single quotes escaped) or --anonymous. It runs aidd telemetry on --help first and stops if --anonymous is missing (an older CLI).

🧪 How to verify

  • cd cli && pnpm test: 6621 passed, 1 skipped, on the tree merged with next.
  • pnpm test:mutation:telemetry: 96.6 (floor 96), with no survivor on a changed line.
  • pnpm smoke: 132/0/1. Bundle 692.8 KB of a 695 KB budget.
  • node scripts/check-claude-tokens-end-to-end.cjs cli/dist/cli.js, and again with --attended: both exit 0.
  • Run in a sandbox, with HOME and the config directories set to temporary ones:
    • aidd telemetry on --yes --as "Ada Example" prints Measured as "Ada Example".
    • aidd telemetry report --person "Ada Example" selects that person's call.
    • aidd telemetry report --absent person prints Selected: person = anonymous.
  • Red runs, guards and gate outputs are in evidence.md. An independent review approved in round 2: review.md.

⚠️ Heads-up

  • The bundle has 2.2 KB of headroom left.
  • The --person filter compares against this machine's own identity. Locally, it selects every call or none until team figures are gathered (feat(framework): upload out of band, never at the session's expense #662).
  • Locally, the pre-push suite failed twice under load, without naming a failing test, then passed on rerun. The suite also passes when run directly. Worth watching in CI.

🔗 Linked issue

Closes #1029

✅ 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 11 commits October 15, 2026 21:13
The on use case takes who the clone is measured as: the identity already
set, none, or one chosen. It refuses an identifier the identity rules
refuse, and staying anonymous while an identity is set, before writing
anything, and writes the identity only after consent is granted. A
proposal is read from git's user.name, else user.email, never under
AIDD_TELEMETRY=0. The command still passes keep: nothing changes yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
`aidd telemetry on` takes --as <id> or --anonymous. Interactively, with
no identity set, it asks once the opt-in is confirmed: the git name when
there is one, another identifier, or anonymous. --yes with no identity
and neither flag is an error before anything is written, so scripts and
tests now pass --anonymous. `on` and `status` say who the measurement
names, and the text report labels nobody `anonymous`; the envelope is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
…minal

The usage contract, the contributor map and the plugin README describe
who is measured at `on`. The 00-init start action reads the identity,
asks how the person appears when none is set, offering the git name, and
runs `on --yes --as <id>` or `--anonymous`. Gate evidence recorded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
A typed identifier the identity rules refuse is asked again instead of
ending `on` after the opt-in was confirmed. The refusal and the prompt
say "one non-empty line of at most 128 characters", and the command
prints the refusal through the display instead of a copy of its text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
…help

The 00-init skill asks the person to type an identifier or stay
anonymous, runs `on --yes --as '<id>'` quoted or `--anonymous`, and says
that `aidd telemetry on` in a terminal offers the git name: no name
reaches the session before the person chooses. Its probe now requires
`--anonymous` in `aidd telemetry on --help`. The start test table loses
the row its two new rows cover. Contract rules 5 and 6 say what ships.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
A refused typed identifier now prints the identity rule before the
prompt repeats. The start action says how to keep a quote inside the
single-quoted --as value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
Brings in the report filters (#1033). Both sides kept: the `on`
identity question and options beside the report's filter options, both
public telemetry modules declared, both rows of the contributor map. The
absent person filter now reads `anonymous`, as the report rows do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
The review's two rounds, the gates rerun on the tree merged with the
report filters, and the contract and plan marked done.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp
@blafourcade
blafourcade marked this pull request as ready for review October 16, 2026 04:41
@blafourcade
blafourcade requested a review from a team as a code owner October 16, 2026 04:41
@blafourcade
blafourcade merged commit 06dbb98 into next Oct 16, 2026
33 checks passed
@aidd-bot aidd-bot Bot mentioned this pull request Oct 16, 2026
@blafourcade
blafourcade deleted the feat/identity-at-opt-in branch October 17, 2026 12:10
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