HomeDocs-Technical WhitePaper51-Pipeline Card Template v1.0

Chapter 4 — Inbound Data & Contracts (Source / Schema / Versioning)


I. Purpose & Scope


II. Source Definition


III. Inbound Contract / Schema

  1. Align with TARR: field names, units, and dimensions match TARR (data spec). Key path fields:
    • path.gamma_ell: array<m>; path.d_ell: array<m>; medium.n_eff_profile: array<1>;
    • ref.c_ref: m/s; (for phase) lambda_ref: m; obs.T_arr: s, obs.Phi: rad (if present).
  2. Field spec (minimal set):
    • Identity: record_id (ULID/UUIDv4), acq.ts_start/ts_end (ISO-8601), instrument.id/mode.
    • Quality: quality.flags[], quality.score_Q (0..1), uncertainty.* (if available).
    • Citations & version: see[], references[], version (SemVer), checksum.
  3. Units & dimensions: all numeric fields carry unit or are defined in the contract; any expression with division/integrals/composites must use parentheses.
  4. Missingness: use null or field omission; textual NaN/Inf is forbidden; encode reasons in quality.flags.

IV. Schema Evolution

  1. Compatibility matrix:
    • Backward-compatible addition (MINOR): add fields only; old consumers remain valid.
    • Breaking changes (MAJOR): change/delete semantics/units/dimensions.
    • Fixes (PATCH): defaults/descriptions; no semantic change.
  2. Version stamping: inbound bundle and schema.json both carry version (SemVer); keep in sync in manifest.yaml.
  3. Migration: for MAJOR changes provide explicit mapping/conversion (e.g., rad = deg * π/180) and rollback plan.

V. Validation Pipeline (Mx-?)


VI. Machine-Readable Contracts
A. schema.json (excerpt)

{

"$schema":"https://json-schema.org/draft/2020-12/schema",

"title":"Inbound v1.0.0",

"type":"object",

"required":["record_id","acq","path","medium","ref","version","see"],

"properties":{

"record_id":{"type":"string"},

"acq":{"type":"object","required":["ts_start","ts_end"],

"properties":{"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"}}},

"path":{"type":"object","required":["gamma_ell","d_ell"],

"properties":{"gamma_ell":{"type":"array","items":{"type":"number"},"minItems":2},

"d_ell":{"type":"array","items":{"type":"number"},"minItems":2}}},

"medium":{"type":"object","required":["n_eff_profile"],

"properties":{"n_eff_profile":{"type":"array","items":{"type":"number"},"minItems":2}}},

"ref":{"type":"object","required":["c_ref"],"properties":{"c_ref":{"type":"number"}}},

"see":{"type":"array","items":{"type":"string"},"minItems":1},

"version":{"type":"string"}

}

}

B. contract.yaml (inbound contract)

version: "1.0.0"

source:

id: "SRC-telemetry-rt"

mode: "streaming" # file|streaming|near-rt|api

schema: "schemas/inbound/schema.json"

units:

c_ref: "m/s"

T_arr: "s"

Phi: "rad"

path:

required: true

delta_form: "general"

quality_gates: ["G1","G2","G3","G4","G5","G6","G7","G8"]


C. manifest.yaml (inbound artifact list)

dataset_id: "ptn-ingest-202509"

version: "1.0.0"

created_at: "2025-09-24T16:00:00Z"

producer: "pipeline.ingest"

see:

- "EFT.WP.Core.Equations v1.1:S20-1"

- "EFT.WP.Core.Metrology v1.0:check_dim"

checksum: { algo: "sha256", value: "<64-hex>" }


VII. Anti-Patterns & Fixes


VIII. Validation & Alerts


IX. Release & Layout

PTN_EXPORT/

inbound/

contract.yaml

schema.json

data/

*.parquet

reports/

check_dim_report.json

validate_report.json

audit.jsonl

manifest.yaml

SIGNATURE.asc


X. Cross-References


XI. Checklist


Copyright & License (CC BY 4.0)

Copyright: Unless otherwise noted, the copyright of “Energy Filament Theory” (text, charts, illustrations, symbols, and formulas) belongs to the author “Guanglin Tu”.
License: This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, redistribute, excerpt, adapt, and share for commercial or non‑commercial purposes with proper attribution.
Suggested attribution: Author: “Guanglin Tu”; Work: “Energy Filament Theory”; Source: energyfilament.org; License: CC BY 4.0.

First published: 2025-11-11|Current version:v5.1
License link:https://creativecommons.org/licenses/by/4.0/