diff --git a/docs/okf-ingestion/plan.md b/docs/okf-ingestion/plan.md index 2abbed8..60279a4 100644 --- a/docs/okf-ingestion/plan.md +++ b/docs/okf-ingestion/plan.md @@ -130,11 +130,20 @@ halves so byte-identity is the test, not the promise. > - **We have no stable error codes.** None of the four CLIs set a machine-readable code; every failure is a > free-text `Error` plus a numeric `process.exit` (`scripts/brain/src/ingest.ts:99,:113`, > `scripts/trends/src/cli.ts:125,:255`). `err.code` is an ask *of* the library, not a discipline we mirror. -> - **"Exactly one trailing newline" is not our invariant, and must not become the library's.** Nothing -> asserts it here, and `serializePublishedRecord` deliberately omits it (`scripts/brain/src/ingest.ts:71`) -> because the record must end on the verbatim body or the byte-exact round-trip (SC2, §5) breaks. A shared -> fixture corpus therefore has to carry a *verbatim, non-normalized* case; a corpus where every valid -> output ends in one newline encodes normalization as contract and tests byte-identity away. +> - **"Exactly one trailing newline" is not asserted here either.** Nothing tests it, and +> `serializePublishedRecord` deliberately omits it (`scripts/brain/src/ingest.ts:71`) because the record +> must end on the verbatim body or the byte-exact round-trip (SC2, §5) breaks. +> +> **Second correction, same day, narrowing the one above.** The trinn D-review first read this as a +> conflict with `claude-playlist-corpus`, who asked the library to own frame normalization (LF-only, one +> blank line, trailing newline). It is not a conflict, and the check should have come first: our +> newline-free serializer governs `ingest/published/`, which is **excluded from the OKF bundle by design** +> (§5, `scripts/brain/tests/okf-conform.test.ts:22-27`). The files `write_concept` would actually write for +> us — the `brain/` bundle — get their trailing newline from our own serializer +> (`scripts/brain/src/profile.ts:65`). On the concept-writing path we agree with them. What survives is +> narrower: `write_concept` is also being asked to serve as a *general* verbatim writer callable outside a +> bundle (`ms-ai-architect`, `po-claude`), so frame normalization should be a documented parameter rather +> than an unconditional guarantee. The fixture ask applies to that general writer, not to the concept corpus. > > Zero-dep/ESM does hold (sole exception: `scripts/analytics` depends on `csv-parse`).