Skip to main content
Jira progress: loading…

TG-RP

TrustGate Replay Profiles


1. Purpose

TrustGate promises deterministic replay: any accepted claim can be reconstructed, re-executed, and verified from its anchored inputs. TrustGate also promises AI-assisted assessment: the X dimension (analytical confidence) of the trust vector is produced with the help of models whose outputs are not naturally deterministic across model updates, inference infrastructure changes, or sampling.

These two promises conflict if left unreconciled. This specification reconciles them before implementation, so that no engine is built on an undeclared assumption about what "replay passes" means.

The resolution is simple: determinism is declared per output, not assumed per platform. Every engine output carries exactly one replay profile, and the profile — not convention — defines the pass criterion.


2. The Three Replay Modes

2.1. EXACT

The replayed output SHALL be bit-identical to the original output given the anchored inputs, the pinned engine version (CMI), and the pinned configuration snapshot.

  • Pass criterion: hash(replay_output) == hash(original_output)
  • Applies to: all rule-based, arithmetic, and routing logic.
  • Any divergence is a defect, never tolerable drift.

2.2. BANDED

The replayed output is recomputed using pinned model identity and pinned inference parameters, and SHALL pass if it falls within a declared tolerance band ε of the original.

  • Pass criterion: |replay_value − original_value| ≤ ε
  • ε is declared in the engine's replay profile and is a governed value (FAGF policy bundle artifact), not a code constant.
  • The replay manifest SHALL pin: model_id, model_version, prompt_hash, inference_params (temperature, top_p, seed where supported), and embedding_version where applicable.
  • Divergence within ε: replay passes, and the delta is recorded in the replay comparison artifact.
  • Divergence beyond ε: replay fails softly — it emits comp.TG.EVENT.REPLAY-DRIFT.v1_0 and routes per §5. It SHALL NOT silently pass and SHALL NOT be retried until it happens to pass.

2.3. RECORDED

The original output is itself the anchored artifact. Replay does not recompute; it verifies the integrity and lineage of the recorded output.

  • Pass criterion: hash(anchored_artifact) == hash(referenced_artifact) AND full input lineage resolves.
  • Applies to: outputs of third-party or external AI services where model pinning cannot be guaranteed, and any human-judgment artifact (reviewer decisions, quarantine release rationales).
  • RECORDED artifacts SHALL be DAL-anchored at creation time, not at replay time.

3. Per-Engine Replay Profile Declaration

Every engine specification SHALL declare a replay_profile frontmatter block mapping each output CSI to exactly one mode:

replay_profile:
specification: TG-RP
default: EXACT
outputs:
comp.TG.OUTPUT.TRUST-SCORE.v1_0: BANDED
comp.TG.OUTPUT.CONFIDENCE-SCORE.v1_0: BANDED
comp.TG.OUTPUT.SCORE-EXPLANATION.v1_0: EXACT
policy_refs:
epsilon: comp.FAGF.OUTPUT.WEIGHT-BUNDLE.v1_0

3.1. Default Replay-Mode Guidance by Engine

EngineModeNotes
TG-PARSEEXACTDeterministic parsing; parser version pinned via CMI
TG-VALIDATE-STRUCTUREEXACTSchema validation against pinned SSSR snapshot
TG-NORMALIZE-SIGNALEXACTUnit/identifier normalization against pinned dictionaries
TG-ENRICH-CONTEXTEXACT / RECORDEDRegistry lookups EXACT; external enrichment sources RECORDED
TG-RULE-EVALUATOREXACTRule execution against pinned ruleset version
TG-VALIDATION-RULEEXACTRegistry-defined validation rules, pinned
TG-POLICY-RESOLUTIONEXACTPolicy resolution against pinned FAGF bundle version
TG-SCORE-TRUSTMixedSee §3.2 — the load-bearing case
TG-DECISIONEXACTDeterministic given claims + policy (kernel invariant)
TG-QUARANTINE-MANAGEREXACT / RECORDEDState transitions EXACT; human review rationale RECORDED
TG-DAL-ANCHOREXACTAnchoring is cryptographic by construction
TG-ATTESTATION-ENGINEEXACTAttestation assembly from anchored inputs
TG-REPLAY-ENGINEEXACTThe replay engine replays itself exactly, by definition
TG-FEDERATION-EXCHANGEEXACTPackage assembly and signature verification
TG-SCHEDULER-ORCHESTRATORRECORDEDTiming is environmental; job records are the artifact
TG-RUNTIME-CONFIGURATIONEXACTConfiguration resolution from pinned bundles
TG-OBSERVERECORDEDTelemetry is observational, not recomputable
TG-AUDIT-LOGRECORDEDAudit records are immutable observations
TG-AI-FEEDBACKRECORDEDLearning events describe what was published

3.2. TG-SCORE — the Load-Bearing Case

The trust vector decomposes cleanly under this specification:

  • Dimensions S, I, Q, P, R, F (source reliability, identity confidence, data quality, provenance integrity, replay reliability, and federation confidence) are rule-derived: EXACT.
  • Dimension A (AI calibration confidence) is AI-assisted: BANDED, with pinned model identity and governed ε.
  • The aggregation over S, I, Q, P, R, F, A and all dynamic modifiers are arithmetic over fixed dimension inputs: EXACT given inputs.

Consequence: arithmetic aggregation is exactly reproducible for a fixed input vector. When the accepted vector contains the BANDED A dimension, the published Trust Score is BANDED and its permitted tolerance is governed by the resolved policy context. An auditor can therefore verify the entire scoring chain with precisely one declared, bounded, governed source of tolerance recorded in the replay comparison artifact.


4. Replay Manifest Extensions

comp.TG.OUTPUT.REPLAY-MANIFEST.v1_0 SHALL carry, per engine execution record:

FieldTypeRequiredPurpose
replay_modeenum EXACT|BANDED|RECORDEDYesDeclared mode for this output
engine_cmistringYesPinned engine artifact version
config_snapshot_refCSI refYesTG-CONFIG snapshot used
model_idstringBANDED onlyModel identity
model_versionstringBANDED onlyPinned model version
prompt_hashsha256BANDED onlyHash of full prompt template + inputs
inference_paramsobjectBANDED onlytemperature, top_p, seed
epsilonnumberBANDED onlyGoverned tolerance at execution time
artifact_hashsha256RECORDED onlyHash of the anchored output

5. REPLAY-DRIFT Semantics

When a BANDED replay diverges beyond ε:

  1. Emit comp.TG.EVENT.REPLAY-DRIFT.v1_0 carrying original value, replay value, ε, model versions of both executions, and the affected claim reference.
  2. If the drifted output was decision-material (it changed which of the five decision exits would have been taken), the affected claim SHALL be routed to Human Review, and the drift event SHALL be DAL-anchored.
  3. If the drift was not decision-material, the event feeds TG-FEEDBACK → DSAIL as calibration signal and TG-OBSERVE for drift-rate telemetry.
  4. Repeated drift on the same model version above a governed rate SHALL raise a model-recalibration flag to the calibration authority defined in the Score Governance Specification (TG-SG).

6. Normative Rules

  1. Every engine SHALL declare exactly one replay mode per output CSI. An undeclared output is a docs-lint ERROR (rule DL-104).
  2. BANDED outputs SHALL pin model identity, version, prompt hash, and inference parameters in the replay manifest. A BANDED record missing any pin is invalid and SHALL fail replay.
  3. ε values are governed FAGF artifacts. Implementations SHALL NOT hardcode tolerance values.
  4. Drift beyond ε SHALL emit REPLAY-DRIFT and SHALL NOT silently pass.
  5. RECORDED artifacts SHALL be DAL-anchored at creation. A RECORDED artifact without a creation-time anchor is not replayable and SHALL NOT be presented as such in attestations.
  6. Attestations (TG-ATTEST) SHALL disclose the replay mode composition of the attested claim and the governed tolerance-policy reference where a BANDED output is present.
  7. Implementations SHALL NOT execute Trust Scoring before Policy Resolution (restated from TG-MIB §5.1; the governed ε arrives via POLICY-CONTEXT).

7. Proposed CSI Registrations

The following identifiers require registration in TG-CSI before they may be treated as canonical runtime contracts. This specification defines their intended replay semantics; it does not register them.

CSIDirectionPurpose
comp.TG.OUTPUT.REPLAY-COMPARISON.v1_0OutputOriginal vs replay values, deltas, pass/fail per output
comp.TG.EVENT.REPLAY-DRIFT.v1_0EventBanded drift beyond ε (already referenced by TG-REPLAY; semantics now normative here)

8. ZRR Ruleset Entry

ruleset: ZRR-TG-REPLAY-001
invariant: every-output-declares-replay-mode
scope: all engine-spec documents under /trustgate/trustgate-engines/
enforcement: docs-lint DL-104 (ERROR) + runtime manifest validation

Fields in this specification map 1:1 to MDX frontmatter and are intended to be machine-consumed by the docs-lint pipeline (VW-DL) and the ticket generator. Source of truth: Docusaurus.




GitHub RepoRequest for Change (RFC)