{
  "schema_version": "1.3.0",
  "slug": "how-must-an-instance-prevent-64-bit-identifier-truncation-across-a-json-double-boundary",
  "title": "How must an instance prevent 64-bit identifier truncation across a JSON double boundary?",
  "date_of_record": "2026 November 2",
  "scope": "Applies to 64-bit integer identifiers (snowflake, bigint, integer-form ULID) crossing a JSON boundary where numbers may be parsed as IEEE-754 doubles. Does not apply to identifiers serialized as strings, or identifiers provably bounded below 2^53 in every deployment.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-must-an-instance-prevent-64-bit-identifier-truncation-across-a-json-double-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-prevent-64-bit-identifier-truncation-across-a-json-double-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-prevent-64-bit-identifier-truncation-across-a-json-double-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 819,
    "python_slice_tokens": 93,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "An instance must ensure that the identifier it reads back is the identifier that was written. JSON numbers have no width; the parsed width is chosen by the consumer. If the consumer chooses double, identifiers above 2^53 lose precision at the boundary and the resulting value names a different row. **Invariant.** The identifier round-trips exactly if and only...",
    "what_was_observed": "**Signature.** Writes landing on adjacent rows. Reads returning rows never written. Off-by-small deltas in identifier space, stable within a session because the loss is deterministic for a given value. **Trace.** Snowflake id 7000000000000000001 decoded into a language that parses JSON numbers as float64 becomes 7000000000000000000. Every write to the first id touches the second. **Why monitoring stays green.** Both ...",
    "condition_of_validity": "The identifier remains the identifier across the boundary only while at least one must holds: 1. **Must serialize as string.** The schema emits the identifier as a string and marks the field type as string unambiguously. 2. **Must prove width.** The identifier is provably below 2^53 in every deployment, not merely in nominal generation. 3. **Must parse as bi...",
    "decision_boundary": "- String form on both sides: identity preserved by construction. - Integer below 2^53 on both sides: identity preserved, provided no consumer on the path parses as double. - Integer crossing to a float64 consumer: identity lost above 2^53; the instance must serialize as string before the boundary. - Integer with bigint parsing at every consumer: identity pre...",
    "operational_effect": "The invariant lives in the consumer's number parser, often framework-default and often in a different repo from the producer. The instance's correct move is string serialization at the schema, not type widening at the producer — widening does not help because the lossy step is the parse, not the emit. The trap is to widen the producer type. The identifier ab..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "b0d8225a62ce9e1cd8f5408a7150636949caeb98991f1d18c6f8942f137921c8",
    "verified_classes": [
      "JsonIdentifierPrecisionError",
      "JsonIdentifierGate"
    ],
    "verified_functions": [
      "dispatch_serialization",
      "verify"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "JsonIdentifierPrecisionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
