You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
store_entity reports success for a page it never created #175
OSW.store_entity can return normally and list a page in created_pages when
that page does not exist on the wiki afterwards. The caller has no way to tell
a write that applied from one that did not.
# swallowed (store_entity_ only records created_pages on success).
"Success" there means only "no exception was raised". It does not mean the page
exists.
Reproduction
Measured three times on osl.dev.afin-data.de at commit 9aa6322:
Build a Person with surname set and no label.
osw.store_entity(...) returns normally and prints Entity stored at '<url>'. page.changed is True.
Clear the page cache, then get_page the same title: exists is False.
Special:AllPages does not list the page.
The same Person written with a label produces a page that exists. So the
failure depends on the payload, not on connectivity or permissions.
What the cause is not
The server-side reason is not identified. Ruled out by measurement:
Not the osw-python page cache. The read was done with the cache cleared.
Not replication lag. A re-read several minutes later still reported exists == False.
Not a swallowed exception. store_entity_ raised nothing.
A form or template driven creation step on the Person category is the
remaining suspicion, but I did not confirm it.
Why it is still a library defect
The library-side problem is independent of the server-side cause. Whatever makes
the write fail, store_entity should not report that page as created. Checking page.changed does not help here, because page.changed was True in the
failing case as well.
Suggested fix
Read the page back after the edit and record it in created_pages only if it
exists, or return the absent titles to the caller as failures. Also correct the
comment at src/osw/core.py:1925.
Activity