Skip to content

README Opting out table says build() creates the server-wide file even when the environment has opted out #34

Closed

Description

@dmccoystephenson

The server-wide row of the README "Opting out" table says that build() creates plugins/trace/config.yml with enabled: true if it is missing. That is not true when an environment variable has already opted out: in that case the file is neither read nor created.

Where: src/main/java/software/stephenson/trace/TraceClient.java, the TraceClient(Builder) constructor:

ServerWideConfig serverWide = builder.pluginsDirectory == null || environmentDisables()
        ? ServerWideConfig.NONE
        : readServerWideConfig(builder.pluginsDirectory);

readServerWideConfig is the only place that creates the file, so with TRACE_USAGE_REPORTING=off or DO_NOT_TRACK=1 set, build() touches nothing on disk. The test installId_aDisabledClientNeitherGeneratesNorWritesOne already pins this ("an environment opt-out touches nothing on disk").

README text (server-wide row): "build() creates the file with enabled: true (and a commented-out tags: example) if it is missing; afterwards the only change it ever makes is appending a server-id: line when an enabled client finds none."

Suggested wording: append to that row something like "When the environment has already opted out, the file is neither read nor created."

The behaviour is the privacy-friendlier one, and the code does not need to change. Only the README wording does. The Builder.serverWideConfig Javadoc and the readServerWideConfig Javadoc were corrected in the Stage A documentation sweep PR from the same session. The README row was left out of that PR because the "Opting out" section is user-facing disclosure wording and needs the maintainer's approval.

This issue was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions