Repository navigation
[Bug] --dump-config shows telemetry enabled when DSH_TELEMETRY_DISABLED is set (0.2.1-rc.2) #10604
Replies: 1 comment
|
Confirmed, and the divergence is structural rather than a rendering bug: the boot path applies the switch, the dump path has no access to it. Booting passes the environment value into composition: // apps/cli/src/profile-boot.ts:321
overlays: composed.overlays, telemetryDisabledEnv: process.env.DSH_TELEMETRY_DISABLED,
That matches what you see: the dump shows the composition before the telemetry decision, and the boot shows it after. Neither is wrong about its own input; they are two different compositions being printed with the same label. The fix is small: pass Worth adding to the report: because the switch is applied as a layer, any other environment-driven layer added later will diverge the same way. If the dump is meant to be a faithful preview, the switch logic should live in one place that both entry points call, not in the boot-only path. |
Uh oh!
There was an error while loading. Please reload this page.
--dump-configprints thesession-telemetry-otelrow as enabled whenDSH_TELEMETRY_DISABLEDis set. A boot of the same command line disables that row, so the dump shows a composition the launcher never mounts.Environment
dsh --version: 0.2.1-rc.2), Linux x64, Node 22.22.3, freshDSH_HOMESteps
With the installed package:
DSH_TELEMETRY_DISABLED=1 dsh --profile web --dump-config.--dump-default-configbehaves the same.Current behavior
The telemetry row is printed with no
disabled: true:Expected behavior
dsh -hdescribes--dump-configas "print the composed profile tree and exit". Boot composes the bundle, profile, home, and--patchlayers and then appends the telemetry opt-out patch last:readProfilePatches(packages/boot/app-boot/src/profile-context.ts:74-85) is passed tobootby the launcher (apps/cli/src/profile-boot.ts:321-323), andapps/cli/tests/resolved-profile-boot.spec.tsalready asserts the composed row ends up disabled. The reference README documents "any non-emptyDSH_TELEMETRY_DISABLEDdisables its row" (apps/cli/reference/README.md). The dump collects the same layer stack, so with the variable set it should print the row withdisabled: trueunder aDSH_TELEMETRY_DISABLEDpatch comment, and print nothing extra when the variable is unset.--dump-configis the natural way to check that the opt-out took effect, and today it reports the opposite of what boots.Root cause and suggested fix
collectConfigDumpLayers(apps/cli/src/dump-config.ts:51-75) returns the file-backed layers only. The minimal fix appends, after the overlay loop, the same patch boot appends:I verified this locally: with those lines the row prints
disabled: truein both dump modes, output is unchanged when the variable is unset, a regression spec overcollectConfigDumpLayersfails on master and passes with the change, the neighboring CLI specs (7 files, 125 tests) stay green, andpnpm run typecheckpasses.All reactions