[PR #445] [MERGED] feat(conformance): add portable conformance export package format #1991

Closed
opened 2026-10-16 21:13:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/445
Author: @morluto
Created: 7/28/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @morluto

Base: main ← Head: codex/conformance-package-336


📝 Commits (1)

  • 4ee30e4 feat(conformance): add portable conformance export package format

📊 Changes

6 files changed (+1086 additions, -0 deletions)

View changed files

➕ src/domain/conformancePackage.ts (+218 -0)
➕ src/domain/conformanceReplay.ts (+138 -0)
➕ src/domain/conformanceTrustGate.ts (+246 -0)
➕ tests/conformancePackage.test.ts (+181 -0)
➕ tests/conformanceReplay.test.ts (+190 -0)
➕ tests/conformanceTrustGate.test.ts (+113 -0)

📄 Description

Summary

Implements a committed scenario/replay/shim/evidence package format for portable process-fidelity conformance fixtures.

Closes #336, #337, #338.

Changes

  • Conformance export package format (#336): Defines a versioned, path-independent package format with deterministic manifests, scenario contracts, replay/shim plans, expected evidence, and verifier contracts. Package IDs are deterministically computed from canonical JSON for reproducibility.

  • Semantic-diff trust gates (#337): Implements trust gates that compare captured runs against committed conformance packages, classifying semantic diffs from timing/normalization noise. Volatile dimensions (timing, timestamps, PIDs) are ignored. Unknown/truncated evidence is never treated as equivalence.

  • Conformance CI replay (#338): Adds a CI replay engine that runs each scenario, evaluates trust gates, and detects drift between captured and committed evidence. Reports first divergence with evidence IDs.

Verification

npm run typecheck   # passes
npm run lint        # passes (no new warnings)
npx vitest run tests/conformancePackage.test.ts tests/conformanceTrustGate.test.ts tests/conformanceReplay.test.ts  # 27 tests pass

Acceptance criteria

  • ✅ Package contains deterministic manifests, scenario contract, replay/shim plans, expected evidence, and verifier contract
  • ✅ Format is versioned and path-independent (fixture_path is relative to repo root)
  • ✅ CI can consume the package from a clean checkout
  • ✅ Gates reject runs that differ in required dimensions
  • ✅ Unknown/truncated evidence is not treated as equivalence
  • ✅ Results cite evidence IDs and first divergence

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/445 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/conformance-package-336` --- ### 📝 Commits (1) - [`4ee30e4`](https://github.com/morluto/rea/commit/4ee30e4145db9b496158cd980af05e22010856a7) feat(conformance): add portable conformance export package format ### 📊 Changes **6 files changed** (+1086 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/domain/conformancePackage.ts` (+218 -0) ➕ `src/domain/conformanceReplay.ts` (+138 -0) ➕ `src/domain/conformanceTrustGate.ts` (+246 -0) ➕ `tests/conformancePackage.test.ts` (+181 -0) ➕ `tests/conformanceReplay.test.ts` (+190 -0) ➕ `tests/conformanceTrustGate.test.ts` (+113 -0) </details> ### 📄 Description ## Summary Implements a committed scenario/replay/shim/evidence package format for portable process-fidelity conformance fixtures. Closes #336, #337, #338. ## Changes - **Conformance export package format (#336)**: Defines a versioned, path-independent package format with deterministic manifests, scenario contracts, replay/shim plans, expected evidence, and verifier contracts. Package IDs are deterministically computed from canonical JSON for reproducibility. - **Semantic-diff trust gates (#337)**: Implements trust gates that compare captured runs against committed conformance packages, classifying semantic diffs from timing/normalization noise. Volatile dimensions (timing, timestamps, PIDs) are ignored. Unknown/truncated evidence is never treated as equivalence. - **Conformance CI replay (#338)**: Adds a CI replay engine that runs each scenario, evaluates trust gates, and detects drift between captured and committed evidence. Reports first divergence with evidence IDs. ## Verification ```bash npm run typecheck # passes npm run lint # passes (no new warnings) npx vitest run tests/conformancePackage.test.ts tests/conformanceTrustGate.test.ts tests/conformanceReplay.test.ts # 27 tests pass ``` ## Acceptance criteria - ✅ Package contains deterministic manifests, scenario contract, replay/shim plans, expected evidence, and verifier contract - ✅ Format is versioned and path-independent (fixture_path is relative to repo root) - ✅ CI can consume the package from a clean checkout - ✅ Gates reject runs that differ in required dimensions - ✅ Unknown/truncated evidence is not treated as equivalence - ✅ Results cite evidence IDs and first divergence --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1991
No description provided.