fix: anonymous usage statistics on by default, off with TR_EVER_STATS_ENABLED=false

Merged
EV
4d ago
+130-48

What

The anonymous usage statistics now load unless TR_EVER_STATS_ENABLED is exactly false:

TR_EVER_STATS_ENABLEDResult
unset or emptyon
trueon
falsemodule not loaded: no route, no timer, no request, no table row
anything else (FALSE, 0, off, garbage, ...)on, and one start log line names the value

Unchanged: the operator switch on the Ever Platform → Statistics page (stops every report without a restart), Reset instance identity, and the connection, which stays off unless TR_EVER_CONNECT_ENABLED is exactly true.

No test phones home

  • api scripts test, test:watch, test:e2e and the dev start set TR_EVER_STATS_ENABLED=false.
  • CircleCI test_unit / test_e2e and the ci workflow set it as job/workflow env.
  • ever-stats-off, ever-connect-off and ever-connect e2e suites set it before the configuration is read; ever-stats keeps setting true against its local fake.
  • The compose files get a commented opt-out line only (a stock install reports by default).

Tests

  • env.spec.ts: unset/empty ⇒ on without a warning; false ⇒ off; true ⇒ on; malformed ⇒ on with one warning naming the value.
  • app.module.ever-platform.spec.ts: default/empty/malformed/true ⇒ identity + statistics modules; false ⇒ none; false + connection on ⇒ identity + connection.

Docs (configuration.md, anonymous-usage-statistics.md, outbound-calls.md), .env.sample, the changelog and the Statistics page text describe the new default.

🤖 Generated with Claude Code


Summary by cubic

Anonymous usage statistics are now on by default and load unless TR_EVER_STATS_ENABLED is exactly false. Unset, empty, or malformed values (FALSE, 0, off, …) keep them on, with a malformed value named once in the start log, spaces and trailing dots included, so false or false. is seen not to be false. The operator switch on the Ever Platform page and Reset instance identity work as before, and the connection stays off unless TR_EVER_CONNECT_ENABLED is exactly true.

No test or CI run phones home: the api test scripts, CircleCI, and the ci workflow set TR_EVER_STATS_ENABLED=false, and the e2e suites that need the module off set it before the configuration is read. yarn start runs the API from source with the statistics off; yarn start:stats runs it with them on. Docs, .env.sample, compose files, and the changelog describe the new default, and the compose files now pass TR_EVER_STATS_ENABLED through, so false set in the shell or .env reaches the API.