Skip to content

Add marketplace feed telemetry#96194

Merged
vincentkoc merged 1 commit into
mainfrom
feeds-hosted-catalog-marketplace-telemetry
Jun 28, 2026
Merged

Add marketplace feed telemetry#96194
vincentkoc merged 1 commit into
mainfrom
feeds-hosted-catalog-marketplace-telemetry

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Stack position

This is PR9 in the hosted marketplace feed implementation stack. The lower stack is now merged through #96158, so this PR is restacked directly on main and contains only the telemetry slice.

What this PR does

  • Emits opt-in diagnostics timeline marks for openclaw plugins marketplace refresh.
  • Emits opt-in diagnostics timeline marks for openclaw plugins marketplace entries.
  • Records bounded feed lifecycle attributes: command, source mode, entry count, URL override presence, expected checksum presence, offline mode, feed-id presence, feed sequence, HTTP status, HTTP validator presence, snapshot use, pinned-refresh failure, and coarse fallback category.
  • Avoids emitting raw feed URLs, URL hosts, profile names, feed ids, payload checksums, URL credentials, query strings, fragments, and override token values in diagnostics timeline attributes.
  • Adds focused tests proving diagnostics are emitted and that host/id/checksum/profile-like values and raw URL secrets are not written into timeline events.

Validation

Prepared head: be9ce48da0 rebased onto current main after #96158 merged. The live PR diff is limited to three CLI telemetry files.

  • pnpm exec oxfmt --check src/cli/plugins-cli.runtime.ts src/cli/plugins-cli.marketplace-refresh.test.ts src/cli/plugins-cli.marketplace-entries.test.ts
  • pnpm exec oxlint --deny-warnings src/cli/plugins-cli.runtime.ts src/cli/plugins-cli.marketplace-refresh.test.ts src/cli/plugins-cli.marketplace-entries.test.ts
  • $env:CI='1'; node scripts/test-projects.mjs src/cli/plugins-cli.marketplace-refresh.test.ts src/cli/plugins-cli.marketplace-entries.test.ts
  • git diff --check
  • codex review --base origin/main

Focused CLI tests and lint passed for the touched files. Codex review on be9ce48da0 reported no actionable regressions and noted that the event attributes are bounded and avoid raw URLs/checksums while preserving existing command behavior.

Earlier pnpm tsgo:core was attempted from this worktree but failed in unrelated src/acp/** imports from @agentclientprotocol/sdk; the PR diff does not touch ACP or dependencies.

Real Behavior Proof

Behavior tested locally: offline marketplace entries command emits a diagnostics timeline event when diagnostics are enabled, without fetching the hosted feed.

Real environment: Windows checkout C:\src\openclaw-prflow\.worktrees\pr-96194, isolated OPENCLAW_HOME=%TEMP%\openclaw-pr96194-proof, source runtime via node --import tsx.

Command shape:

$env:OPENCLAW_DIAGNOSTICS='1'
$env:OPENCLAW_DIAGNOSTICS_TIMELINE_PATH='<proof>\timeline.jsonl'
node --import tsx -e "const runtime = await import('./src/cli/plugins-cli.runtime.ts'); await runtime.runPluginMarketplaceEntriesCommand({ offline: true, json: true });"

Observed timeline event:

{
  "schemaVersion": "openclaw.diagnostics.v1",
  "type": "mark",
  "name": "plugins.marketplace.feed.entries",
  "phase": "plugin-marketplace",
  "attributes": {
    "command": "entries",
    "entries": 74,
    "source": "bundled-fallback",
    "offline": true,
    "fallbackCategory": "offline"
  }
}

What was not tested: this proof uses offline bundled fallback mode, not a fresh hosted request. Fresh hosted refresh and entries behavior is covered by the predecessor command PRs; this PR's focused tests cover hosted telemetry attributes and redaction boundaries.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: M maintainer Maintainer-authored PR labels Jun 23, 2026
@giodl73-repo
giodl73-repo force-pushed the feeds-hosted-catalog-marketplace-telemetry branch from 1985e1c to 18b7747 Compare June 23, 2026 20:43
@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 28, 2026, 6:19 PM ET / 22:19 UTC.

Summary
The branch adds opt-in diagnostics timeline events for the marketplace refresh and entries CLI commands, plus tests for bounded attributes and redaction.

PR surface: Source +108, Tests +168. Total +276 across 3 files.

Reproducibility: not applicable. This PR adds observability behavior rather than fixing a current-main bug. The PR body provides after-change live output for the offline entries timeline mark, and focused tests cover hosted attributes and redaction boundaries.

Review metrics: 1 noteworthy metric.

  • Telemetry event surface: 2 event names, 16 possible attributes. The new diagnostics event contract is the maintainer-visible surface that needs sensitivity and cardinality review before merge.

Stored data model
Persistent data-model change detected: serialized state: src/cli/plugins-cli.marketplace-entries.test.ts, serialized state: src/cli/plugins-cli.marketplace-refresh.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: canonical
Canonical: #96194
Summary: This PR is the active telemetry slice in the hosted marketplace feed stack; the related same-repo PRs are merged prerequisites rather than duplicate replacements.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Have a maintainer accept the telemetry field set or request a narrowed attribute set before merge.

Risk before merge

  • [P2] The new opt-in diagnostics event contract exposes source mode, entry count, HTTP status, feed sequence, snapshot use, fallback category, and presence booleans; CI cannot decide whether that field set is the desired maintainer telemetry contract.
  • [P1] The protected maintainer label requires explicit maintainer handling even though no concrete code defect was found.
  • [P1] Real behavior proof covers the offline entries telemetry path; hosted refresh telemetry and redaction boundaries are covered by focused tests rather than a live hosted command run.

Maintainer options:

  1. Accept the telemetry contract (recommended)
    A maintainer can approve the current opt-in diagnostics field set as acceptable for local timeline artifacts before merge.
  2. Trim the field set first
    If feed sequence, HTTP status, fallback category, or presence booleans are too sensitive or high-cardinality, narrow the attributes while keeping the diagnostics timeline seam.
  3. Pause for observability policy
    If marketplace feed telemetry policy still needs RFC or product calibration, keep the PR open until the desired contract is explicit.

Next step before merge

  • [P2] Manual review is required because the PR has a protected maintainer label and defines a new diagnostics telemetry contract; there is no narrow automated repair to queue.

Security
Cleared: No concrete security or supply-chain issue found; the diff adds no dependencies or workflows and tests omission of raw feed URL secrets from telemetry.

Review details

Best possible solution:

Land after maintainer acceptance of the exact telemetry attribute contract, or trim sensitive or high-cardinality attributes before merge.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this PR adds observability behavior rather than fixing a current-main bug. The PR body provides after-change live output for the offline entries timeline mark, and focused tests cover hosted attributes and redaction boundaries.

Is this the best way to solve the issue?

Yes, the existing opt-in diagnostics timeline writer is the narrowest maintainable seam for this telemetry. The remaining question is maintainer acceptance of the exact attribute contract, not a concrete implementation defect.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a54206f0f5d1.

Label changes

Label justifications:

  • P2: Marketplace feed telemetry is a bounded CLI observability feature with limited blast radius but normal maintainer-review priority.
  • merge-risk: 🚨 other: Merging creates a new opt-in diagnostics telemetry contract whose field sensitivity and cardinality are not settled by CI alone.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes live source-runtime output showing the offline entries command writing the new diagnostics timeline mark; hosted refresh attributes and redaction are covered by focused tests.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes live source-runtime output showing the offline entries command writing the new diagnostics timeline mark; hosted refresh attributes and redaction are covered by focused tests.
Evidence reviewed

PR surface:

Source +108, Tests +168. Total +276 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 108 0 +108
Tests 2 170 2 +168
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 278 2 +276

What I checked:

  • Repository policy applied: Root AGENTS.md was read fully from disk; its protected-label, best-fix, and diagnostics/telemetry sensitivity guidance applies, and there is no scoped src/cli AGENTS.md for the touched files. (AGENTS.md:26, a54206f0f5d1)
  • Live PR state: GitHub reports this PR open, not draft, mergeable, based on current main a54206f0f5d113c4294878cc5654ee327a406355, with labels including maintainer, proof: sufficient, P2, and merge-risk: 🚨 other. (be9ce48da098)
  • Not already on main: Current main has the marketplace refresh and entries commands but no plugins.marketplace.feed.* event names or emitMarketplaceFeedTelemetry helper, so the PR is not superseded by main. (src/cli/plugins-cli.runtime.ts:616, a54206f0f5d1)
  • PR implementation: The PR adds emitMarketplaceFeedTelemetry, emits plugins.marketplace.feed.entries and plugins.marketplace.feed.refresh, and records primitive bounded attributes and presence booleans rather than raw feed values. (src/cli/plugins-cli.runtime.ts:522, be9ce48da098)
  • Redaction coverage: The new tests assert that raw feed URL hosts, credentials, query strings, override tokens, feed ids, and checksums are not serialized into the telemetry event JSON. (src/cli/plugins-cli.marketplace-refresh.test.ts:265, be9ce48da098)
  • Diagnostics timeline contract: The existing diagnostics timeline writer is opt-in through diagnostics flags plus OPENCLAW_DIAGNOSTICS_TIMELINE_PATH, normalizes attributes to primitive values, and appends best-effort JSONL records. (src/infra/diagnostics-timeline.ts:96, a54206f0f5d1)

Likely related people:

  • giodl73-repo: Authored the merged marketplace refresh and entries command work that this telemetry instruments, and carried the hosted marketplace feed stack immediately preceding this PR. (role: recent area contributor; confidence: high; commits: 102a65477e8d, 9bb004359ee5, 70e0fd4d8b91; files: src/cli/plugins-cli.runtime.ts, src/cli/plugins-cli.marketplace-refresh.test.ts, src/cli/plugins-cli.marketplace-entries.test.ts)
  • ly-wang19: Current blame on the diagnostics timeline writer used by this PR points to this contributor, though the grafted checkout history makes exact ownership lower confidence. (role: adjacent diagnostics contributor; confidence: low; commits: eff68d2c7714; files: src/infra/diagnostics-timeline.ts, src/cli/plugins-cli.runtime.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 24, 2026
@giodl73-repo
giodl73-repo force-pushed the feeds-hosted-catalog-marketplace-entries branch 5 times, most recently from bedf630 to 5bcb4a4 Compare June 26, 2026 05:27
@giodl73-repo
giodl73-repo force-pushed the feeds-hosted-catalog-marketplace-entries branch 4 times, most recently from fd69293 to 1289a25 Compare June 28, 2026 20:55
Base automatically changed from feeds-hosted-catalog-marketplace-entries to main June 28, 2026 21:11
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts and removed size: M labels Jun 28, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 28, 2026
@giodl73-repo
giodl73-repo marked this pull request as ready for review June 28, 2026 21:39
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 28, 2026
@giodl73-repo
giodl73-repo force-pushed the feeds-hosted-catalog-marketplace-telemetry branch from e301341 to be9ce48 Compare June 28, 2026 22:10
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Maintainer acceptance for the telemetry event contract on current head be9ce48da0:

I accept the narrowed diagnostics timeline field set for this staged marketplace telemetry PR. The contract is limited to bounded operational fields for plugins.marketplace.feed.refresh and plugins.marketplace.feed.entries: command/source mode, entry count, feed sequence, HTTP status, validator presence, snapshot/offline/pinned/fallback state, and presence booleans such as feedProfileProvided, feedIdPresent, and payloadChecksumPresent.

This acceptance depends on the current redaction boundary: diagnostics must not emit raw feed URLs, URL hosts, profile names, feed ids, payload checksums, URL credentials, query strings, fragments, or override token values. Broader or higher-cardinality feed telemetry should come through a follow-up with explicit maintainer review.

@vincentkoc
vincentkoc merged commit 9c5ee46 into main Jun 28, 2026
100 checks passed
@vincentkoc
vincentkoc deleted the feeds-hosted-catalog-marketplace-telemetry branch June 28, 2026 22:44
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 29, 2026
QiuYuang pushed a commit to QiuYuang/openclaw that referenced this pull request Jul 1, 2026
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 1, 2026
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants