Skip to content

fix(mcp): return outcome not_found from reports_action on unknown id - #1345

Open
tirthraj01 wants to merge 2 commits into
cameri:rewrite/mainfrom
tirthraj01:fix/1325-reports-action-not-found
Open

tirthraj01 wants to merge 2 commits into
cameri:rewrite/mainfrom
tirthraj01:fix/1325-reports-action-not-found

Conversation

@tirthraj01

Copy link
Copy Markdown
Collaborator

Fixes #1325

Summary

  • Return outcome: "not_found" (OUTCOME_NOT_FOUND) from act_on_report in crates/nostream-mcp/src/server.rs when no report carries the supplied event_id, matching sibling delete_event instead of returning a success-shaped empty list.
  • Document outcome: "not_found" in reports_action's tool description and update the tools/list snapshot in crates/nostream-mcp/tests/fixtures/tools_list.json.
  • Update crates/nostream-mcp/tests/write_tools.rs (an_unknown_report_answers_not_found) to assert outcome: "not_found" and verify the reply differs from a no-op flip (changed: 0 on an existing report).
  • Add .changeset/reports-action-not-found.md for rewrite/main.

Verification

  • cargo fmt --all --check
  • cargo clippy -p nostream-mcp --all-targets --all-features -- -D warnings
  • cargo clippy -p nostream-mcp --lib --bins --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used -D clippy::todo -D clippy::unimplemented -D clippy::panic
  • cargo test -p nostream-mcp --all-features --lib --test audit --test maintenance --test relay_status --test store_families --test tool_payloads --test tools_list --test write_tools

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6e7b9195-8ad5-4435-8bb5-2418141a4fd6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@changeset-bot

changeset-bot Bot commented Dec 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8655303

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@greptile-apps

greptile-apps Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] The PR appears safe to merge.

Summary

reports_action now returns outcome: "not_found" for an unknown report ID, distinguishing a missing report from an existing report that needed no change.

  • reports_action marks missing report IDs with not_found.

Reviews (2) · Last reviewed commit: "test(nostreamd): expect not_found for un..." · Reviewed by Greptile

greptile-apps[bot]
greptile-apps Bot previously approved these changes Dec 2, 2026
@greptile-apps
greptile-apps Bot dismissed their stale review December 2, 2026 12:19

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

This branch has not been deployed

No deployments
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