Files
git.stella-ops.org/docs/features/unchecked/airgap/mirror-time-anchor-contract.md

1.8 KiB

Mirror Time Anchor Contract

Module

AirGap

Status

IMPLEMENTED

Description

Defines canonical time-anchor fields (generatedAt UTC ISO-8601, optional sourceClock hint) and staleness computation (now - generatedAt with +/-5s tolerance) for mirror bundles in air-gapped environments.

Implementation Details

  • Time anchor module: src/AirGap/StellaOps.AirGap.Time/ -- full module with controllers, services, parsing, models, stores, config, hooks, health checks
  • Time anchor parsing: src/AirGap/StellaOps.AirGap.Time/Parsing/ -- token parsing for time anchor extraction
  • Staleness calculation: services compute now - generatedAt with tolerance handling
  • HLC merge services: src/AirGap/StellaOps.AirGap.Time/Services/ -- Hybrid Logical Clock for multi-node sync
  • Deterministic time fixtures: src/AirGap/StellaOps.AirGap.Time/fixtures/
  • Bundle integration: src/AirGap/__Libraries/StellaOps.AirGap.Bundle/Services/ -- TimeAnchorContent, SnapshotBundleWriter.Sections.TimeAnchor, SnapshotBundleReader.Verify.TimeAnchor
  • Attestor timestamping: src/Attestor/__Libraries/StellaOps.Attestor.Timestamping/TimeCorrelationValidator.Validate.cs, TimeCorrelationStatus.cs
  • Tests: src/AirGap/__Tests/StellaOps.AirGap.Time.Tests/ (TimeAnchorLoaderTests, StalenessCalculatorTests, TimeVerificationServiceTests, TimeTokenParserTests, etc.)

E2E Test Plan

  • Verify time anchor is embedded in air-gap bundle with correct ISO-8601 format
  • Verify staleness calculation correctly computes age with +/-5s tolerance
  • Verify time anchor verification rejects bundles with tampered timestamps
  • Verify HLC merge produces consistent ordering across multiple nodes
  • Source: SPRINT_0150_0001_0002_mirror_time.md