Refine keep_unmapped_properties + fix audit test URL drift - #212
Merged
Conversation
When keep_unmapped_properties is false, only drop properties that exist in the page's notion_data. Plugins can inject additional properties into page.properties (e.g. innolitics.github.io's website_components plugin embeds mentioned-page data under notion-id keys); those are deliberate and must survive the allowlist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwuTg4uAA3UCEeiNLqtpdC
Notion changed page URLs from www.notion.so/<slug> to app.notion.com/p/<slug>, breaking test_audit's hardcoded expectations (main's last green run predates the change). Assert on the stable slug#block-id fragment instead of the full URL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwuTg4uAA3UCEeiNLqtpdC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups to 0d760f0 (which I accidentally pushed straight to main — a
push.default = upstreamconfig plus the branch tracking origin/main sent it there, and branch protection blocks rewinding; apologies):Always keep plugin-injected properties in allowlist mode.
keep_unmapped_properties: falsenow only drops properties present in the page'snotion_data. Plugins can inject additional properties intopage.properties(e.g. innolitics.github.io'swebsite_componentsplugin embeds mentioned-page data under notion-id keys) and those must survive the allowlist. Without this, flipping the site's articles/services configs would have stripped the embedded mention data their templates render.Fix
test_audit(pre-existing CI failure, unrelated to the export change). Main's Test workflow hadn't run since May; since then Notion changed page URLs fromwww.notion.so/<slug>toapp.notion.com/p/<slug>, breaking the test's hardcoded URLs. Assertions now match the stableslug#block-idfragment. This is independent of the local audit error-handling work in your working copy — no overlap.flake8clean; export/config tests pass locally (24 passed). The end-to-end audit test needs the CI Notion token, so CI here is the real check.🤖 Generated with Claude Code
https://claude.ai/code/session_01EwuTg4uAA3UCEeiNLqtpdC