Phase 3 cross-language parity: HealthSnapshot layout, PII depth, and noop trace IDs
70 files · 2,490+ · 960-

HealthSnapshot canonical 25-field layout across all three languages

7 files changed
  • health.go HealthSnapshot rewritten to canonical 25-field layout
  • health_test.go Tests updated for new layout
  • parity_health_test.go New: 146-line parity test verifying Go layout matches Python/TypeScript
  • health.py HealthSnapshot trimmed to canonical 25-field layout
  • health.ts HealthSnapshot aligned to canonical 25-field layout
  • health.test.ts Tests updated for new layout
  • behavioral_fixtures.yaml Health snapshot behavioral fixtures added (44 lines)
  • HealthSnapshot standardized to a canonical 25-field layout across Go (220-line rewrite), Python (79-line change), and TypeScript (119-line change). All three implementations now expose the same field names and semantics. parity_health_test.go (146 lines) verifies field-level identity between the Go snapshot and the Python/TypeScript reference fixtures. interface behavioral
    5 files
    • health.go
    • health.py
    • health.ts
    • parity_health_test.go
    • behavioral_fixtures.yaml

PII max depth across Go, Python, and TypeScript

6 files changed
  • pii.go PII default max depth changed from 32 to 8 to match Python
  • parity_pii_test.go New: parity tests for PII depth behavior
  • config.py PROVIDE_LOG_PII_MAX_DEPTH env var support added
  • processors.py PII depth wired into log processor
  • pii.ts PII max depth parameter added, default 8, env var configurable
  • config.ts PII max depth config field
  • PII sanitization max depth now configurable via PROVIDE_LOG_PII_MAX_DEPTH environment variable across all three languages, defaulting to 8. Go was previously defaulting to 32 — now aligned to Python’s default. TypeScript adds the parameter and env var support. go/parity_pii_test.go verifies consistent truncation behavior at the same depth across languages. interface behavioral
    4 files
    • pii.go
    • config.py
    • pii.ts
    • parity_pii_test.go

TypeScript noop span synthetic trace IDs

4 files changed
  • tracing.ts Noop spans now emit synthetic random hex trace IDs (53-line change)
  • hash.ts randomHex utility (10 lines)
  • tracing.test.ts New: 53-line tests for noop trace ID generation
  • hash.test.ts randomHex tests updated
  • TypeScript noop spans previously emitted zero/empty trace IDs, diverging from Python and Go behavior where noop spans emit synthetic random hex IDs for correlation. hash.ts adds randomHex(); tracing.ts injects synthetic IDs into noop span context. Matches Python/Go noop span behavior verified in parity.test.ts. remediate behavioral
    3 files
    • tracing.ts
    • hash.ts
    • tracing.test.ts

Go session and trace wrapper fixes

3 files changed
  • session.go GetSessionID now returns (string, bool) to signal session absence
  • session_test.go Tests updated for new signature
  • tracing.go Error recording added to trace wrapper
  • GetSessionID signature changed from returning an empty string to returning (string, bool), making the absence of a session ID explicit rather than ambiguous. Trace wrapper updated to record errors on spans when they occur rather than silently swallowing them. remediate behavioral
    2 files
    • session.go
    • tracing.go

Parity spec and test infrastructure

6 files changed
  • telemetry-api.yaml Spec additions for health snapshot and PII depth (18 lines)
  • CONFIGURATION.md PROVIDE_LOG_PII_MAX_DEPTH documented
  • parity.test.ts New: TypeScript parity tests (52 lines)
  • test_config_parity.py Python config parity tests (21 lines)
  • 2026-04-05-cross-language-parity-phase3.md Phase 3 implementation plan (855 lines)
  • 2026-04-05-cross-language-parity-phase3-design.md Phase 3 design doc (220 lines)
  • Phase 3 cross-language parity plan and design documents record the health snapshot, PII depth, and trace ID alignment work. Parity tests added in all three languages: go/parity_health_test.go + parity_pii_test.go, typescript/tests/parity.test.ts (52 lines), tests/parity/test_config_parity.py. spec/telemetry-api.yaml and CONFIGURATION.md updated. specify internal
    3 files
    • parity.test.ts
    • test_config_parity.py
    • telemetry-api.yaml