Skip to content

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

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

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

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

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


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@mscolnick
Copy link
Contributor

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

@dmadisetti
Copy link
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
Collaborator

Yes unfortunately:
image

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.

marimo markdown tutorial produces app_config warnings

3 participants