Skip to content

Filter markdown metadata keys from app config to fix warnings#8300

Closed
Mr-Neutr0n wants to merge 1 commit intomarimo-team:mainfrom
Mr-Neutr0n:fix/markdown-metadata-config-warnings
Closed

Filter markdown metadata keys from app config to fix warnings#8300
Mr-Neutr0n wants to merge 1 commit intomarimo-team:mainfrom
Mr-Neutr0n:fix/markdown-metadata-config-warnings

Conversation

@Mr-Neutr0n
Copy link
Copy Markdown
Contributor

Summary

Running marimo tutorial markdown-format produces spurious warnings about unrecognized keys (author, description, pyproject) in the app config. These are valid YAML frontmatter metadata keys that shouldn't be treated as app config entries.

The root cause is in app_config_from_root() which was forwarding all root element attributes into the app config dict. When _AppConfig.from_untrusted_dict() then receives these unknown keys, it logs a warning for each one.

Fix

Instead of passing all attributes through and then trying to remove specific ones, I changed app_config_from_root() to only include keys that are either:

  • Explicitly mapped frontmatter keys (e.g. titleapp_title)
  • Actual _AppConfig dataclass fields

This way, markdown-only metadata like author, description, pyproject, and marimo-version are silently filtered out before they ever reach the config parser. The metadata is still available on the root element for other code paths that need it (e.g. _tree_to_ir reads header and pyproject directly via root.get()).

Fixes #8259

Markdown frontmatter keys like author, description, and pyproject are
valid metadata but not recognized by _AppConfig. Previously these were
passed through to from_untrusted_dict which logged warnings for each
unrecognized key.

Instead of blindly forwarding all root element attributes, only include
keys that are either explicitly mapped (e.g. title -> app_title) or are
actual _AppConfig fields. This eliminates the spurious warnings when
running markdown notebooks like the markdown-format tutorial.

Fixes marimo-team#8259
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 13, 2026 2:24pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@mscolnick
Copy link
Copy Markdown
Contributor

Thanks for the contribution! looks like it conflicts with #8290, so ill defer to @dmadisetti on the approach

@dmadisetti
Copy link
Copy Markdown
Collaborator

I'm not sure this round trips, it should preserve the metadata on resave. Otherwise filtering it in one place is better

@dmadisetti
Copy link
Copy Markdown
Collaborator

Yes unfortunately:
image

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in 30 days. It will be closed in 14 days if no further activity occurs. If this PR is still relevant, please leave a comment or push new changes to keep it open. Thank you for your contribution!

@github-actions github-actions Bot added the stale label Mar 25, 2026
@dmadisetti
Copy link
Copy Markdown
Collaborator

Thanks! Looks like this got merged

@dmadisetti dmadisetti closed this Mar 25, 2026
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.

marimo markdown tutorial produces app_config warnings

3 participants