<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sisudoc-ocda-lib/dlang/dub.json, branch claude-org</title>
<subtitle>SiSU Spine: tools</subtitle>
<link rel='alternate' type='text/html' href='https://git.sisudoc.org/sisudoc-ocda-lib/'/>
<entry>
<title>D: ocda-read, the reader, over the library, of every form</title>
<updated>2026-09-29T23:37:04+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-29T23:37:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sisudoc.org/sisudoc-ocda-lib/commit/?id=310c42d3664432eda6bae33e975109cbb8ef9cd0'/>
<id>310c42d3664432eda6bae33e975109cbb8ef9cd0</id>
<content type='text'>
One reader where there were two. sisudoc-ssp-reader read a .ssp and
sisudoc-ocda-db-reader a .ocda.db, each with its own parser; this one
is built on the library, so every mode reads a .ssp, a .ocda.db and a
.sisupod, and says the same thing of each. Its output modules are the
.ssp reader's, copied (the reader repositories are unchanged) and
moved onto the library's model, which was the reader's types renamed
and added to. From the database reader, --languages and --files.

  ocda-read [--tree|--outline|--html|--llm-text|--llm-jsonl|--images|
             --verify --image-dir=&lt;d&gt;|--languages|--files|
             --report-unknown|--validate] &lt;file&gt; [lang]

Two modes are about the file and say so: --files answers for a
.ocda.db, and --validate checks a .ssp as text and refuses anything
else. Where a file holds several languages and none is named, every
form reads the first and says so, where the database used to take one
and the pod refuse.

In src/read/ beside the library in src/ocda/; dub.json keeps it out of
the library (configurations "library" and "ocda-read"), and the flake
builds it as a package. The flake's default is now all three programs
in one bin/: built separately into the same result link, each replaced
the one before, and the pipeline's dump looked for ocda-dump where
only ocda-agree was left.

Checked over the 36 document-languages:
- against the .ssp reader, on a .ssp, byte for byte after the first
  line (Parsed: is Read:): --tree, --html, --llm-text, --llm-jsonl,
  --images, --verify, --validate, 36 of 36; the summary differs only
  in the closing hint, which names the two new modes;
- against the database reader, on a .ocda.db: --files 27 of 27, and
  --languages 27 of 27 on language, source and digest (its id column,
  the database's own key, is left out);
- the same output from the .ssp, the .ocda.db and the .sisupod: the
  summary and --tree, --html, --llm-text, --llm-jsonl, --images and
  --report-unknown, 36 of 36; --languages, .ocda.db == .sisupod 27 of
  27, and a single-language .ssp == its database, 26 of 26.

Not reproduced, deliberately: the database reader's --outline, which
ordered the headings by their position within their own section, so
that the toc and the "(skip)" headings of other sections fell among
the body's. --outline here is --tree.

(assisted by Claude-Code)

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One reader where there were two. sisudoc-ssp-reader read a .ssp and
sisudoc-ocda-db-reader a .ocda.db, each with its own parser; this one
is built on the library, so every mode reads a .ssp, a .ocda.db and a
.sisupod, and says the same thing of each. Its output modules are the
.ssp reader's, copied (the reader repositories are unchanged) and
moved onto the library's model, which was the reader's types renamed
and added to. From the database reader, --languages and --files.

  ocda-read [--tree|--outline|--html|--llm-text|--llm-jsonl|--images|
             --verify --image-dir=&lt;d&gt;|--languages|--files|
             --report-unknown|--validate] &lt;file&gt; [lang]

Two modes are about the file and say so: --files answers for a
.ocda.db, and --validate checks a .ssp as text and refuses anything
else. Where a file holds several languages and none is named, every
form reads the first and says so, where the database used to take one
and the pod refuse.

In src/read/ beside the library in src/ocda/; dub.json keeps it out of
the library (configurations "library" and "ocda-read"), and the flake
builds it as a package. The flake's default is now all three programs
in one bin/: built separately into the same result link, each replaced
the one before, and the pipeline's dump looked for ocda-dump where
only ocda-agree was left.

Checked over the 36 document-languages:
- against the .ssp reader, on a .ssp, byte for byte after the first
  line (Parsed: is Read:): --tree, --html, --llm-text, --llm-jsonl,
  --images, --verify, --validate, 36 of 36; the summary differs only
  in the closing hint, which names the two new modes;
- against the database reader, on a .ocda.db: --files 27 of 27, and
  --languages 27 of 27 on language, source and digest (its id column,
  the database's own key, is left out);
- the same output from the .ssp, the .ocda.db and the .sisupod: the
  summary and --tree, --html, --llm-text, --llm-jsonl, --images and
  --report-unknown, 36 of 36; --languages, .ocda.db == .sisupod 27 of
  27, and a single-language .ssp == its database, 26 of 26.

Not reproduced, deliberately: the database reader's --outline, which
ordered the headings by their position within their own section, so
that the toc and the "(skip)" headings of other sections fell among
the body's. --outline here is --tree.

(assisted by Claude-Code)

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>a third input form: the abstraction out of a pod archive</title>
<updated>2026-09-26T02:57:24+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-26T02:57:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sisudoc.org/sisudoc-ocda-lib/commit/?id=9d2bbafeb3ba4d2e0c15fcf7ce4614ff6e2759be'/>
<id>9d2bbafeb3ba4d2e0c15fcf7ce4614ff6e2759be</id>
<content type='text'>
A pod built with --pod2 carries the abstraction inside it, at
media/abstraction/&lt;uid&gt;.&lt;lang&gt;.ssp. So ocda.load gains .sisupod and .zip,
and because the dispatch is in one place a writer over the library gained
a third input form without being touched.

Over the reference collection a .sisupod gives the same model as the .ssp
beside it: 36 of 36 document-languages, byte identical dumps. And the
text writer, unchanged, renders a document from its .sisupod byte
identically to spine --text, 36 of 36.

Two small readers, neither of them a library: ocda.zstd declares the four
libzstd entry points needed to unwrap a frame, as ocda.sqlite declares
sqlite3; ocda.zip reads a central directory and one stored entry. Deflate
is refused rather than mishandled, since spine writes stored entries and
a library that says it read what it skipped is worse than one that says
it cannot. A frame that declares an expansion over 512 MiB is refused
before anything is allocated: a reader of an artefact it did not make
declines to be told how much memory to take.

The Gleam library reads the zip and not the frame. The only zstd on the
BEAM is a NIF that clones zstd from github in its own build, so it cannot
be built sandboxed without patching it. A .zip pod is read in both
languages, a .sisupod in D only, and the Gleam refusal says why and says
"zstd -d" rather than claiming the file is malformed. It is a packaging
limit, not anything about the format, and the only place the two
libraries differ in what they accept.

A pod without an abstraction is refused with a message naming the flag
that puts one in, because that is a fact about the pod.

(assisted by Claude-Code)

Co-Authored-By: Claude Opus 5 (1M context) &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A pod built with --pod2 carries the abstraction inside it, at
media/abstraction/&lt;uid&gt;.&lt;lang&gt;.ssp. So ocda.load gains .sisupod and .zip,
and because the dispatch is in one place a writer over the library gained
a third input form without being touched.

Over the reference collection a .sisupod gives the same model as the .ssp
beside it: 36 of 36 document-languages, byte identical dumps. And the
text writer, unchanged, renders a document from its .sisupod byte
identically to spine --text, 36 of 36.

Two small readers, neither of them a library: ocda.zstd declares the four
libzstd entry points needed to unwrap a frame, as ocda.sqlite declares
sqlite3; ocda.zip reads a central directory and one stored entry. Deflate
is refused rather than mishandled, since spine writes stored entries and
a library that says it read what it skipped is worse than one that says
it cannot. A frame that declares an expansion over 512 MiB is refused
before anything is allocated: a reader of an artefact it did not make
declines to be told how much memory to take.

The Gleam library reads the zip and not the frame. The only zstd on the
BEAM is a NIF that clones zstd from github in its own build, so it cannot
be built sandboxed without patching it. A .zip pod is read in both
languages, a .sisupod in D only, and the Gleam refusal says why and says
"zstd -d" rather than claiming the file is malformed. It is a packaging
limit, not anything about the format, and the only place the two
libraries differ in what they accept.

A pod without an abstraction is refused with a message naming the flag
that puts one in, because that is a fact about the pod.

(assisted by Claude-Code)

Co-Authored-By: Claude Opus 5 (1M context) &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>the abstraction as a library, and a defect it found at once</title>
<updated>2026-09-25T20:34:44+00:00</updated>
<author>
<name>Ralph Amissah</name>
<email>ralph.amissah@gmail.com</email>
</author>
<published>2026-09-25T20:34:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sisudoc.org/sisudoc-ocda-lib/commit/?id=0e2c9fa40ed98ceb7a26c2af69807cf577b6e32a'/>
<id>0e2c9fa40ed98ceb7a26c2af69807cf577b6e32a</id>
<content type='text'>
The readers each read one serialisation and print.  A writer needs
neither: it needs the document.  So the model and both loaders live
here, and a writer cannot tell which serialisation it was handed,
exactly as spine own writers cannot.

ocda.model imports nothing, which is the property that makes writers
possible: they depend on the model and on neither loader.  The model
and the .ssp loader are the ssp-reader code, moved and renamed to the
level they belong to: the model is neither the .ssp nor the .ocda.db.
ocda.load_db is new, and returns the same value from sqlite that
load_ssp returns from text.  ocda.load is the one place that decides
what a path is.

The claim is only true if the two loaders agree, so test/agree.d asks:
load a document both ways and compare the models object by object.

It found a real defect on its first run.  Eight of thirty-six
disagreed, and the cause was the .ssp loader, not the formats: an
object whose first text line is blank lost it, the loader having
decided whether to start a new line by asking whether the accumulated
text was empty, which is a different question from whether a line has
been seen.  Seven documents of the sample set have verse opening on a
blank line and every one of them was wrong.

Nothing else had caught it: the two .ssp readers were compared on
section counts, which the bug does not disturb.  It took loading one
document two ways and comparing the objects.  Fixed here, and in
ssp-reader/dlang which carried the same code.  36 of 36 now agree.

(assisted by Claude-Code)

Co-Authored-By: Claude Opus 5 (1M context) &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The readers each read one serialisation and print.  A writer needs
neither: it needs the document.  So the model and both loaders live
here, and a writer cannot tell which serialisation it was handed,
exactly as spine own writers cannot.

ocda.model imports nothing, which is the property that makes writers
possible: they depend on the model and on neither loader.  The model
and the .ssp loader are the ssp-reader code, moved and renamed to the
level they belong to: the model is neither the .ssp nor the .ocda.db.
ocda.load_db is new, and returns the same value from sqlite that
load_ssp returns from text.  ocda.load is the one place that decides
what a path is.

The claim is only true if the two loaders agree, so test/agree.d asks:
load a document both ways and compare the models object by object.

It found a real defect on its first run.  Eight of thirty-six
disagreed, and the cause was the .ssp loader, not the formats: an
object whose first text line is blank lost it, the loader having
decided whether to start a new line by asking whether the accumulated
text was empty, which is a different question from whether a line has
been seen.  Seven documents of the sample set have verse opening on a
blank line and every one of them was wrong.

Nothing else had caught it: the two .ssp readers were compared on
section counts, which the bug does not disturb.  It took loading one
document two ways and comparing the objects.  Fixed here, and in
ssp-reader/dlang which carried the same code.  36 of 36 now agree.

(assisted by Claude-Code)

Co-Authored-By: Claude Opus 5 (1M context) &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
