Skip to content

fix(capabilities): accept authored mentions outside provider settings - #474

Merged
rodrgds merged 3 commits into
getopenpost:mainfrom
aramirezj:fix/bluesky-thread-cleared-mentions-validation
Oct 26, 2026
Merged

rodrgds merged 3 commits into
getopenpost:mainfrom
aramirezj:fix/bluesky-thread-cleared-mentions-validation

Conversation

@aramirezj

@aramirezj aramirezj commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #475. Clearing a mention left settings.mentions behind, which the provider-settings validator rejected. The same failure affected Mastodon, LinkedIn, and other destinations, not only Bluesky threads.

 capability validation
-  reject authored mentions as an unknown provider setting
+  leave authored mentions to the dedicated mention validator

Retains the contributor's shared fix. Expands regression coverage to all provider/profile catalogue entries and the persisted HTTP validation path for Bluesky, Mastodon, LinkedIn, and X. Valid selections pass; cross-network selections and wrong Mastodon authorities remain invalid. Updates the release note to reflect that scope.

Evidence

  • Before: Removing the mention exemption reproduces unsupported_setting in 78 capability cases across all 18 catalogued providers, including the test provider, and the HTTP regression.
  • After: Focused regressions pass with the exemption restored. Full backend tests, backend lint, and the changed-file gate are checked locally before pushing.
  • Provider delivery already has independent tests for Bluesky stable DIDs, LinkedIn native markup, Mastodon address revalidation, and whole-thread preflight before writes. No live social-network publication is implied.

Merge Danger

Door: Two-way. No schema or API changes.

Blast Radius: Validation. Authored mention metadata bypasses only the provider-settings catalogue check; dedicated identity validation and rejection of unsupported provider settings remain in place.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed publication validation incorrectly rejecting mention metadata as an unsupported setting, including when selected mentions have been cleared.
    • Selected mentions continue to be checked for a matching network and, where applicable, account authority.

Bluesky threads failed validation with "mentions is not supported" after
clearing selected mentions because empty mention metadata still serializes
as an object and is not part of the provider settings catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 288da4ff-2395-45b3-9fdb-df8957854dad
Commits

Reviewing files that changed from the base of the PR and between 8f7da01 and df8d4d5.

Files selected for processing: 3
  • apps/server/internal/api/handlers/publication_mentions_test.go
  • apps/server/internal/capabilities/capabilities_test.go
  • changes/bluesky-thread-mentions-validation.md
Files skipped from review as they are similar to previous changes: 1
  • changes/bluesky-thread-mentions-validation.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The unsupported-settings check now skips the mentions key, including when its value is empty. Tests cover cleared and selected mention metadata, plus invalid mention targets across Bluesky, Mastodon, LinkedIn, and X.

Changes: Bluesky mention validation

Layer / File(s) Summary
Accept authored mentions
apps/server/internal/capabilities/capabilities.go, apps/server/internal/capabilities/capabilities_test.go, apps/server/internal/api/handlers/publication_mentions_test.go, changes/bluesky-thread-mentions-validation.md
The unsupported-settings check skips mentions, including empty metadata. Tests cover cleared mentions and selected targets, and verify that wrong-network, wrong-authority, and selected X mentions produce invalid-choice issues rather than unsupported-setting issues. The release note describes the validation behavior.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

Suggested reviewers: rodrgds

Merge Risk: Minimal · up to df8d4

The change appears ready to merge after normal checks. Cleared mentions are no longer treated as unsupported settings, and the tests cover valid and invalid mention selections.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 3 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: allowing authored mentions outside provider settings.
Linked Issues check Passed Issue #475 requires validation to accept an explicit empty authored mentions object and to route authored mentions through the dedicated mention validator. validateUnsupportedSettings now exempts `m…
Out of Scope Changes check Passed The changed source implements the #475 validation fix. The added capability and HTTP tests verify the required behavior and preserved rejection cases. The release note documents the same validation sc…
Full details: Linked Issues check

Explanation

Issue #475 requires validation to accept an explicit empty authored mentions object and to route authored mentions through the dedicated mention validator. validateUnsupportedSettings now exempts mentions while retaining unsupported-setting checks. Tests cover cleared mentions across the capability catalogue and the persisted HTTP validation path for Bluesky, Mastodon, LinkedIn, and X. The HTTP test also verifies rejection of wrong-network and wrong-authority selections.

Full details: Out of Scope Changes check

Explanation

The changed source implements the #475 validation fix. The added capability and HTTP tests verify the required behavior and preserved rejection cases. The release note documents the same validation scope. No unrelated production behavior or unrelated feature is demonstrated.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 3 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • 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

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

aramirezj and others added 2 commits October 26, 2026 16:32
Satisfy CodeRabbit docstring coverage on the functions touched by the
cleared-mentions unsupported-setting fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rodrgds
rodrgds merged commit 06ab8ba into getopenpost:main Oct 26, 2026
73 of 77 checks passed
@rodrgds

rodrgds commented Oct 26, 2026

Copy link
Copy Markdown
Member

tysm for the PR and issue!

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.

Bluesky threads reject cleared mentions as unsupported setting

2 participants