Skip to content

0.146.0: read_folder takes a declared type only when it is one of the 22 slugs as written - #45

Merged
tmoosting merged 1 commit into
mainfrom
declared-type
Nov 23, 2026
Merged

tmoosting merged 1 commit into
mainfrom
declared-type

Conversation

@tmoosting

Copy link
Copy Markdown
Member

read_folder now takes a declared type only when it is one of the 22 slugs as written.

The folder format says a declared type is a string exactly equal to one of the 22 type slugs, and that anything else in type declares nothing, so the directory fills it. The reader took any non-empty string, in lower case: "type": "Location" in elements/character/ was served as a location, and an unknown word became the element's type. Each is now read as its directory's type and flagged type_inferred, its body left as written. A slug as written still beats the directory.

What follows for callers is in the changelog entry: push sends such an element to its directory's route, and a file whose type was an unknown word is no longer left out of a pack or skipped by the OKF export.

Held by 21 cases in one JSON file, the same bytes the npm SDK's folder source runs (OnlyWorlds/sdk#60), its sha256 pinned in both suites. Measured before the change: the released SDK answered 21 of 21 as the rule wants, this package 12 of 21. Watched failing on eight planted rules, the control green before and after.

🤖 Generated with Claude Code

… 22 slugs as written

The folder format says a declared type is a string exactly equal to one of the 22 type slugs, and that anything else in `type` declares nothing, so the directory fills it. The reader took any non-empty string, in lower case: "Location" in elements/character/ was served as a location, and an unknown word became the element's type. Each is now read as its directory's type and flagged type_inferred, its body left as written. A slug as written still beats the directory.

Held by 21 cases in one JSON file, the same bytes the npm SDK's folder source runs, its sha256 pinned in both suites.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit 03b0023 into main Nov 23, 2026
11 checks passed
@tmoosting
tmoosting deleted the declared-type branch November 23, 2026 21:21

This branch was previously deployed

1 inactive deployment
pypi — 03b0023e Deployed Nov 23, 2026 by tmoosting via publish #233
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