From fa5c8cf35a85333427fe43089e3a74621a208f0e Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Mon, 20 Jul 2026 09:31:57 +0200 Subject: [PATCH] =?UTF-8?q?docs(linkedin-studio):=20OKF=20trinn=20D-review?= =?UTF-8?q?=20=E2=80=94=20korriger=20avkreftede=20R5-p=C3=A5stander?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trinn D-review besvart i _okf-interim (postkasse, ikke tracked her). Verifisering mot egen kode avkreftet to påstander i plan §4 R5: - Ingen stabile err.code i noen av de fire CLI-ene (fritekst-Error + numerisk process.exit). err.code er et krav TIL biblioteket, ikke en disiplin vi speiler. - "Nøyaktig én avsluttende newline" er ikke vår invariant; serializePublishedRecord utelater den bevisst for byte-eksakt round-trip (SC2). Delt fixture-korpus må bære et verbatim, ikke-normalisert tilfelle. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_019uzhvLjCm39mNQXVFwG7w2 --- docs/okf-ingestion/plan.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/okf-ingestion/plan.md b/docs/okf-ingestion/plan.md index fcdae9a..2abbed8 100644 --- a/docs/okf-ingestion/plan.md +++ b/docs/okf-ingestion/plan.md @@ -121,10 +121,22 @@ specifics-bank) all independently converged on `sha256(...)[:12]`; the pattern i **R5 (phase 4, Node half) — contract parity details.** Stable string error codes on the error object (the Python half's `exc.code` discipline, mirrored so Node consumers assert on `err.code`, never on message -text); zero runtime dependencies; ESM with `node:` prefixes; LF-only output with exactly one trailing -newline; and the golden-fixture set shared across both halves so byte-identity is the test, not the -promise. Our packages already meet the zero-dep/ESM/LF conventions (sole exception: `scripts/analytics` -depends on `csv-parse`), so parity is cheap on our side. +text); zero runtime dependencies; ESM with `node:` prefixes; and the golden-fixture set shared across both +halves so byte-identity is the test, not the promise. + +> **Correction, 2026-07-20 (trinn D-review).** An earlier revision of this section claimed we "already meet +> the zero-dep/ESM/LF conventions". Verified against the code, two parts of that were false: +> +> - **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. +> +> Zero-dep/ESM does hold (sole exception: `scripts/analytics` depends on `csv-parse`). ## 5. What must never move here