Skip to content

feat(content): introduce typed content envelope#54

Merged
yordis merged 1 commit into
mainfrom
yordis/add-content
May 28, 2026
Merged

feat(content): introduce typed content envelope#54
yordis merged 1 commit into
mainfrom
yordis/add-content

Conversation

@yordis

@yordis yordis commented May 27, 2026

Copy link
Copy Markdown
Member
  • Domain messages that need an open-schema field today either reinvent a content_type + bytes pair, reach for google.protobuf.Any (which forces consumers to know the inner message), or smuggle JSON through string. A stable, named envelope keeps the contract explicit and avoids divergence across packages.
  • Namespaced as trogon.content.v1alpha1.Content so the package itself conveys context; the message is the noun that the field content_type classifies. Keeps the single-noun-package convention used by trogon.actor.Actor and trogon.uuid.Uuid.
  • Deliberately minimal — just content_type and data. No extensions/Any side channel until a concrete need shows up, to avoid an ungoverned escape hatch (what belongs there vs. headers vs. domain fields vs. event metadata is unanswered today).

Provide a stable home for "give me whatever" fields so domain messages do
not each reinvent a content-type/bytes pair or reach for google.protobuf.Any
when the schema is intentionally open.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor

cursor Bot commented May 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Additive proto-only change with no runtime or consumer wiring in this diff.

Overview
Introduces a shared trogon.content.v1alpha1.Content protobuf envelope so APIs can carry open or negotiated payloads without each package inventing its own content_type + bytes pair, abusing google.protobuf.Any, or overloading string for JSON.

The message is intentionally minimal: content_type (IANA media type per RFC 6838) and opaque data. Documentation steers callers toward explicit domain messages when the schema is fixed, and toward Content only when encoding is agreed out of band. The package follows the same v1alpha1 + elixirpb module-prefix pattern as other Trogon shared types (e.g. actor).

Reviewed by Cursor Bugbot for commit 90b7ec9. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yordis, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 6 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1cea55f2-7bcd-4c73-b85e-ca61e3270531

📥 Commits

Reviewing files that changed from the base of the PR and between ec5b15c and 90b7ec9.

📒 Files selected for processing (1)
  • proto/trogon/content/v1alpha1/content.proto
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/add-content

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 and usage tips.

@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 27, 2026, 10:54 PM

@yordis yordis merged commit 9b413b5 into main May 28, 2026
5 checks passed
@yordis yordis deleted the yordis/add-content branch May 28, 2026 00:37
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