Skip to content

Report usage to trace - #21

Merged
dmccoystephenson merged 2 commits into
mainfrom
trace/wiring
Sep 24, 2026
Merged

dmccoystephenson merged 2 commits into
mainfrom
trace/wiring

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Collide is part of the danielstephenson.dev showcase and now reports that it was used to trace, the same way apex and Kreatures do. A command-line run sends a startup event tagged with the version and an ideas-written event once the session's ideas are saved. Nothing about the user, the machine, the keywords or the ideas is sent. Reporting is on by default with a one-line first-run notice, and is turned off with "usage_reporting": {"enabled": false} in settings.json, TRACE_USAGE_REPORTING=off or DO_NOT_TRACK=1.

  • src/trace_client.py: trace-client-python 0.2.0 vendored from main, unmodified apart from the header note; it honours the environment opt-outs.
  • src/usage_reporting.py: settings block in settings.json at the repository root (written on first launch, with the notice), the shipped program key (keys identify a program and are not secrets, per trace's ADR 0001) and the startup event. The version is 0.1.0, the last release, since the repository has no version file.
  • src/collide.py: reporting starts only from the command line; main() called directly (as the tests do) reports nothing. ideas-written is sent after the file is written.
  • tests/: the client's own test suite plus tests for the settings block, the notice, the opt-outs, the event at a loopback stub, and the command-line path.
  • .github/workflows/tests.yml: the end-to-end run sets TRACE_USAGE_REPORTING=off so CI never reports; the new modules are compiled too.
  • .gitignore, README.md: settings.json is ignored; a ## Usage reporting section is added.

Verified: python3 -m unittest discover -s tests passes on Python 3.8 and 3.11. A real run with settings.json pointed at a loopback stub delivered startup (tag version) and ideas-written for Collide with the shipped key. One event tagged ci=true and verify=true was sent to production with the shipped key and was accepted with HTTP 201.

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

dmccoystephenson and others added 2 commits September 23, 2026 23:02
A command-line run now reports a startup event (tag version) and an
ideas-written event after the session's ideas are saved, through the
vendored trace-client-python 0.2.0. The program key ships in
src/usage_reporting.py and in the settings.json block written on first
launch, with a one-line notice. Opt out with usage_reporting.enabled:
false in settings.json, TRACE_USAGE_REPORTING=off or DO_NOT_TRACK=1.
Direct main() calls (the test suite) report nothing and the CI end-to-end
run sets TRACE_USAGE_REPORTING=off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012tRTngcEmZUaiHKcX2ErSS
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012tRTngcEmZUaiHKcX2ErSS
@dmccoystephenson
dmccoystephenson merged commit caddae1 into main Sep 24, 2026
2 checks passed
@dmccoystephenson
dmccoystephenson deleted the trace/wiring branch September 24, 2026 05:22
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