Repository navigation
fix(events): return populated event details - #234
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 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. Comment |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b02f489dee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| End: event.End, | ||
| Timezone: event.Timezone, | ||
| State: state, | ||
| Description: event.RawFields["description"], |
There was a problem hiding this comment.
Prevent raw event fields from exposing PII
When an event description contains an email address or phone number (for example, an RSVP contact), this forwards it verbatim into events.get output; the adjacent raw location, address, and custom-field projections have the same problem. That newly exposes data that the repository safety rule forbids, so keep these unstructured fields null or apply an approved redaction before encoding the success response.
AGENTS.md reference: AGENTS.md:L62-L64
Useful? React with 👍 / 👎.
| Location: event.RawFields["location"], | ||
| Address: event.RawFields["locationInfo"], | ||
| Visibility: event.RawFields["visibility"], | ||
| GuestLimit: event.RawFields["guestLimit"], |
There was a problem hiding this comment.
Project guest limits from
maxCapacity
getEventInfo represents an event capacity as maxCapacity (which decodeEventSafeguards already parses), not guestLimit. As a result, every capped event that follows the reviewed response shape is returned with guestLimit: null even though the newly advertised schema promises its populated value; derive this field from event.Safeguards.MaxCapacity while preserving absent/null semantics.
Useful? React with 👍 / 👎.
| Description: event.RawFields["description"], | ||
| Location: event.RawFields["location"], | ||
| Address: event.RawFields["locationInfo"], | ||
| Visibility: event.RawFields["visibility"], | ||
| GuestLimit: event.RawFields["guestLimit"], |
There was a problem hiding this comment.
Validate raw values against the advertised schema
These values are emitted as unchecked json.RawMessage, so a received description: 1, locationInfo: "text", or customFields: {} produces a successful response that violates the new success schema rather than contract.protocol_changed. Only image receives a shape check in decodeEventInfo; decode and validate each projected nullable field before building the success envelope to preserve the documented malformed-property failure boundary.
Useful? React with 👍 / 👎.
Summary
Verification
Fixes #232