Skip to content

Leverage the exact schema from Reflect for a more precise mcap export.#797

Merged
gbin merged 35 commits into
masterfrom
gbin/schema_export
Feb 10, 2026
Merged

Leverage the exact schema from Reflect for a more precise mcap export.#797
gbin merged 35 commits into
masterfrom
gbin/schema_export

Conversation

@gbin

@gbin gbin commented Feb 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Related issues

  • Closes #

Changes

Testing

  • just std-ci
  • just lint
  • cargo +stable nextest run --workspace --all-targets
  • Other (please specify):

Checklist

  • I have updated docs or examples where needed
  • I have added or updated tests where needed
  • I have considered platform impact (Linux/macOS/Windows/embedded)
  • I have considered config/logging changes (if applicable)
  • This change is not a breaking change (or I documented it below)

Breaking changes (if any)

Additional context

@gbin gbin added enhancement New feature or request exclude from changelog labels Feb 9, 2026
@makeecat makeecat self-requested a review February 9, 2026 20:53
Base automatically changed from gbin/schema to master February 9, 2026 23:29
gbin added 4 commits February 9, 2026 19:53
# Conflicts:
#	core/cu29/src/lib.rs
#	core/cu29_runtime/src/debug.rs
@gbin gbin merged commit a4c9fb4 into master Feb 10, 2026
23 checks passed
@gbin gbin deleted the gbin/schema_export branch February 10, 2026 14:10
@makeecat

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4c9fb4e38

ℹ️ 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".

if let Some(type_info) = field.type_info()
&& let TypeInfo::Enum(enum_info) = type_info
{
return enum_info.variant("None").is_some() && enum_info.variant("Some").is_some();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict Option detection to real Option enums

The new optional-field heuristic treats any enum that has None and Some variants as an Option, which can silently generate incorrect schemas for normal domain enums. In those cases, schema_for_option_enum collapses the enum to null | <Some payload> and drops other variants, and struct fields using that enum are marked non-required, so emitted payloads can fail validation or be documented inaccurately.

Useful? React with 👍 / 👎.

Comment on lines +377 to +380
let metadata_channel_id = mcap_writer
.add_channel(
metadata_schema_id,
&format!("/{task_id}/__meta"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Count metadata channels in export statistics

Each task now registers an additional /{task_id}/__meta channel, but channels_created is still derived from one ChannelInfo entry per task, so the reported count underestimates the actual MCAP channel count by roughly 2x. This makes McapExportStats and CLI output misleading for monitoring or sanity checks that rely on channel totals.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants