Skip to content

fix(observability): demote skill install 4xx fetches#4238

Merged
M3gA-Mind merged 6 commits into
tinyhumansai:mainfrom
YOMXXX:fix/GH-4175-skill-install-4xx
Jun 30, 2026
Merged

fix(observability): demote skill install 4xx fetches#4238
M3gA-Mind merged 6 commits into
tinyhumansai:mainfrom
YOMXXX:fix/GH-4175-skill-install-4xx

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stops reporting user/catalog SKILL.md fetch 4xx responses from skill install to Sentry.
  • Keeps the install RPC error intact so the UI/CLI still reports the failed URL fetch to the user.
  • Keeps 5xx server responses and transport failures reportable.
  • Adds a defense-in-depth Sentry before_send filter for skills.install_fetch 4xx events in both core and Tauri entrypoints.
  • Adds focused Rust and observability smoke coverage for 4xx drop / 5xx keep behavior.
  • Carries the current docs link-check fixes from fix(observability): demote MCP auth-required 401 #4237 so this PR can pass CI while that PR is still pending.

Problem

Solution

  • Adds should_report_install_fetch_status so skill install reports only non-success, non-client-error HTTP statuses.
  • Logs a debug breadcrumb when a client-error fetch status is intentionally skipped.
  • Adds is_skill_install_user_fetch_failure as a Sentry event-shape guard for any existing or future skills.install_fetch 4xx event.
  • Wires that guard into the core binary and Tauri shell before_send chains.
  • Updates stale localized README links and the Cursor cloud-agent docs link to their current targets.

Submission Checklist

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy
  • Diff coverage ≥ 80% — focused Rust tests cover the changed branches; CI remains the source of truth for the enforced diff-cover gate.
  • Coverage matrix updated — N/A: behavior-only observability noise reduction, no user-facing feature row added/removed/renamed.
  • All affected feature IDs from the matrix are listed in the PR description under ## Related — N/A: no coverage-matrix feature ID applies.
  • No new external network dependencies introduced (mock backend used per Testing Strategy)
  • Manual smoke checklist updated if this touches release-cut surfaces (docs/RELEASE-MANUAL-SMOKE.md) — N/A: observability filtering only.
  • Linked issue closed via Closes #NNN in the ## Related section

Impact

  • Runtime/platform: desktop core and Tauri Sentry filtering only.
  • User-visible effect: skill install still fails and returns the same error for 4xx fetches.
  • Observability effect: 4xx skill fetch failures are no longer captured as Sentry errors; 5xx and transport failures continue to be captured.
  • Security/migration: no credential or schema changes; reported URLs remain redacted.
  • Docs: localized README links are updated to the same current targets used by fix(observability): demote MCP auth-required 401 #4237.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/GH-4175-skill-install-4xx
  • Commit SHA: d41c8a6903f7bb6dc739528434f8dd3486df025b

Validation Run

  • pnpm --filter openhuman-app format:check — N/A: no app TS/CSS changes.
  • pnpm typecheck — N/A: no frontend TypeScript changes.
  • Focused tests:
    • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml --lib install_fetch_status_reporting_suppresses_client_errors_only
    • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml --lib skills_install_fetch_filter
    • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml --test observability_smoke skills_install
    • GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml --lib install_workflow_from_url
  • Rust fmt/check (if changed):
    • cargo fmt --manifest-path Cargo.toml --check
    • git diff --check
    • GGML_NATIVE=OFF cargo check --manifest-path Cargo.toml
  • Tauri fmt/check (if changed):
    • cargo fmt --manifest-path app/src-tauri/Cargo.toml --check
    • GGML_NATIVE=OFF cargo check --manifest-path app/src-tauri/Cargo.toml

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: N/A

Behavior Changes

  • Intended behavior change: skill install fetch 4xx responses are treated as user/catalog state for Sentry reporting.
  • User-visible effect: install failures still surface to the caller; only Sentry capture changes.

Parity Contract

  • Legacy behavior preserved: 5xx and transport failures remain reportable; RPC error behavior is unchanged.
  • Guard/fallback/dispatch parity checks: core binary and Tauri shell share the same observability filter.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): N/A
  • Canonical PR: This PR
  • Resolution (closed/superseded/updated): N/A

Summary by CodeRabbit

  • Bug Fixes

    • Reduced noisy telemetry for failed skill install fetches by suppressing expected client-side (4xx) responses while still reporting server-side (5xx) failures.
    • Kept user-facing install error messages unchanged.
  • Tests

    • Added/updated unit and smoke test coverage to verify the new reporting suppression and non-suppression behavior.
  • Documentation

    • Updated the Cursor Cloud Agents documentation link to the new destination.

@YOMXXX YOMXXX requested a review from a team June 28, 2026 15:54
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4b9a6704-d086-4436-b087-86374c47028a

📥 Commits

Reviewing files that changed from the base of the PR and between 5ede699 and 2049a59.

📒 Files selected for processing (2)
  • app/src-tauri/src/lib.rs
  • src/core/observability.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src-tauri/src/lib.rs
  • src/core/observability.rs

📝 Walkthrough

Walkthrough

Skill install fetch failures with 4xx HTTP status codes are now suppressed from Sentry reporting. A helper gates fetch-status observability in ops_install.rs, a classifier is added for skill install fetch events, and both runtime before_send filters use it. A documentation link is also updated.

Skill install 4xx Sentry suppression

Layer / File(s) Summary
Conditional fetch error reporting in ops_install
src/openhuman/workflows/ops_install.rs, src/openhuman/workflows/ops.rs, src/openhuman/workflows/ops_tests.rs
should_report_install_fetch_status returns true only for non-success, non-4xx statuses. The install workflow gates report_error on this helper and emits a debug log when skipped. Test re-export and unit test are included.
Sentry classifier and before_send wiring
src/core/observability.rs, src/main.rs, app/src-tauri/src/lib.rs, tests/observability_smoke.rs
is_skill_install_user_fetch_failure classifies domain=skills, operation=install_fetch, failure=non_2xx events with 4xx status for suppression. It is wired into both runtime before_send filters. Unit tests cover 4xx filtering and 5xx pass-through; smoke tests assert 404 is dropped and 500 is kept.

Documentation link update

Layer / File(s) Summary
Cursor Cloud Agents link update
docs/agent-workflows/cursor-cloud-agents.md
Reference URL updated from docs.cursor.com/agents/cloud to cursor.com/docs/cloud-agent.

Changes

Skill install 4xx Sentry suppression

Layer / File(s) Summary
Conditional fetch error reporting in ops_install
src/openhuman/workflows/ops_install.rs, src/openhuman/workflows/ops.rs, src/openhuman/workflows/ops_tests.rs
should_report_install_fetch_status returns true only for non-success, non-4xx statuses. The install workflow gates report_error on this helper and emits a debug log when skipped. Test re-export and unit test are included.
Sentry classifier and before_send wiring
src/core/observability.rs, src/main.rs, app/src-tauri/src/lib.rs, tests/observability_smoke.rs
is_skill_install_user_fetch_failure classifies domain=skills, operation=install_fetch, failure=non_2xx events with 4xx status for suppression. It is wired into both runtime before_send filters. Unit tests cover 4xx filtering and 5xx pass-through; smoke tests assert 404 is dropped and 500 is kept.

Documentation link update

Layer / File(s) Summary
Cursor Cloud Agents link update
docs/agent-workflows/cursor-cloud-agents.md
Reference URL updated from docs.cursor.com/agents/cloud to cursor.com/docs/cloud-agent.

Sequence Diagram(s)

sequenceDiagram
  participant ops_install
  participant observability
  participant tests
  ops_install->>ops_install: should_report_install_fetch_status(status)
  alt status is 5xx or non-client error
    ops_install->>observability: report_error(domain=skills, operation=install_fetch)
  else status is 2xx or 4xx
    ops_install->>ops_install: debug log, skip report
  end
  tests->>ops_install: assert helper behavior
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A 404 hopped away from the stack,
Sentry stayed quiet and did not look back.
Five-hundreds still glow when the fetch goes astray,
But skill-not-found whispers won’t page us today.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the main observability change.
Linked Issues check ✅ Passed The PR keeps the user-facing error, suppresses skill-install 4xx Sentry events in core and Tauri, and preserves 5xx reporting with tests.
Out of Scope Changes check ✅ Passed The docs link update is explicitly called out as CI support and stays within the stated PR scope.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added bug rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. sentry-traced-bug Bug identified via Sentry triage labels Jun 28, 2026
@coderabbitai coderabbitai Bot removed sentry-traced-bug Bug identified via Sentry triage bug labels Jun 28, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 28, 2026
YOMXXX and others added 2 commits June 29, 2026 00:38
- ops_install.rs: keep this PR's should_report_install_fetch_status helper +
  debug breadcrumb at the SKILL.md fetch emit site (functionally equivalent to
  main's inline !is_client_error() from tinyhumansai#4188, but the helper is re-exported,
  reused by this PR's tests, and pairs with the new before_send guard).
  Preserved main's TAURI-RUST-CGE rationale comment.
- docs/README.*.md (de/ja-JP/ko/ur-pk/zh-CN): take main's already-merged link
  fixes (Discussions link, canonical star-history) — this PR carried the same
  fixes from tinyhumansai#4237, now superseded on main.
@coderabbitai coderabbitai Bot removed the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Jun 30, 2026
@M3gA-Mind M3gA-Mind merged commit 4035345 into tinyhumansai:main Jun 30, 2026
19 checks passed
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.

Skill install: stop reporting 4xx fetch failures to Sentry (TAURI-RUST-CGE)

2 participants