Skip to content

[Repo Assist] Fix docs: clarify why Tweet fields are inferred as optional in JsonProvider example#1607

Merged
dsyme merged 2 commits intomainfrom
repo-assist/fix-docs-jsonprovider-twitter-1073-cfc5303457c5f5c8
Feb 22, 2026
Merged

[Repo Assist] Fix docs: clarify why Tweet fields are inferred as optional in JsonProvider example#1607
dsyme merged 2 commits intomainfrom
repo-assist/fix-docs-jsonprovider-twitter-1073-cfc5303457c5f5c8

Conversation

@github-actions
Copy link
Contributor

🤖 Repo Assist here — I'm an automated AI assistant for this repository.

Closes #1073

Problem

The JsonProvider documentation for the Twitter stream example contained a misleading explanation:

"the tweet.User property has been inferred as optional (meaning that a tweet might not have an author?)"

This suggests the optional inference is because tweets can lack a User, which is incorrect. It also doesn't explain why RetweetCount and Text are optional.

Fix

Update the paragraph to explain the real reason: TwitterStream.json contains both tweet objects and other event types (e.g. delete events) with completely different schemas. When the type provider merges heterogeneous samples, any field absent from some samples is inferred as optional.

The updated text:

"The reason is that TwitterStream.json contains not only tweet objects but also other event types (such as delete events) with a completely different schema. When the type provider merges multiple heterogeneous sample objects, any field that does not appear in all samples is inferred as optional."

Test Status

  • Build passes (documentation-only change, no code changed)
  • Tests pass (no code changed)

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@b0296681ad309e6455276244363810b1e7d98335. View source at https://github.com/githubnext/agentics/tree/b0296681ad309e6455276244363810b1e7d98335/workflows/repo-assist.md.

…ovider Twitter example

The previous text said 'meaning that a tweet might not have an author?', which is
misleading. The real reason is that TwitterStream.json contains both tweet objects
and delete-event objects with different schemas; when the type provider merges
heterogeneous samples, fields absent from some samples are inferred as optional.

Closes #1073

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review February 22, 2026 09:02
@dsyme dsyme merged commit cd7a7a0 into main Feb 22, 2026
2 checks passed
@dsyme dsyme deleted the repo-assist/fix-docs-jsonprovider-twitter-1073-cfc5303457c5f5c8 branch February 22, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant