Skip to content

0.143.0: a share is refused when a file it must read cannot be held - #42

Merged
tmoosting merged 1 commit into
mainfrom
outside-numbers
Nov 23, 2026
Merged

tmoosting merged 1 commit into
mainfrom
outside-numbers

Conversation

@tmoosting

Copy link
Copy Markdown
Member

0.142.0 made the package's reader of outside text refuse a file nested more than 200 deep. The world file writer took that refusal for "this file is no element", so a hidden element in such a file travelled in a share (include_hidden=False) with its author fields. 0.141.0 left it out. An integer of more than 4,300 digits had the same effect in every earlier version.

The writer now raises ValueError naming the file, and writes nothing, whenever it would have had to read a file the reader refuses: to leave out the hidden, or to take out author fields (the default). A copy that leaves nothing out reads no element file and carries every one byte for byte. Text that is no JSON at all travels as before.

The reader also refuses a number that is not finite: 1e400 read as infinity, and NaN, Infinity and -Infinity were read by the Kanka and LegendKeeper doors. read_folder skips such a file with the reason, the doctor lists it, and the Kanka door skips it with a note instead of failing at the write.

Measured before and after on 0.141.0, 0.142.0 and this branch with one folder per case (a hidden element holding the value, written as a share). Tests hold each case at the line and one past it; seven faults planted one at a time each turn a test red.

Not changed: an integer of up to 4,300 digits is read exactly.

🤖 Generated with Claude Code

…a number that is not finite is not read

0.142.0 made the reader of outside text refuse a file nested more than 200 deep, and the world file
writer took that refusal for "no element": a hidden element in such a file travelled in a share with its
author fields, where 0.141.0 had left it out. An integer of more than 4,300 digits did the same in every
earlier version. The writer now raises ValueError naming the file whenever it would have had to read it
(include_hidden=False, or author fields left out, the default), and writes nothing; a copy that leaves
nothing out still carries every file byte for byte, and text that is no JSON travels as before.

The reader also refuses a number that is not finite: 1e400 read as infinity, and NaN and the infinities
were read by the Kanka and LegendKeeper doors, which no writer of the package can write back. The folder
reader skips such a file with the reason, and the Kanka door skips it with a note.

Tests: each case at the line and past it, the share under each option that reads a file, and the Kanka
door on a real export with the value planted in one entity. Seven faults planted one at a time each turn
a test red.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit cdd7641 into main Nov 23, 2026
11 checks passed
@tmoosting
tmoosting deleted the outside-numbers branch November 23, 2026 19:00

This branch was previously deployed

1 inactive deployment
pypi — cdd7641a Deployed Nov 23, 2026 by tmoosting via publish #230
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.

1 participant