{
  "tool_id": "art-692-close-posting-lineage",
  "note": "Golden fixtures for the Close Posting Lineage kernel (CLOSE-COMMAND-CENTER-BUILD-SPEC-2026-09-23.md D2, narrowed to the lineage node alone by the 2026-09-24 value review). The first vector is the spec oracle: its policy_parameters and output_payload are the spec worked example's canonical fenced preimage, carried with independent_oracle provenance; its golden_hash was recomputed from that literal preimage via chaingraph/kernels/_hash.mjs (the spec left the hash to be computed and pinned at claim). Every other vector is kernel_generated (a regression vector pinning the kernel's own behaviour, never citable as conformance evidence per AUTHORING-STANDARD.md Sec. 1.5). Coverage: complete lineage resolving to CLOSE_READY, an accrual with no traces_to (unlinked), a traces_to naming a key no coding entry declares (dangling), a lineage key claimed twice (duplicate), the two advisory observations that never gate the verdict (missing source digest, orphan coding entry), a partially-resolving accrual that is dangling rather than linked, and the indeterminate branch on an empty register plus every malformed intake shape (non-array entry lists, missing key, blank key, missing gl_account, non-finite amount, non-array traces_to, blank traces_to entry, malformed as_of). On the indeterminate branch the payload carries an eighth member, errors (non-empty exactly when the one conditional compliance flag CLOSE_LINEAGE_INDETERMINATE is present, per the flag-mirror doctrine); on every assertable input the payload is exactly the seven pinned members and compliance_flags is empty. human_sign_off: PENDING.",
  "vectors": [
    {
      "name": "worked-example-spec-pinned",
      "note": "ORACLE vector: the policy_parameters and output_payload below are the spec's own, not the kernel's. The kernel's compute() reproduces the payload byte-identically, so its execution_hash equals the golden_hash recorded here.",
      "independent_oracle": {
        "source": "CLOSE-COMMAND-CENTER-BUILD-SPEC-2026-09-23.md Sec. W worked example, canonical fenced {policy_parameters, output_payload} preimage",
        "derivation": "execution_hash computed at claim from the spec's literal fenced preimage via chaingraph/kernels/_hash.mjs in a fresh origin/main worktree (ceaed002b0d88a6059449c1861f35b18886361f5). The spec pinned the preimage and deferred the hash to claim time [CCC-2, CCC-9], so this is a first pin, not a parity check against an earlier one."
      },
      "policy_parameters": {
        "as_of": "2026-09-30",
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1200,
            "traces_to": [
              "COD-1"
            ]
          },
          {
            "key": "ACC-2",
            "gl_account": "2200-accrued-interest",
            "amount": 300,
            "traces_to": []
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [
          "ACC-1"
        ],
        "unlinked_accruals": [
          "ACC-2"
        ],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "GAPS_FOUND"
      },
      "golden_hash": "46b2cee4111553128514447ded7e205fb45bbdedccd75579f04c7ebc360d63d1"
    },
    {
      "name": "complete-lineage-close-ready",
      "note": "Every declared accrual resolves to a declared coding entry and every coding entry carries a source digest: no gated finding, no advisory observation, CLOSE_READY.",
      "policy_parameters": {
        "as_of": "2026-09-30",
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          },
          {
            "key": "COD-2",
            "gl_account": "6200-travel",
            "amount": 450,
            "source_document_digest": "doc-digest-2"
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1200,
            "traces_to": [
              "COD-1"
            ]
          },
          {
            "key": "ACC-2",
            "gl_account": "2100-accrued-expense",
            "amount": 450,
            "traces_to": [
              "COD-2"
            ]
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [
          "ACC-1",
          "ACC-2"
        ],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "CLOSE_READY"
      },
      "golden_hash": "75a9ef42c7b70ab832918a410103ef4dd15190418e0ef20e46a8b69b73837424"
    },
    {
      "name": "dangling-trace-ref",
      "note": "An accrual naming a key no coding entry declares: the reference is reported with the accrual that declared it, and the accrual is not counted as linked.",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1200,
            "traces_to": [
              "COD-1"
            ]
          },
          {
            "key": "ACC-2",
            "gl_account": "2100-accrued-expense",
            "amount": 75,
            "traces_to": [
              "COD-9"
            ]
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [
          "ACC-1"
        ],
        "unlinked_accruals": [],
        "dangling_trace_refs": [
          {
            "accrual_key": "ACC-2",
            "trace_ref": "COD-9"
          }
        ],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "GAPS_FOUND"
      },
      "golden_hash": "1c5a5649a2983b103c0adcf2dc3e465284f129cc409a21d6934cc9628d0a7d85"
    },
    {
      "name": "partial-resolution-is-not-linked",
      "note": "An accrual whose references only partly resolve is NOT linked: one dangling reference is reported and the accrual stays out of linked_accruals. The resolving reference still marks its coding entry as referenced, so COD-1 is not an orphan.",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1275,
            "traces_to": [
              "COD-1",
              "COD-9"
            ]
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [
          {
            "accrual_key": "ACC-1",
            "trace_ref": "COD-9"
          }
        ],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "GAPS_FOUND"
      },
      "golden_hash": "7c76c205baa413c908475051d85efefbcae52b7c6d12fc17033f2773890b7e61"
    },
    {
      "name": "duplicate-lineage-key",
      "note": "Two declared entries claim one lineage key: the key is reported once, in first-repeat order, and the verdict is gated on it. Uniqueness is checked over the coding and accrual entries together, because a traces_to reference cannot mean one thing when the key it names is ambiguous.",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          },
          {
            "key": "COD-1",
            "gl_account": "6200-travel",
            "amount": 450,
            "source_document_digest": "doc-digest-2"
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1200,
            "traces_to": [
              "COD-1"
            ]
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [
          "ACC-1"
        ],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [
          "COD-1"
        ],
        "overall": "GAPS_FOUND"
      },
      "golden_hash": "3a47b98cc5bd60645e5feaaa366f2e090f8178ad15669e4ab6a7d5844c32313c"
    },
    {
      "name": "missing-source-ref-is-advisory",
      "note": "A coding entry without a declared source_document_digest is recorded and never gates: the linkage itself is complete, so the verdict stays CLOSE_READY.",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1200,
            "traces_to": [
              "COD-1"
            ]
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [
          "ACC-1"
        ],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [
          "COD-1"
        ],
        "duplicate_lineage_keys": [],
        "overall": "CLOSE_READY"
      },
      "golden_hash": "fd69c372d4bff45050c7f4324b9227c650a35d779ee8087eb25343554bb09a25"
    },
    {
      "name": "orphan-coding-is-advisory",
      "note": "A coding entry no accrual traces to is recorded and never gates: nothing about it makes the declared accruals less linked.",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          },
          {
            "key": "COD-2",
            "gl_account": "6200-travel",
            "amount": 450,
            "source_document_digest": "doc-digest-2"
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1200,
            "traces_to": [
              "COD-1"
            ]
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [
          "ACC-1"
        ],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [
          "COD-2"
        ],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "CLOSE_READY"
      },
      "golden_hash": "fb04515cfa2edf35eb75217a34a457947332f3e1a6004a9f0776d765839f846a"
    },
    {
      "name": "absent-traces-to-reads-as-unlinked",
      "note": "traces_to absent entirely reads the same as an empty list: unlinked, never malformed.",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          }
        ],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 1200
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [
          "ACC-1"
        ],
        "dangling_trace_refs": [],
        "orphan_coding": [
          "COD-1"
        ],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "GAPS_FOUND"
      },
      "golden_hash": "ae48bae48df1a4cd8217f698fa9bd9567b2961330d524821c917778cf98d30e6"
    },
    {
      "name": "empty-register-indeterminate",
      "note": "Zero declared accrual entries cannot make every accrual linked: the verdict is INDETERMINATE, never a vacuous CLOSE_READY.",
      "policy_parameters": {
        "as_of": "2026-09-30",
        "coding_entries": [],
        "accrual_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "no accrual entries declared; linkage cannot be asserted over an empty register."
        ]
      },
      "golden_hash": "f58f0287a56bd6ded41b20eb1cd94c3656bf556b380f3ebed467994f80fe8e27"
    },
    {
      "name": "coding-declared-but-no-accruals-indeterminate",
      "note": "Coding entries alone are still assertion-free: there is no accrual population to classify, so the register is INDETERMINATE and no orphan observation is reported over unvalidated ground.",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": 1200,
            "source_document_digest": "doc-digest-1"
          }
        ],
        "accrual_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "no accrual entries declared; linkage cannot be asserted over an empty register."
        ]
      },
      "golden_hash": "b9b3b020a389d46bca9a0281852a1cba826def72f5a32f582b0b2973ed232049"
    },
    {
      "name": "intake-non-array-coding-entries",
      "policy_parameters": {
        "coding_entries": {},
        "accrual_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "coding_entries must be an array."
        ]
      },
      "golden_hash": "e0f22e34337d8b6589c2e8a9c9e543515e5513ffd16b825231b866e2a19ac6a4"
    },
    {
      "name": "intake-missing-accrual-entries",
      "policy_parameters": {
        "coding_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "accrual_entries must be an array."
        ]
      },
      "golden_hash": "b67a54527659f7d9eb1dd7a5dc26420d2191c5dff4b4241603e0852af739bee6"
    },
    {
      "name": "intake-missing-coding-key",
      "policy_parameters": {
        "coding_entries": [
          {
            "gl_account": "6100-office",
            "amount": 1200
          }
        ],
        "accrual_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "coding_entries[0].key is required (fail closed on a missing lineage key)."
        ]
      },
      "golden_hash": "dd32ac6e251b8edd57e09c2dbb1b9e7bfd98d13570a73e4bf36d428ffb8cd094"
    },
    {
      "name": "intake-blank-accrual-key",
      "policy_parameters": {
        "coding_entries": [],
        "accrual_entries": [
          {
            "key": "   ",
            "gl_account": "2100-accrued-expense",
            "amount": 10
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "accrual_entries[0].key is required (fail closed on a missing lineage key)."
        ]
      },
      "golden_hash": "4aabc8aad3d9906b7b07447eb9caa03fd16b391a83770cba0e4a87f3e57f779f"
    },
    {
      "name": "intake-missing-gl-account",
      "policy_parameters": {
        "coding_entries": [],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "amount": 10
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "accrual_entries[0].gl_account is required."
        ]
      },
      "golden_hash": "eb4e9da446cdfab655ea7bc4645d01a86b340fc7c6430d34813ad193be6a3a94"
    },
    {
      "name": "intake-non-finite-amount",
      "policy_parameters": {
        "coding_entries": [
          {
            "key": "COD-1",
            "gl_account": "6100-office",
            "amount": "1200.00"
          }
        ],
        "accrual_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "coding_entries[0].amount must be a finite number."
        ]
      },
      "golden_hash": "1e1720a2c4004bce3bf62de388b214971140265ec061a4fcd9fe48f6e0f448b8"
    },
    {
      "name": "intake-non-array-traces-to",
      "policy_parameters": {
        "coding_entries": [],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 10,
            "traces_to": "COD-1"
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "accrual_entries[0].traces_to must be an array of non-empty strings."
        ]
      },
      "golden_hash": "9849c23be42522c55e4766f90a0c054c2708a698867761c00d6a6945d1543ce6"
    },
    {
      "name": "intake-blank-traces-to-entry",
      "policy_parameters": {
        "coding_entries": [],
        "accrual_entries": [
          {
            "key": "ACC-1",
            "gl_account": "2100-accrued-expense",
            "amount": 10,
            "traces_to": [
              ""
            ]
          }
        ]
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "accrual_entries[0].traces_to[0] must be a non-empty string."
        ]
      },
      "golden_hash": "e7a993287a8549f66d28ad426861587963ddd9c7f56908db2aac3317c57d223b"
    },
    {
      "name": "intake-malformed-as-of",
      "policy_parameters": {
        "as_of": "September 2026",
        "coding_entries": [],
        "accrual_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "as_of, when present, must be a YYYY-MM-DD date string."
        ]
      },
      "golden_hash": "68850fcb55407402082a8a6dd78112656b2727190265a30dc6945c3b5e76b21a"
    },
    {
      "name": "intake-non-object-entry",
      "policy_parameters": {
        "coding_entries": [
          "COD-1"
        ],
        "accrual_entries": []
      },
      "output_payload": {
        "linked_accruals": [],
        "unlinked_accruals": [],
        "dangling_trace_refs": [],
        "orphan_coding": [],
        "missing_source_refs": [],
        "duplicate_lineage_keys": [],
        "overall": "INDETERMINATE",
        "errors": [
          "coding_entries[0] must be an object."
        ]
      },
      "golden_hash": "935addc16888fdbc058639389aa9e6e2f644bddbbb8a77f9fba1c1841a82fc9c"
    }
  ]
}
