Skip to content

A quoted enabled: "false" in the server-wide config does not turn reporting off #15

Open

Description

@dmccoystephenson

A quoted enabled: "false" (or 'false', "off", 'no') in plugins/trace/config.yml does not turn reporting off.

Where: src/main/java/software/stephenson/trace/TraceClient.java. ENABLED_LINE is ^\s*enabled\s*:\s*(\S+). parseServerWideConfig passes the captured group straight to isOff, which trims, lowercases, and compares against off, false, 0 and no. For enabled: "false" the captured group is "false", quotes included, so isOff returns false and the client stays enabled.

The tags: block already goes through scalar(), which strips double and single quotes. The server-id: line does too (server-id: "abc-123" is accepted, see installId_anExistingServerIdIsUsedAndAnUnusableOneIsIgnored). The enabled: line is the only line-reader path that does not.

Why it matters: this is the server-wide opt-out. Operators edit the file by hand, and ci: "true" sits a few lines below in the same file, so quoting the switch is a plausible edit. The result fails open: an operator who believes reporting is off for every plugin still has events sent. Strictly speaking, YAML reads "false" as a string rather than a boolean. But the README and the file's own comment ("Set enabled to false") describe the switch, not YAML typing.

Options for the maintainer (this touches the opt-out contract, so it needs a human decision):

  • run the enabled: value through scalar() before isOff, so quoted spellings disable, the same as for tags and server-id:; or
  • keep the current behaviour and document in the README "Opting out" table that the value must be unquoted.

A characterization test pinning the current behaviour (serverWideConfig_aQuotedFalseDoesNotDisableYet) is being added in a Stage B test-expansion PR.

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


drafted by Claude on behalf of Daniel Stephenson

Activity

  1. dmccoystephenson commented on Oct 18, 2026

    @dmccoystephenson
    MemberAuthor

    Reopened: this issue was closed automatically, not resolved. The body of PR #16 contained the phrase "should be flipped by whatever PR resolves #15", and GitHub reads "resolves #15" as a closing keyword, so the merge of #16 closed this issue.

    The behaviour described here is unchanged on main (2a2b483). parseServerWideConfig still passes the raw ENABLED_LINE capture to isOff, and the characterization test serverWideConfig_aQuotedFalseDoesNotDisableYet still asserts that a quoted enabled: "false" leaves reporting on. The maintainer decision this issue asks for is still open.

    This comment 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