Repository navigation
fix(notion): emit usable page, database and entry ids from the listing tools - #13863
Conversation
format_page_info printed each page id as the first 20 characters
followed by "...". Notion page ids are 36 character dashed UUIDs, so
every id that search and list_pages handed back was cut short, and
get_page, update_page and append_content, which send page_id verbatim
to /pages/{id} and /blocks/{id}/children, could not find the page.
Print the full id, the same way get_page and create_page already do,
and extend the hermetic suite so every id printed by search and
list_pages round trips through get_page, update_page and append_content
against a requests double that only resolves the complete id.
Verification:
python3 plugins/omi-notion-app/test_main.py
22 tests OK on this commit
2 new tests failing against the unchanged main.py
Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NTjKj3PbjJ6d315JjoTjUE
format_database_info and query_database cut ids the same way
format_page_info did. list_databases is the documented way to find a
database_id for query_database and create_page, and query_database
entries are pages whose ids feed get_page and update_page, so the same
read and modify flows were broken for databases.
Print the full ids and extend the round trip test: the id printed by
list_databases is accepted by query_database and create_page, and the
entry ids query_database prints are complete page ids.
Verification:
python3 plugins/omi-notion-app/test_main.py
23 tests OK on this commit
the new test fails against the previous commit
Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NTjKj3PbjJ6d315JjoTjUE
There was a problem hiding this comment.
All reported issues were addressed
You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Review note: index() on a url without /v1 would raise instead of failing
the assertion with the recorded calls. Match method and suffix directly.
Verification:
python3 plugins/omi-notion-app/test_main.py
23 tests OK
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NTjKj3PbjJ6d315JjoTjUE
|
Thanks @lukiod — this is a real usability bug and a clean fix. What I verified on 3f6162a:
No CI checks have reported on this PR yet; the suite is registered in Since this is a first contribution from this account, leaving the final merge sign-off to a maintainer — the change itself looks correct, minimal, and well tested. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
PR: #14099 AUTO (AI Agent). |
kodjima33
left a comment
There was a problem hiding this comment.
Fixes truncated Notion page/database/entry ids breaking get/update/append round-trip; well-tested. Confidence 5/5.
Summary
format_page_infoinplugins/omi-notion-app/main.pyprinted each page id aspage_id[:20] + "...". Notion page ids are 36 character dashed UUIDs (Page object,id), so every id thatsearchandlist_pageshanded back was cut to59833787-2cf9-4fdf-8.get_page,update_pageandappend_contentsendpage_idverbatim to/pages/{id}and/blocks/{id}/children, so reading, retitling, archiving or appending to a page found through chat all ended in an object not found error.format_database_infoandquery_databasecut ids the same way, solist_databases(the documented way to find adatabase_idforquery_databaseandcreate_page) and the entry idsquery_databaseprints were unusable too.Two commits: page ids from
search/list_pages, then database and entry ids fromlist_databases/query_database. Each prints the complete id, matching whatget_pageandcreate_pagealready do.Regression tests
ListedPageIdTestsin the existing hermetic suiteplugins/omi-notion-app/test_main.py(already registered asnotion-page-content-testsin.github/checks-manifest.yaml) asserts thatsearchandlist_pagesprint the complete id, that the id round trips throughget_page,update_pageandappend_contentagainst arequestsdouble that only resolves the complete id, that the 20 character prefix the old output produced is not a page, and that the id printed bylist_databasesis accepted byquery_databaseandcreate_pagewithquery_databaseprinting complete entry ids. No network, credentials or third party packages.Verification
I could not exercise this against a live Notion workspace; the user facing path is covered by the hermetic round trip above, which drives the actual handlers.
Same defect class as #13861 (Google Calendar plugin), kept as a separate PR because the plugins are independent surfaces.
Product invariants affected
none
Fixes #13862
Failure-Class: none