Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
174dd39
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
700c74a
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
216af43
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
fb09806
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
66bf52b
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
12316a3
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
8869853
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
ef7c008
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
14984e5
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
6f8e0c3
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
c9134d3
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 16, 2026
24ca488
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 16, 2026
4fdd101
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
0be85f6
fix: register P5 SG-0 receipt for v4 formats Lane C smoke harness
briansrls May 16, 2026
e8900f8
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
fcab72e
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
b2ad598
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
38ddab2
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
9ed2876
fix(csv): RFC4180-nullary dialect + reconcile header with rectangular…
briansrls May 16, 2026
66920f3
fix(openapi): add contact_extensions for Contact Object spec extensions
briansrls May 16, 2026
8a7649a
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 16, 2026
867fb99
docs(openapi): receipt by_status key shape under Deferred (1)
briansrls May 16, 2026
0d1234b
fix(openapi): align Responses key receipts with OAS 1XX…5XX lexemes
briansrls May 16, 2026
717df00
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
e65b81e
fix(json_schema): model type-array uniqueness with Set<T>
briansrls May 17, 2026
9dce99d
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
028e5b0
fix(openapi): OpenApiPathsSlot for optional root paths field
briansrls May 17, 2026
d61c7ea
chore(openapi): wrap DECLARATIVE-NOW paths prose line
briansrls May 17, 2026
38f1772
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
2c34b18
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
ae4db20
fix(openapi): add Response Object content/headers/links slots
briansrls May 17, 2026
4bb5614
fix(json_schema): correct Deferred §6.5.3 required vs properties note
briansrls May 17, 2026
f89b405
fix(openapi): split root spec extensions vs deferred fixed members
briansrls May 17, 2026
d911423
fix(openapi): split path/operation deferred fields vs spec extensions
briansrls May 17, 2026
ccc65c6
fix(openapi): split Media Type and Components deferred vs spec extens…
briansrls May 17, 2026
96de2c5
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
8bce07d
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
d9148e1
fix(openapi): add OpenApiSchema wrapper for OAS Schema Object
briansrls May 17, 2026
7584b9c
fix(openapi): split Info deferred fixed members vs spec extensions
briansrls May 17, 2026
d36a657
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
b792bd8
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
dbd2cbc
fix(json_schema): wire properties/required P2 presence slots on Instance
briansrls May 17, 2026
e82a867
fix(openapi): align Owns header with OpenApiDocument root carrier
briansrls May 17, 2026
027332c
fix(json_schema): narrow Deferred validate note for Draft 2020-12 app…
briansrls May 17, 2026
5918d91
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
85d6929
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
67979c5
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
16f1581
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
043bfd9
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
215f781
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
53d77a0
chore(v4-formats): strict de-prose Lane C .dag (operator msg_ba1a791a)
briansrls May 17, 2026
1053c28
fix(csv): restore RFC anchor + named rectangularity receipt in Scope …
briansrls May 17, 2026
73adc87
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
b6199ba
fix(openapi): key responses by closed OpenApiResponseKey, not String
briansrls May 17, 2026
8c3ff2e
fix(openapi): enforce non-empty responses + root paths|components|web…
briansrls May 17, 2026
a3cb73e
fix(csv): Peano spine rows; drop decoupled width vs List<String> arity
briansrls May 17, 2026
78fe67e
docs(v4-formats): pin JSON Schema + OpenAPI spec URLs in Scope lines
briansrls May 17, 2026
2058c59
fix(json_schema): key additional_members by closed keyword sum (P2)
briansrls May 17, 2026
65df8f4
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
f0f8726
fix(openapi): Paths.routes keys use OpenApiPathTemplateKey (/ prefix)
briansrls May 17, 2026
6300272
chore(v4-formats): align openapi Scope with Responses shape; import Map
briansrls May 17, 2026
a994064
chore(openapi): drop phantom Owns entries (Practice 5 / P2)
briansrls May 17, 2026
01346e7
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
8174dd4
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
1af4d75
fix(openapi): typed headers/links/refs + closed deferred/extension keys
briansrls May 17, 2026
5471eba
docs(openapi): Scope receipt for path-template lexical deferral
briansrls May 17, 2026
b9807aa
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
328b642
fix(openapi): model document root as coordinate slots, not 7-way sum
briansrls May 17, 2026
4bddb42
fix(v4): Practice 9 headers + T-4.6 disposition ledger
briansrls May 17, 2026
af1ed2d
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
f8f995d
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
b95c1d6
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
6ace419
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
414d82c
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
75ef827
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
5e8f644
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
21516d0
fix(csv): bring comment ratio under 20% gate
briansrls May 17, 2026
8cbd188
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
100bfaa
fix(csv): revert blank-line padding in csv.dag
briansrls May 17, 2026
7640b17
feat(csv): RFC 4180 witness carriers for Lane C ratio + ledger
briansrls May 17, 2026
4d1ca9f
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
4d7744a
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
b198592
fix(v4): model OAS 3.1 components.pathItems and path item $ref
briansrls May 17, 2026
90fe4e1
chore(v4): align Lane C .dag headers with Practice 9
briansrls May 17, 2026
2d4710e
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
ac70fc6
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
a01ccac
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
fe31c7b
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
ab300de
fix(v4): structurally rectangular CSV + unique OpenAPI response keys
briansrls May 17, 2026
9c56fab
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
96fe3f3
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
a3dc760
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
c4a1aff
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
2772d40
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
d950497
fix(v4): ground JsonSchema keyword sum in draft-2020-12 meta-schema
briansrls May 17, 2026
e0bde81
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
dae282b
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
831e3e5
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 17, 2026
616b723
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
15be3b6
fix(v4): restore DECISIONS.md Part 6 dropped in 616b7238b
briansrls May 17, 2026
9c4230f
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
4bc24e1
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
f9539c6
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
b02e73a
fix(v4): drop OpenApiDocumentRoot prose block for Practice 9
briansrls May 17, 2026
f67a891
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 17, 2026
f0542be
fix(v4): pair HeaderDeprecatedSlot with T-4.6-P4 row; trim Practice-9…
briansrls May 17, 2026
55dc1f0
fix(v4): encode non-empty JSON Schema `type` union in JsonSchemaTypeSlot
briansrls May 18, 2026
919441f
fix(v4): add T-4.6-P4 rows for OpenApiResponseKeyNonDefault and Defau…
briansrls May 18, 2026
5949e93
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 18, 2026
9e4fbc4
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 18, 2026
a86f319
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 18, 2026
9539203
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 18, 2026
471efe6
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 18, 2026
4279377
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 18, 2026
89266b4
WIP: v4 T-4.6 Lane C: model extdeps/formats/csv.dag + json_schema.dag…
briansrls May 18, 2026
17c4f60
fix(decisions): align T-4.6-CSV ledger with csv.dag MIME facts
briansrls May 18, 2026
1c0d20a
Merge remote-tracking branch 'origin/main' into session/sunny-stag-440
briansrls May 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions src/v4/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,80 @@ or defer to the task.
gate over `src/v4` is safe. Residual T-20 surface = the `run`
opcode/eval audit (unchanged), not the parser.

### T-4.6 — Practice-4 closed sums on external vocabularies (Lane C formats)

Rubric (`docs/modeling-discipline.md` “For reviewers” §4): large closed
sums keyed to an external spec carry an explicit 🟢/🟡/🔴 disposition and
a named YELLOW trigger in this ledger (Practice 9 — not in `Scope:`).

| ID | Carrier / slice | Disposition | YELLOW trigger (omit if GREEN) | Encoded in |
|----|------------------|-------------|--------------------------------|------------|
| **T-4.6-CSV** | RFC 4180 row/document carriers (`CsvRow` Peano depth = per-row field arity) + **`CsvRfc4180*` product witness records** (comma / DQUOTE / **CRLF record separator** / **TEXTDATA vs HTAB** outside unquoted fields / header / `text/csv` registration anchor — no new coproducts; witnesses state **normative CRLF** between records, not LF-as-record-boundary tolerance; **MIME `charset` is transport-layer** — not an RFC 4180 §2 witness in this slice) | 🟡 | Cross-row/header-vs-body arity mesh is **operator-pending** until a ruling + substrate hook (TASKS.md T-4.6); until then validation may fail-closed without a claimed total mesh. | `extdeps/formats/csv.dag` |
| **T-4.6-JSK** | `JsonSchemaAdditionalKeywordKey` — closed sum for Draft **2020-12** keywords exercised by this slice, grounded in the **default dialect meta-schema** (`https://json-schema.org/draft/2020-12/schema`), which composes the Core, Applicator, Unevaluated, Validation, meta-data, format-annotation, and content vocabularies (see `$vocabulary` therein). Typed `instance_*` slots intentionally favor **Core**-shaped modeling; the sum carries applicator/validation/meta/content keywords from that same meta-schema bundle, including Appendix A transitional **`definitions`** / **`dependencies`**. | 🟡 | Any ratified draft-2020-12 vocabulary or meta-schema change adds/renames/removes a keyword this enum carries ⇒ extend **JsonSchemaAdditionalKeywordKey** + amend **T-4.6-JSK** in the same change-set. | `extdeps/formats/json_schema.dag` |
| **T-4.6-OAS** | OpenAPI 3.1 document/object carriers in `openapi.dag` | 🟡 | Upstream OAS 3.1 normative or meta-schema change forces a modeled fixed field, deferred-key family, or path-template wire rule to migrate — ship with operator-visible reconcile (D5). | `extdeps/formats/openapi.dag` |

#### T-4.6-P4 — Per-coproduct classification ledger (PR #3205)

Authoritative Practice-4 ledger rows: dissolution stance + named YELLOW
trigger (if YELLOW). Each coproduct in the cited `.dag` carries **only**
the in-file `// <emoji> coproduct dissolution — DECISIONS.md <ID>` tag
(operator directive 2026-05-17, vivid-carp-207).

| ID | Coproduct | Disp | Ledger (dissolution / trigger) |
|----|-----------|------|--------------------------------|
| **T-4.6-P4-CsvHeaderPresence** | `CsvHeaderPresence` | 🟡 | Header present vs absent; cross-row arity couples to **T-4.6-CSV** mesh (operator-pending). |
| **T-4.6-P4-CsvRow** | `CsvRow` | 🟡 | Peano spine = per-row field count; mesh with **T-4.6-CSV** / **T-4.6-P4-CsvHeaderPresence**. |
| **T-4.6-P4-JsonSchemaCoreTypeName** | `JsonSchemaCoreTypeName` | 🟡 | Draft 2020-12 `type` keyword closed vocabulary for this slice; spec keyword churn extends the sum + amends this row. |
| **T-4.6-P4-JsonSchemaTypeSlot** | `JsonSchemaTypeSlot` | 🟡 | Optional / single / union type shapes over **T-4.6-P4-JsonSchemaCoreTypeName**; **`JsonSchemaTypeUnion`** uses **`first` + `rest:Set`** so the Draft 2020-12 `type` array is **non-empty** by construction. **`first` ∈ `rest`** or duplicate wire members ⇒ **parse/Diagnostic** (T-4 brief). |
| **T-4.6-P4-JsonSchemaItemsSlot** | `JsonSchemaItemsSlot` | 🟡 | `items` absent vs schema subtree; validation/type-derivation for `items` keywords deferred (T-4.6 header). |
| **T-4.6-P4-JsonSchemaPropertiesSlot** | `JsonSchemaPropertiesSlot` | 🟡 | `properties` absent vs map; key uniqueness is `Map` + parse/Diagnostic (collection.dag). |
| **T-4.6-P4-JsonSchemaRequiredSlot** | `JsonSchemaRequiredSlot` | 🟡 | `required` absent vs `Set<String>`; set semantics vs instance `properties` keys validated at ingest (T-4 brief). |
| **T-4.6-P4-JsonSchema** | `JsonSchema` | 🟡 | `true` / `false` / instance shell; instance keyword surface split across fixed fields + **T-4.6-JSK** map — full validation deferred (T-4.6). |
| **T-4.6-P4-OpenApiOpenapiObjectDeferredKey** | `OpenApiOpenapiObjectDeferredKey` | 🟡 | Fixed-field deferrals on root OpenAPI Object; new OAS fixed field ⇒ extend sum + **T-4.6-OAS**. |
| **T-4.6-P4-OpenApiOperationDeferredKey** | `OpenApiOperationDeferredKey` | 🟡 | Operation Object deferred members; OAS adds/reorders modeled deferrals ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiPathItemDeferredKey** | `OpenApiPathItemDeferredKey` | 🟡 | Path Item deferred members + `$ref` slot; OAS Path Item churn ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiPathItemOrReference** | `OpenApiPathItemOrReference` | 🟡 | Path Item inline vs **`$ref`**; used for **`webhooks`** map values and **`components.pathItems`** — **not** for root **`paths`** patterned map (**Paths** values are **`OpenApiPathItem`**; Path Item **`$ref`** is **`OpenApiPathItemDeferredKey`**, **T-4.6-OAS**). |
| **T-4.6-P4-OpenApiComponentsDeferredKey** | `OpenApiComponentsDeferredKey` | 🟡 | Components deferred map keys (fixed fields **not** modeled here — e.g. **`pathItems`** lives on **`OpenApiComponents.path_items`** / **T-4.6-P4-OpenApiComponentsPathItemsSlot**); Components object spec churn on *these* keys ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiComponentsMapKey** | `OpenApiComponentsMapKey` | 🟡 | Nominal key for **`components.schemas`** / **`components.pathItems`** map entries; OAS Components fixed-field key regexp `^[a-zA-Z0-9\.\-_]+$` is **parse/Diagnostic** (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiMediaTypeDeferredKey** | `OpenApiMediaTypeDeferredKey` | 🟡 | Media Type deferred members; encoding/example surface churn ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiHeaderDeferredKey** | `OpenApiHeaderDeferredKey` | 🟡 | Header Object deferred members (style / explode / example / examples); excludes query-only **`allowEmptyValue`**; **`deprecated`** is **`OpenApiHeaderDeprecatedSlot`** on **`OpenApiHeaderObject`**; **`content`** is first-class on **`OpenApiHeaderPayloadSlot`** (XOR with **`schema`**). OAS Header churn on these deferrals ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiLinkDeferredKey** | `OpenApiLinkDeferredKey` | 🟡 | Link Object deferred members; Link spec churn ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiLinkTarget** | `OpenApiLinkTarget` | 🟡 | OAS Link Object **`operationId` XOR `operationRef`** — exactly one target identity; carried as `OpenApiLinkObject.target` (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiHttpMethod** | `OpenApiHttpMethod` | 🟢 | Closed eight-verb Operation map key set (OAS Path Item `get`…`trace`). |
| **T-4.6-P4-OpenApiOptionalString** | `OpenApiOptionalString` | 🟢 | Present/absent optional string field idiom over OAS optional strings. |
| **T-4.6-P4-OpenApiHeaderRequiredSlot** | `OpenApiHeaderRequiredSlot` | 🟢 | Required boolean slot on Header Object (spec-bounded two-way). |
| **T-4.6-P4-OpenApiHeaderDeprecatedSlot** | `OpenApiHeaderDeprecatedSlot` | 🟢 | Header Object **`deprecated`** optional boolean (Parameter-parity fixed field on **`OpenApiHeaderObject`**, **T-4.6-OAS**). |
| **T-4.6-P4-OpenApiHeaderPayloadSlot** | `OpenApiHeaderPayloadSlot` | 🟡 | Header Object **`schema` XOR `content`** (OAS 3.1 mutual exclusion); **`content`** arm carries exactly one media-type entry via **`OpenApiHeaderContentSingle`** (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiHeaderOrReference** | `OpenApiHeaderOrReference` | 🟡 | Inline Header vs `$ref`; reference resolution + Reference Object parity triggers **T-4.6-OAS**. |
| **T-4.6-P4-OpenApiLinkOrReference** | `OpenApiLinkOrReference` | 🟡 | Inline Link vs `$ref`; same reference substrate as **T-4.6-P4-OpenApiHeaderOrReference**. |
| **T-4.6-P4-OpenApiContactSlot** | `OpenApiContactSlot` | 🟡 | Info Object `contact` optional subtree; OAS Contact Object churn ⇒ extend Contact fields + reconcile row. |
| **T-4.6-P4-OpenApiLicenseUrlOrIdentifierSlot** | `OpenApiLicenseUrlOrIdentifierSlot` | 🟡 | License Object `url` XOR `identifier` (+ neither) — mutual exclusion modeled; OAS License churn ⇒ amend row. |
| **T-4.6-P4-OpenApiLicenseSlot** | `OpenApiLicenseSlot` | 🟡 | Info `license` optional subtree; couples to **T-4.6-P4-OpenApiLicenseUrlOrIdentifierSlot**. |
| **T-4.6-P4-OpenApiMediaTypeSchemaSlot** | `OpenApiMediaTypeSchemaSlot` | 🟡 | Media Type `schema` present vs absent; couples to `OpenApiSchema`. |
| **T-4.6-P4-OpenApiResponseContentSlot** | `OpenApiResponseContentSlot` | 🟡 | Response `content` optional map; media-type map churn ⇒ amend modeling + row. |
| **T-4.6-P4-OpenApiHeadersSlot** | `OpenApiHeadersSlot` | 🟡 | Response `headers` optional map of **T-4.6-P4-OpenApiHeaderOrReference**. |
| **T-4.6-P4-OpenApiLinksSlot** | `OpenApiLinksSlot` | 🟡 | Response `links` optional map of **T-4.6-P4-OpenApiLinkOrReference**. |
| **T-4.6-P4-OpenApiResponseOrReference** | `OpenApiResponseOrReference` | 🟡 | Inline Response vs `$ref`; Responses object value shape (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiStatusDigit** | `OpenApiStatusDigit` | 🟢 | Decimal digit spine for explicit HTTP status codes (0–9). |
| **T-4.6-P4-OpenApiStatusHundreds** | `OpenApiStatusHundreds` | 🟢 | Hundreds class spine (`1xx`…`5xx`) for explicit status codes. |
| **T-4.6-P4-OpenApiResponseKeyWildcardKind** | `OpenApiResponseKeyWildcardKind` | 🟢 | OAS wildcard response key buckets `1XX`…`5XX` (uppercase `X` wire discipline in model). |
| **T-4.6-P4-OpenApiResponseKeyNonDefault** | `OpenApiResponseKeyNonDefault` | 🟡 | Explicit HTTP status vs wildcard response keys (excludes wire key **`default`**); used for **`OpenApiResponses.primary_response.status_key`** and **`additional_by_status`** map keys (**T-4.6-OAS**). OAS Responses key grammar churn ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiResponsesDefaultSlot** | `OpenApiResponsesDefaultSlot` | 🟡 | Optional **`default`** response arm split out from **`OpenApiResponses.primary_response`** / **`additional_by_status`** (**T-4.6-OAS**); spec churn ⇒ extend sum + row. |
| **T-4.6-P4-OpenApiResponseKey** | `OpenApiResponseKey` | 🟡 | `default` / explicit / wildcard key forms + overlaps per Responses Object (**T-4.6-OAS**). **`OpenApiResponses`:** `Map` forbids duplicates **within** `additional_by_status`; **`primary_response.status_key` ∉ keys(`additional_by_status`)** is **parse/Diagnostic** (T-4 brief). |
| **T-4.6-P4-OpenApiPathsSlot** | `OpenApiPathsSlot` | 🟡 | Root `paths` present vs absent channel (**T-4.6-OAS**); empty vs missing distinguished structurally. |
| **T-4.6-P4-OpenApiComponentsSchemasSlot** | `OpenApiComponentsSchemasSlot` | 🟡 | `components.schemas` map present vs absent; keys are **T-4.6-P4-OpenApiComponentsMapKey**; schema registry churn (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiComponentsPathItemsSlot** | `OpenApiComponentsPathItemsSlot` | 🟡 | OAS 3.1 **`components.pathItems`** present vs absent; keys are **T-4.6-P4-OpenApiComponentsMapKey**; values are **T-4.6-P4-OpenApiPathItemOrReference** (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiComponentsSlot** | `OpenApiComponentsSlot` | 🟡 | `components` subtree present vs absent at document root coordinate (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiWebhooksSlot** | `OpenApiWebhooksSlot` | 🟡 | `webhooks` map present vs absent at document root coordinate (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiDocumentRoot** | `OpenApiDocumentRoot` | 🟡 | OAS §3.1: document **MUST** expose at least one of **`paths`**, **`components`**, or **`webhooks`** — encoded as three mutually exclusive obligation-first carriers + optional sibling slots (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiSchemaOasMemberKey** | `OpenApiSchemaOasMemberKey` | 🟡 | OAS Schema Object fixed members **outside** the **`core: JsonSchema`** authority carried here — extend sum + row when OAS adds a modeled OAS-only schema field (**T-4.6-OAS**). |
| **T-4.6-P4-OpenApiSpecificationExtensionKey** | `OpenApiSpecificationExtensionKey` | 🟡 | OAS Specification Extensions: wire keys **MUST** begin **`x-`**; reserved **`x-oai-`** / **`x-oas-`** families are **disjoint arms** vs generic vendor keys (**T-4.6-OAS**). Keys not starting **`x-`**, or **`OpenApiSpecExtensionVendor`** with **`after_x_hyphen`** whose **`x-` +** form still prefixes **`x-oai-` / `x-oas-`** (mis-route) ⇒ **parse/Diagnostic** (T-4 brief). |
| **T-4.6-P4-OpenApiSchema** | `OpenApiSchema` | 🟡 | Schema Object wire surface = **`core: JsonSchema`** + **`openapi_schema_oas_members`** + **`openapi_schema_specification_extensions`** (keys = **T-4.6-P4-OpenApiSpecificationExtensionKey**) + **`openapi_schema_deferred_keyword_members`** (`Map<String, JsonValue>`) for **custom vocabularies**, unenumerated JSON Schema keywords, and forward-compatible keys **not** absorbed by the first three partitions (**T-4.6-OAS**). Duplicate keys across partitions or reserved-wire mis-routing ⇒ **parse/Diagnostic** (T-4 brief). |
| **T-4.6-P4-OpenApiOpenapiField3_1** | `OpenApiOpenapiField3_1` | 🟡 | OAS §4.1 `openapi` semver for the **3.1 feature line**: **`OpenApiOpenapi31Patch { patch: Nat }`** encodes wire **`3.1.{patch}`** (any patch this `Nat` can spell — aligns with “tooling SHOULD accept all **`3.1.*`**”). New **`3.2.*`** / major lines ⇒ extend this sum + **T-4.6-OAS** row (same change-set). |

`JsonSchemaAdditionalKeywordKey` uses row **T-4.6-JSK** (same coproduct).
**`OpenApiOpenapiField3_1`:** optional Practice-9 item-4 **DECISIONS cite** on the `type` line in `openapi.dag`; **N ≥ 2** coproducts still require the emoji dissolution tag + matching **§T-4.6-P4** row.

---

## D2 REVERSAL + FACT-BUNDLE RESEED — RATIFIED (2026-05-17)
Expand Down
99 changes: 74 additions & 25 deletions src/v4/extdeps/formats/csv.dag
Original file line number Diff line number Diff line change
@@ -1,29 +1,78 @@
// src/v4/extdeps/formats/csv.dag
//
// Scope: CSV (Comma-Separated Values) data format model — direction-agnostic.
// Anchor: https://datatracker.ietf.org/doc/html/rfc4180 (RFC 4180)
//
// Owns:
// - CsvDocument { width: PositiveInt, header: Option<Row>, records: List<Row> }
// - Row = a field sequence whose length is STRUCTURALLY == width
// (rectangularity is an invariant of the type, not a convention —
// RFC 4180 §1: "each line should contain the same number of fields".
// `List<List<String>>` is rejected: it admits ragged records and
// header-width drift, an illegal state. Ragged input is a parse
// Diagnostic, never a representable CsvDocument — fail-closed.)
// - parse(String, Dialect) -> Result<CsvDocument, Diagnostic>
// (width fixed by header if present, else by the first record; any
// record whose arity != width is a Diagnostic, not a truncation/pad)
// - emit(CsvDocument, Dialect) -> String
// - Dialect { delimiter: Char, quote: Char, escape: Option<Char>, line_terminator: String }
//
// Consumes:
// - std/node.dag, std/diagnostic.dag, std/collection.dag, std/text.dag
//
// Status: scaffold — fill per TASKS.md T-4.6
// Brief: see BRIEF_TEMPLATE.md; this file's I/O contract is the immutable
// contract for the worker. Splitting this file requires explicit operator
// ratification (substrate extension = stop signal).
// Scope: RFC 4180 CSV; Lane C format slice (TASKS.md T-4.6).
// Owns: CsvDialect, CsvHeaderPresence, CsvRow, CsvDocument, CsvRfc4180CommaFieldSep, CsvRfc4180DoubleQuoteEnclosure, CsvRfc4180EscapeDoubledQuote, CsvRfc4180RecordLineBreak, CsvRfc4180LastRecordEndingLineBreakOptional, CsvRfc4180HeaderRowOptional, CsvRfc4180NewlineInsideQuotedFieldOnly, CsvRfc4180UnquotedFieldTextdataVsTab, CsvRfc4180EmptyFieldBetweenCommas, CsvRfc4180RegisteredTextCsvMime
// Consumes: std/node.dag, std/diagnostic.dag, std/collection.dag, std/text.dag
// Status: scaffold — TASKS.md T-4.6
// Anchor: https://datatracker.ietf.org/doc/html/rfc4180

module v4.extdeps.formats.csv


type CsvDialect
= CsvDialectRfc4180 {}

// 🟡 coproduct dissolution — DECISIONS.md T-4.6-P4-CsvHeaderPresence
type CsvHeaderPresence
= HeaderPresent { row: CsvRow }
| HeaderAbsent

// 🟡 coproduct dissolution — DECISIONS.md T-4.6-P4-CsvRow
type CsvRow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: CsvRow admits CsvRowZ as a standalone zero-field row even though RFC 4180 defines a record as at least one field, so invalid CSV rows inhabit the substrate (extdeps fidelity/P2; https://datatracker.ietf.org/doc/html/rfc4180#section-2).

= CsvRowZ
| CsvRowS { field: String, tail: CsvRow }

// Singleton witnesses: normative RFC slice facts are **inhabitance-only** (no Bool negation).

type CsvRfc4180FieldsSeparatedByCommaU002cWitness {}

type CsvRfc4180HorizontalTabRejectedAsFieldSeparatorWitness {}

type CsvRfc4180CommaFieldSep {
fields_separated_by_comma_u002c: CsvRfc4180FieldsSeparatedByCommaU002cWitness,
horizontal_tab_is_rejected_separator_for_this_slice: CsvRfc4180HorizontalTabRejectedAsFieldSeparatorWitness,
}

type CsvRfc4180DquoteMayEncloseEntireFieldWitness {}

type CsvRfc4180EnclosedFieldMayContainCommaCrlfOrLfWitness {}

type CsvRfc4180DoubleQuoteEnclosure {
dquote_u0022_may_enclose_entire_field: CsvRfc4180DquoteMayEncloseEntireFieldWitness,
enclosed_field_may_contain_comma_crlf_or_lf: CsvRfc4180EnclosedFieldMayContainCommaCrlfOrLfWitness,
}

type CsvRfc4180EscapeDoubledQuote {}

type CsvRfc4180RecordsSeparatedByAsciiCrlfPerRfc4180Witness {}

type CsvRfc4180GeneratorEmitsCrlfBetweenRecordsWitness {}

type CsvRfc4180RecordLineBreak {
records_separated_by_ascii_crlf_u000d_u000a_per_rfc4180: CsvRfc4180RecordsSeparatedByAsciiCrlfPerRfc4180Witness,
generator_should_emit_crlf_between_records_per_rfc4180: CsvRfc4180GeneratorEmitsCrlfBetweenRecordsWitness,
}

// RFC 4180 §2: last record may omit the ending line break; unrelated to COMMA after the last field (forbidden).
type CsvRfc4180LastRecordEndingLineBreakOptional {}

type CsvRfc4180HeaderRowOptional {}

type CsvRfc4180NewlineInsideQuotedFieldOnly {}

type CsvRfc4180SpU0020TextdataOutsideUnquotedFieldWitness {}

type CsvRfc4180TabRejectedOutsideUnquotedFieldWitness {}

type CsvRfc4180UnquotedFieldTextdataVsTab {
ascii_sp_u0020_outside_unquoted_field_is_textdata_field_char: CsvRfc4180SpU0020TextdataOutsideUnquotedFieldWitness,
horizontal_tab_u0009_outside_unquoted_field_is_rejected_not_textdata: CsvRfc4180TabRejectedOutsideUnquotedFieldWitness,
}

type CsvRfc4180EmptyFieldBetweenCommas {}

type CsvRfc4180RegisteredTextCsvMime {}

type CsvDocument {
header: CsvHeaderPresence,
records: List<CsvRow>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: CsvDocument.records is a possibly-empty List, but RFC 4180 file grammar requires a record after the optional header, so empty/header-only documents become representable (extdeps fidelity/P2; https://datatracker.ietf.org/doc/html/rfc4180#section-2).

}
Loading
Loading