feature/Large-text-corpus · L-261115-8703f2
Merged
LC
11d ago+3364+3364+0123456789012345678901234567890123456789-704-704-012345678901234567890123456789
TL;DR
- The committed projection corpus is now the one pipelex
devgenerates after large Text, Html and JSON values became storable, and the client's compact inputs template for aJSONslot is now the bare object, as pipelex's reference projection renders it. - The corpus pins the shapes that may hold a
url(standard 9.0.0), and the copy here was behind pipelex even before that change. - ⚠️ A caller reading a compact template's
JSONslot now receives{}instead of the{concept, content: {json_obj}}envelope.
Behaviour changes
- A
native.JSONslot, a slot of a concept refining it, and each element of aJSON[]slot in a compact template:{"concept": "native.JSON", "content": {"json_obj": {}}}→{}. The explicit shape is unchanged.
Breaking changes
- A consumer of
project_inputs_templateorrender_inputs_templatewithexplicit=Falsethat read the envelope at aJSONslot now reads the object itself; the runtime's input shaper reads a bare object at aJSONposition literally.
Changes
Corpus
tests/fixtures/protocol/(input_form.json,output_form.json,pipe_io_contracts.json,inputs_template/**) copied byte for byte frompipelex-dev generate-projection-corpusat pipelexdev5c8f298a0, the same bytes as the mthds-js twin. Text, Html and JSON contract schemas carry optionaltext/inner_html/json_objbeside optionalurl,size,mime_typeandpreview;scaffold_stored_natives,scaffold_verdict_nativesandoutput_native_yes_noare new;scaffold_anything_slotis folded intoscaffold_open_natives; the manifest's unshapeable record now holds only the nested-list gap.tests/fixtures/protocol/README.md: provenance, the standard 9.0.0 shapes, and the unshapeable record updated.
Client projection
mthds/protocol/inputs_template.py:JSONleaves the envelope-keeping set;keeps_envelopereturns false for aJSONnode (lists included), and the compact value of aJSONnode is the projection of itsjson_obj, mirroringprojection_reference.pyin pipelex.
Tests
tests/unit/test_inputs_template_rendering.py: theJSONcompact rule held by name, for a single slot, a refining concept and aJSON[]slot.tests/unit/test_protocol_pipe_io_contracts.py: every captured single Text, Markdown, Html or JSON slot states its inline value and a stored value's fields, requiring neither.tests/unit/test_data.py: the cases, and the hand-written_TEXT_SCHEMAprobe no longer requirestext.
How it was verified
DO_NOT_TRACK=1 make agent-check:> done: agent-check(ruff, pyright 0 errors, mypy no issues, error registry agrees).DO_NOT_TRACK=1 make agent-test:All tests passed.- Before the client fix, byte parity failed on the compact JSON and TOML of
scaffold_open_nativesandscaffold_stored_natives, and nowhere else. diff -rof the generated corpus (withoutengine/) againsttests/fixtures/protocol/: onlyREADME.mdand.gitattributesdiffer, as intended.
Documentation
docs/inputs-template.md: theJSONcompact rule, and why the storable natives need no rule of their own.tests/fixtures/protocol/README.md: provenance and the new shapes.CHANGELOG.md: one### Changedentry under[Unreleased].
Not done
- No release: it ships with the next mthds-python release.
- The mthds-js twin of this step is its own pull request (L-261115-f52808).
conformance/tests/mthds/fixtures/protocol_corpus_census.jsonstill listsscaffold_anything_slotand lacks the new pipes; that census belongs toconformance.
Closes L-261115-8703f2
Advances L-261113-38f717
🤖 Generated with Claude Code
Summary by cubic
Updates the compact inputs template so a JSON slot renders as the bare object it carries — for a single slot, a concept refining native.JSON, and each element of a JSON[] slot — and re-commits the projection corpus from pipelex dev at the change that made Text, Html and JSON values storable.
This is breaking: a consumer of project_inputs_template or render_inputs_template with explicit=False that read the {"concept": "native.JSON", "content": {"json_obj": {}}} envelope at a JSON slot now reads the object itself, which the runtime's input shaper accepts literally. The explicit shape is unchanged.
Corpus
- Regenerated from pipelex
dev, addingscaffold_stored_natives,scaffold_verdict_nativesandoutput_native_yes_no, and foldingscaffold_anything_slotintoscaffold_open_natives. - Text, Html and JSON contract schemas now state their inline value beside optional
url,size,mime_typeandpreviewstored-value fields, none required.