Skip to content

Capture anonymous plugin usage through shared boundaries - #5323

Closed
brsbl wants to merge 17 commits into
bb/turn-and-device-telemetry-thr_gqshddt6w2from
bb/browser-automation-telemetry-thr_gqshddt6w2
Closed

brsbl wants to merge 17 commits into
bb/turn-and-device-telemetry-thr_gqshddt6w2from
bb/browser-automation-telemetry-thr_gqshddt6w2

Conversation

@brsbl

@brsbl brsbl commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Plugin usage lacks consistent coverage across tools, commands, RPC actions, and panels.

What changed

  • Capture one feature_used event through shared invocation boundaries and explicit panel opens.
  • Derive five source categories from installation records without exporting plugin identifiers, names, or URLs.
  • Add optional RPC action classification and a shared background-work hook; document them in Plugin Guide.

How you verified

  • Remote CI passed at 40972c58.
  • Cumulative review covered the stack at 654570f7; no unresolved P0/P1 findings. P2 findings remain follow-ups.
  • Exact-head local capture verified action RPC and CLI capture, nested/query suppression, explicit panel opening, opt-out, schedule attribution, and local-install provenance.
  • Live useRpc actions count once but currently report unknown/api instead of person/web; this is a recorded P2 attribution follow-up.
  • Five-source classification and plugin tool coverage are in remote CI; the live pass used a local plugin installation.
  • Chrome for Testing 154.0.8037.92, 1440×900 at 2×: Plugin Guide navigation, detail open/close, and hard reload passed without observed console errors.
Other recorded P2 follow-ups
  • Plugin CLI capture currently includes help, invalid, and read-only commands.
  • Browser Automation's public action RPCs lack usage classification.
  • Source classification loads a full marketplace row per action.

Screenshots

Before: 41e9b51b0fa4545dbfd8eb5a1a8d6d0b027f79ea · After: 40972c5893b7dfdbbf427ea7b5673df9bd345c34 · 2× density, same fixture and light theme.

Plugin Guide state Before After
Backend capabilities, 1440×900 Before: existing backend capabilities After: anonymous capability usage card
New capability details, 1440×900 No corresponding detail existed on the parent revision; preceding surface shown above. After: anonymous capability usage details

Plugin Guide screenshots approved by brsbl for 40972c5893b7dfdbbf427ea7b5673df9bd345c34.

BB-Thread: Retention measurement

BB-Thread-ID: thr_gqshddt6w2

AGENT GENERATED

brsbl and others added 2 commits October 9, 2026 21:45
Browser Automation reports browser_session_started when a session opens,
with its surface (headless or desktop) and whether the app (user) or the
CLI agents use (agent) opened it. The server reports plugin_enabled when a
disabled plugin is turned on, using plugin_installed's rule that only
built-in and curated marketplace plugins carry an id, so install-on-request
built-ins that are enabled later are counted. Both respect the usage-data
opt-out; privacy copy, configuration docs, and the API audit entry list
them. Plugin SDK 0.6.42.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The app never opens sessions, so the old user/agent split described a
distinction the code could not make. The CLI now reports agent when it
runs inside a thread, as agents' shells do, user when it runs outside any
thread, and sdk for direct SDK or RPC calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T04:51:40.206095Z fa1efd1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@brsbl
brsbl added this pull request to stack #5232 October 10, 2026 04:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa1efd1a5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!setInstalledPluginEnabled(deps.db, id, enabled)) return undefined;
if (enabled && before && !before.enabled) {
deps.telemetry.capture(
pluginEnabledTelemetryEvent(id, provenanceForRow(before)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate telemetry identity before enabling the plugin

When a catalog row has provenance = "catalog" but a null catalogEntryId—a state the database schema permits—provenanceForRow(before) throws here after setInstalledPluginEnabled has already persisted enabled = true. The enable request then fails before loadOne, CLI-skill synchronization, and change notification, leaving the database enabled while the running service still treats the plugin as disabled; a restart can subsequently activate it despite the reported failure. Build and validate the telemetry event before the write, or prevent telemetry construction from interrupting the enable flow.

Useful? React with 👍 / 👎.

brsbl and others added 4 commits October 9, 2026 21:55
Re-enabling the plugin in that test now also reports plugin_enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Building the event can throw for a corrupt catalog row, after the enable
is already committed. The capture is now guarded and logged at debug, so
the plugin still loads and the change is still announced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brsbl
brsbl removed this pull request from stack #5232 October 12, 2026 21:28
@brsbl
brsbl added this pull request to stack #5398 October 12, 2026 21:28
@brsbl brsbl changed the title Report anonymous browser_session_started and plugin_enabled events Capture anonymous plugin usage through shared boundaries Oct 13, 2026
@brsbl

brsbl commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #5439 on main-based native stack #5440. The replacement preserves this implementation and review history, excluding the five Tips RPC classifications reserved for #4991. Final replacement CI is green at 207404a; local event-shape evidence and approved identical Plugin Guide screenshots are linked there. This PR is closed without merging; its branch and history remain.

@brsbl brsbl closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant