carlos / platform Public

Analytics on-ramp: account default read through the settings page's Resolve; AN-C42 Luna brief

accountAnalyticsDefault now uses telemetry.Resolve with an empty app name,
the read handleAccountSettings already makes, so the census sees no new unit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev fede93e0fd85703ab48786311217687cbf800387 parent dddebe3
2 files changed, +29 −9
  • docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP-C42.md +24 −0
  • internal/console/analyticsonramp.go +5 −9
diff --git a/docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP-C42.md b/docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP-C42.md
new file mode 100644
index 000000000..48d25e139
--- /dev/null
+++ b/docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP-C42.md
@@ -0,0 +1,24 @@
+# Copy review brief: analytics on-ramp, AN-C42 alone (delegated by Paul, 2026-10-26)
+
+Paul delegated copy review for plan copy to you. You are the copy editor; your
+edit will be applied as approved copy. This is a one-row pass: the rest of the
+deck was reviewed in round 1 (`LUNA-COPY-REVIEW-ANALYTICS-ONRAMP.md`).
+
+Read `docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP.md` for what the
+change is and the house rules; all of them bind here. Then read row AN-C42 in
+`docs/superpowers/plans/2026-10-26-analytics-onramp-copy.md`, and the text
+around it in `analytics_cmd.go` (`analyticsUsage`, the `carlos analytics
+--help` text).
+
+AN-C42 replaces "Off until you turn it on." in that help text, which is no
+longer true now that new accounts start with analytics on. The drafted text is
+AN-C40's approved first sentence. It must stay true for existing accounts too
+(they keep whatever they had, which for most is off). It may say how to turn
+analytics on or off with this command (`--set-count edge` or `--set-count off`)
+if that helps; keep the flag exactly.
+
+## Output
+
+1. If you change it: a one-row table `ID | current | new | why`. If not, the
+ line "AN-C42: KEEP".
+2. Flags: `AN-C42 | problem`, or "Flagged rows: none."
diff --git a/internal/console/analyticsonramp.go b/internal/console/analyticsonramp.go
index a67db6203..5727fed17 100644
--- a/internal/console/analyticsonramp.go
+++ b/internal/console/analyticsonramp.go
@@ -35,16 +35,12 @@ func newAppAnalyticsSaveFailedFlash(app string) string {
// accountAnalyticsDefault is what an app without its own setting resolves
// to in this account: the account object folded over the built-in default.
-// No deployment bucket resolves to the built-in default, as Resolve does.
+// It is the account settings page's own read (handleAccountSettings):
+// Resolve with an EMPTY app name, whose app key no app ever writes, so only
+// the account level and the default contribute. No deployment bucket
+// resolves to the built-in default.
func (s *Server) accountAnalyticsDefault(ctx context.Context, sqid string) (telemetry.Resolved, error) {
- if s.cfg.Releases == nil {
- return telemetry.Fold(telemetry.Settings{}, telemetry.Settings{}), nil
- }
- st, _, err := telemetry.Read(ctx, s.cfg.Releases, telemetry.AccountKey(sqid))
- if err != nil {
- return telemetry.Fold(telemetry.Settings{}, telemetry.Settings{}), err
- }
- return telemetry.Fold(st, telemetry.Settings{}), nil
+ return telemetry.Resolve(ctx, s.cfg.Releases, sqid, "")
}
// checkNewAppAnalytics runs before the claim. choice is "" (follow the