Repository navigation
Send a random installation ID with usage reports (trace-client-python 0.4.0) - #218
Merged
Merged
Conversation
… 0.4.0) Re-vendors trace-client-python at 0.4.0 and passes it a per-installation ID: TRACE_INSTALL_ID when set, otherwise a trace-install-id file the client creates (only when reporting is on). The README says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ztkfamsbEqQfcu76me5SL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The vendored trace client is re-vendored at trace-client-python 0.4.0 (the released file, with the repo's existing vendoring note and import path kept; its upstream test suite is re-vendored with it). The program now passes a per-installation ID, so trace can count installations instead of raw events.
install, a random UUID. It is not derived from the machine, the user or an address; it only says "these events came from the same installation".trace-install-idin FishE's existing save directory (config.dataDirectory:data/, orFISHE_SAVE_DIR), next to theusage-reporting-notice-shownmarker — the program already keeps its state between runs there, so that is used instead of the generic user-data-dir convention. Like the marker, it is not read as a save slot bySaveFileManager. Deleting the file resets the ID. A server deployment that pointsFISHE_SAVE_DIRat a volume keeps its ID; an ephemeral one gets a new ID per container, which is acceptable. Setting the environment variableTRACE_INSTALL_ID(non-blank) sends that value instead, which lets an operator pin an ID.TRACE_USAGE_REPORTING=off,DO_NOT_TRACK=1) never creates, reads or sends it. The standaloneinstall_id_from_filehelper is not called.installIdPath(config)insrc/usageReporting.py;createClientpassesinstall_id=os.environ.get("TRACE_INSTALL_ID")andinstall_id_file=installIdPath(config). The first-run notice now mentions the ID, and the README's variable table gainsTRACE_INSTALL_ID.python -m pytest --verbose -vv --cov=src ...(the CI command, run here aspytest -q) passes locally on Python 3.12 with the pinned tak: 963 passed.tests/test_usageReporting.pynow expects theinstalltag onstartupandsave-loaded, and covers the file living in the save directory, not reading as a save slot, being reused across starts,TRACE_INSTALL_IDwinning, and no file under the FishE and environment opt-outs;tests/conftest.pyclearsTRACE_INSTALL_ID.localStorage.🤖 Generated with Claude Code
https://claude.ai/code/session_014ztkfamsbEqQfcu76me5SL
drafted by Claude on behalf of Daniel Stephenson